Package org.jboss.as.controller

Examples of org.jboss.as.controller.SimpleResourceDefinition


            registerDeploymentsModel(registration);
        }
    }

    private void registerDeploymentsModel(final SubsystemRegistration registration) {
        ResourceDefinition deploymentsDef = new SimpleResourceDefinition(PathElement.pathElement(ModelDescriptionConstants.SUBSYSTEM, SUBSYSTEM_NAME),
                getResourceDescriptionResolver("deployed"));
        final ManagementResourceRegistration deploymentsRegistration = registration.registerDeploymentModel(deploymentsDef);

        final ManagementResourceRegistration dataSources = deploymentsRegistration.registerSubModel(PathElement.pathElement(DATA_SOURCE), DATA_SOURCE_DESC);
        dataSources.registerOperationHandler("flush-idle-connection-in-pool",
View Full Code Here


    public void invoke() {
        PathElement ijPe = PathElement.pathElement(Constants.IRONJACAMAR_NAME, Constants.IRONJACAMAR_NAME);
        ManagementResourceRegistration ironJacamarChild;

        try {
            ironJacamarChild = parentRegistration.registerSubModel(new SimpleResourceDefinition(ijPe, ResourceAdaptersSubsystemProviders.IRONJACAMAR_DESC));
        } catch (IllegalArgumentException iae) {
            ironJacamarChild = parentRegistration.getSubModel(PathAddress.pathAddress(ijPe));
        }

        PathElement raPath = PathElement.pathElement(RESOURCEADAPTER_NAME);
        ManagementResourceRegistration raChild;
        try {
            raChild = ironJacamarChild.registerSubModel(new SimpleResourceDefinition(raPath, RESOURCEADAPTER_RO_DESC));
        } catch (IllegalArgumentException iae) {
            raChild = ironJacamarChild.getSubModel(PathAddress.pathAddress(raPath));
        }

        PathElement configPath = PathElement.pathElement(CONFIG_PROPERTIES.getName());
        ManagementResourceRegistration configChild;
        try {
            configChild = raChild.registerSubModel(new SimpleResourceDefinition(configPath, CONFIG_PROPERTIES_RO_DESC));

        } catch (IllegalArgumentException iae) {
            configChild = raChild.getSubModel(PathAddress.pathAddress(configPath));
        }
        try {
            configChild.registerReadOnlyAttribute(Constants.CONFIG_PROPERTY_VALUE, null);
        } catch (IllegalArgumentException iae) {
            //ignore
        }

        PathElement connDefPath = PathElement.pathElement(CONNECTIONDEFINITIONS_NAME);
        ManagementResourceRegistration connChild;
        try {
            connChild = raChild.registerSubModel(new SimpleResourceDefinition(connDefPath, CONNECTION_DEFINITION_RO_DESC));
        } catch (IllegalArgumentException iae) {
            connChild = raChild.getSubModel(PathAddress.pathAddress(connDefPath));
        }


        try {
            connChild.registerOperationHandler("flush-idle-connection-in-pool",
                    PoolOperations.FlushIdleConnectionInPool.RA_INSTANCE, FLUSH_IDLE_CONNECTION_DESC, false, RUNTIME_ONLY_FLAG);
        } catch (IllegalArgumentException iae) {
            //ignore
        }

        try {
            connChild.registerOperationHandler("flush-all-connection-in-pool",
                    PoolOperations.FlushAllConnectionInPool.RA_INSTANCE, FLUSH_ALL_CONNECTION_DESC, false, RUNTIME_ONLY_FLAG);
        } catch (IllegalArgumentException iae) {
            //ignore
        }

        try {
            connChild.registerOperationHandler("test-connection-in-pool", PoolOperations.TestConnectionInPool.RA_INSTANCE,
                    TEST_CONNECTION_DESC, false, RUNTIME_ONLY_FLAG);
        } catch (IllegalArgumentException iae) {
            //ignore
        }

        PathElement connDefConfigPath = PathElement.pathElement(CONFIG_PROPERTIES.getName());
        ManagementResourceRegistration connDefConfigChild;
        try {
            connDefConfigChild = connChild.registerSubModel(new SimpleResourceDefinition(connDefConfigPath, CONFIG_PROPERTIES_RO_DESC));
        } catch (IllegalArgumentException iae) {
            connDefConfigChild = connChild.getSubModel(PathAddress.pathAddress(connDefConfigPath));
        }
        try {
            connDefConfigChild.registerReadOnlyAttribute(Constants.CONFIG_PROPERTY_VALUE, null);
        } catch (IllegalArgumentException iae) {
            //ignore
        }


        PathElement adminObjectPath = PathElement.pathElement(ADMIN_OBJECTS_NAME);
        ManagementResourceRegistration adminObjectChild;
        try {
            adminObjectChild = raChild.registerSubModel(new SimpleResourceDefinition(adminObjectPath, ADMIN_OBJECT_RO_DESC));
        } catch (IllegalArgumentException iae) {
            adminObjectChild = raChild.getSubModel(PathAddress.pathAddress(adminObjectPath));
        }

        PathElement adminObjectConfigPath = PathElement.pathElement(CONFIG_PROPERTIES.getName());
        ManagementResourceRegistration adminObjectConfigChild;
        try {
            adminObjectConfigChild = adminObjectChild.registerSubModel(new SimpleResourceDefinition(adminObjectConfigPath, CONFIG_PROPERTIES_RO_DESC));
        } catch (IllegalArgumentException iae) {
            adminObjectConfigChild = adminObjectChild.getSubModel(PathAddress.pathAddress(adminObjectConfigPath));
        }
        try {
            adminObjectConfigChild.registerReadOnlyAttribute(Constants.CONFIG_PROPERTY_VALUE, null);
View Full Code Here

            registerDeploymentsModel(registration);
        }
    }

    private void registerDeploymentsModel(final SubsystemRegistration registration) {
        ResourceDefinition deploymentsDef = new SimpleResourceDefinition(PathElement.pathElement(ModelDescriptionConstants.SUBSYSTEM, SUBSYSTEM_NAME),
                getResourceDescriptionResolver("deployed"));
        final ManagementResourceRegistration deploymentsRegistration = registration.registerDeploymentModel(deploymentsDef);

        final ManagementResourceRegistration dataSources = deploymentsRegistration.registerSubModel(PathElement.pathElement(DATA_SOURCE), DATA_SOURCE_DESC);
        dataSources.registerOperationHandler("flush-idle-connection-in-pool",
View Full Code Here

        // subsystem=ejb3/service=iiop
        subsystemRegistration.registerSubModel(EJB3IIOPResourceDefinition.INSTANCE);

        if (registerRuntimeOnly) {
            ResourceDefinition deploymentsDef = new SimpleResourceDefinition(PathElement.pathElement(ModelDescriptionConstants.SUBSYSTEM, SUBSYSTEM_NAME),
                    getResourceDescriptionResolver("deployed"));
            final ManagementResourceRegistration deploymentsRegistration = subsystem.registerDeploymentModel(deploymentsDef);
            deploymentsRegistration.registerSubModel(EntityBeanResourceDefinition.INSTANCE);
            deploymentsRegistration.registerSubModel(MessageDrivenBeanResourceDefinition.INSTANCE);
            deploymentsRegistration.registerSubModel(SingletonBeanDeploymentResourceDefinition.INSTANCE);
View Full Code Here

        management.registerSubModel(NativeRemotingManagementResourceDefinition.INSTANCE);
        management.registerSubModel(HttpManagementResourceDefinition.INSTANCE);

        // Other core services
        ManagementResourceRegistration serviceContainer = resourceRegistration.registerSubModel(
                new SimpleResourceDefinition(PathElement.pathElement(CORE_SERVICE, SERVICE_CONTAINER), ControllerResolver.getResolver("core", SERVICE_CONTAINER)));
        serviceContainer.registerOperationHandler(DumpServicesHandler.DEFINITION, DumpServicesHandler.INSTANCE);

        // Platform MBeans
        PlatformMBeanResourceRegistrar.registerPlatformMBeanResources(resourceRegistration);

        // Paths
        resourceRegistration.registerSubModel(PathResourceDefinition.createSpecified(pathManager));

        // Interfaces
        ManagementResourceRegistration interfaces = resourceRegistration.registerSubModel(new InterfaceDefinition(
                SpecifiedInterfaceAddHandler.INSTANCE,
                SpecifiedInterfaceRemoveHandler.INSTANCE,
                true
        ));
        interfaces.registerReadOnlyAttribute(NetworkInterfaceRuntimeHandler.RESOLVED_ADDRESS, NetworkInterfaceRuntimeHandler.INSTANCE);
        interfaces.registerOperationHandler(SpecifiedInterfaceResolveHandler.DEFINITION, SpecifiedInterfaceResolveHandler.INSTANCE);

        //TODO socket-binding-group currently lives in controller and the child RDs live in server so they currently need passing in from here
        resourceRegistration.registerSubModel(new SocketBindingGroupResourceDefinition(BindingGroupAddHandler.INSTANCE,
                                        SocketBindingGroupRemoveHandler.INSTANCE,
                                        false,
                                        SocketBindingResourceDefinition.INSTANCE,
                                        RemoteDestinationOutboundSocketBindingResourceDefinition.INSTANCE,
                                        LocalDestinationOutboundSocketBindingResourceDefinition.INSTANCE));

        // Deployments
        ManagementResourceRegistration deployments = resourceRegistration.registerSubModel(ServerDeploymentResourceDefinition.create(contentRepository, vaultReader));

        //deployment overlays
        resourceRegistration.registerSubModel(new DeploymentOverlayDefinition(DeploymentOverlayPriority.SERVER, contentRepository, null));

        // The sub-deployments registry
        deployments.registerSubModel(new SimpleResourceDefinition(PathElement.pathElement(SUBDEPLOYMENT), DeploymentAttributes.DEPLOYMENT_RESOLVER));

        // Extensions
        resourceRegistration.registerSubModel(new ExtensionResourceDefinition(extensionRegistry, parallelBoot, true, false));
        if (extensionRegistry != null) {
            //extension registry may be null during testing
View Full Code Here

    }

    /** {@inheritDoc} */
    @Override
    public final ManagementResourceRegistration registerSubModel(final PathElement address, final DescriptionProvider descriptionProvider) {
        return registerSubModel(new SimpleResourceDefinition(address, descriptionProvider));
    }
View Full Code Here

        subsystemRegistration.registerSubModel(EJB3ThreadPoolResourceDefinition.INSTANCE);

        // subsystem=ejb3/service=iiop
        subsystemRegistration.registerSubModel(EJB3IIOPResourceDefinition.INSTANCE);

        ResourceDefinition deploymentsDef = new SimpleResourceDefinition(PathElement.pathElement(ModelDescriptionConstants.SUBSYSTEM, SUBSYSTEM_NAME),
                getResourceDescriptionResolver("deployed"));
        final ManagementResourceRegistration deploymentsRegistration = subsystem.registerDeploymentModel(deploymentsDef);
        deploymentsRegistration.registerSubModel(EntityBeanResourceDefinition.INSTANCE);
        deploymentsRegistration.registerSubModel(MessageDrivenBeanResourceDefinition.INSTANCE);
        deploymentsRegistration.registerSubModel(SingletonBeanDeploymentResourceDefinition.INSTANCE);
View Full Code Here

    }

    /** {@inheritDoc} */
    @Override
    public final ManagementResourceRegistration registerSubModel(final PathElement address, final DescriptionProvider descriptionProvider) {
        return registerSubModel(new SimpleResourceDefinition(address, descriptionProvider));
    }
View Full Code Here

TOP

Related Classes of org.jboss.as.controller.SimpleResourceDefinition

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.