Search in sources :

Example 11 with SimpleAliasEntry

use of org.jboss.as.clustering.controller.SimpleAliasEntry in project wildfly by wildfly.

the class BackupForResourceDefinition method register.

@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
    ManagementResourceRegistration registration = parent.registerSubModel(this);
    parent.registerAlias(LEGACY_PATH, new SimpleAliasEntry(registration));
    ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addIgnoredAttributes(Attribute.class);
    new SimpleResourceRegistration(descriptor, null).register(registration);
    return registration;
}
Also used : SimpleResourceRegistration(org.jboss.as.clustering.controller.SimpleResourceRegistration) SimpleAliasEntry(org.jboss.as.clustering.controller.SimpleAliasEntry) ManagementResourceRegistration(org.jboss.as.clustering.controller.ManagementResourceRegistration) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor)

Example 12 with SimpleAliasEntry

use of org.jboss.as.clustering.controller.SimpleAliasEntry in project wildfly by wildfly.

the class TransactionResourceDefinition method register.

@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
    ManagementResourceRegistration registration = parent.registerSubModel(this);
    parent.registerAlias(LEGACY_PATH, new SimpleAliasEntry(registration));
    Capability dependentCapability = new BinaryRequirementCapability(InfinispanCacheRequirement.CACHE, BinaryCapabilityNameResolver.GRANDPARENT_PARENT);
    ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addAttributes(Attribute.class).addResourceCapabilityReference(new TransactionResourceCapabilityReference(dependentCapability, CommonRequirement.LOCAL_TRANSACTION_PROVIDER, Attribute.MODE, EnumSet.of(TransactionMode.NONE, TransactionMode.BATCH))).addResourceCapabilityReference(new TransactionResourceCapabilityReference(dependentCapability, TransactionRequirement.TRANSACTION_SYNCHRONIZATION_REGISTRY, Attribute.MODE, EnumSet.complementOf(EnumSet.of(TransactionMode.NON_XA)))).addResourceCapabilityReference(new TransactionResourceCapabilityReference(dependentCapability, TransactionRequirement.XA_RESOURCE_RECOVERY_REGISTRY, Attribute.MODE, EnumSet.complementOf(EnumSet.of(TransactionMode.FULL_XA))));
    ResourceServiceHandler handler = new SimpleResourceServiceHandler(TransactionServiceConfigurator::new);
    new SimpleResourceRegistration(descriptor, handler).register(registration);
    if (registration.isRuntimeOnlyRegistrationValid()) {
        for (DeprecatedMetric metric : EnumSet.allOf(DeprecatedMetric.class)) {
            metric.register(registration);
        }
    }
    return registration;
}
Also used : BinaryRequirementCapability(org.jboss.as.clustering.controller.BinaryRequirementCapability) SimpleResourceServiceHandler(org.jboss.as.clustering.controller.SimpleResourceServiceHandler) SimpleResourceRegistration(org.jboss.as.clustering.controller.SimpleResourceRegistration) BinaryRequirementCapability(org.jboss.as.clustering.controller.BinaryRequirementCapability) Capability(org.jboss.as.clustering.controller.Capability) SimpleAliasEntry(org.jboss.as.clustering.controller.SimpleAliasEntry) ManagementResourceRegistration(org.jboss.as.clustering.controller.ManagementResourceRegistration) SimpleResourceServiceHandler(org.jboss.as.clustering.controller.SimpleResourceServiceHandler) ResourceServiceHandler(org.jboss.as.clustering.controller.ResourceServiceHandler) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor)

Example 13 with SimpleAliasEntry

use of org.jboss.as.clustering.controller.SimpleAliasEntry in project wildfly by wildfly.

the class StringKeyedJDBCStoreResourceDefinition method register.

@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
    ManagementResourceRegistration registration = super.register(parent);
    parent.registerAlias(STRING_JDBC_PATH, new SimpleAliasEntry(registration));
    registration.registerReadWriteAttribute(DeprecatedAttribute.TABLE.getDefinition(), LEGACY_READ_TABLE_HANDLER, LEGACY_WRITE_TABLE_HANDLER);
    new StringTableResourceDefinition().register(registration);
    return registration;
}
Also used : SimpleAliasEntry(org.jboss.as.clustering.controller.SimpleAliasEntry) ManagementResourceRegistration(org.jboss.as.clustering.controller.ManagementResourceRegistration)

Example 14 with SimpleAliasEntry

use of org.jboss.as.clustering.controller.SimpleAliasEntry in project wildfly by wildfly.

the class OffHeapMemoryResourceDefinition method register.

@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
    ManagementResourceRegistration registration = super.register(parent);
    parent.registerAlias(BINARY_PATH, new SimpleAliasEntry(registration));
    return registration;
}
Also used : SimpleAliasEntry(org.jboss.as.clustering.controller.SimpleAliasEntry) ManagementResourceRegistration(org.jboss.as.clustering.controller.ManagementResourceRegistration)

Aggregations

SimpleAliasEntry (org.jboss.as.clustering.controller.SimpleAliasEntry)14 ManagementResourceRegistration (org.jboss.as.clustering.controller.ManagementResourceRegistration)10 ResourceDescriptor (org.jboss.as.clustering.controller.ResourceDescriptor)9 SimpleResourceRegistration (org.jboss.as.clustering.controller.SimpleResourceRegistration)8 ResourceServiceHandler (org.jboss.as.clustering.controller.ResourceServiceHandler)7 SimpleResourceServiceHandler (org.jboss.as.clustering.controller.SimpleResourceServiceHandler)7 ManagementResourceRegistration (org.jboss.as.controller.registry.ManagementResourceRegistration)4 BinaryRequirementCapability (org.jboss.as.clustering.controller.BinaryRequirementCapability)1 Capability (org.jboss.as.clustering.controller.Capability)1 ReloadRequiredResourceRegistration (org.jboss.as.clustering.controller.ReloadRequiredResourceRegistration)1 RuntimeCapability (org.jboss.as.controller.capability.RuntimeCapability)1