Package org.jboss.as.ejb3.component.pool

Examples of org.jboss.as.ejb3.component.pool.StrictMaxPoolConfig


        final long timeout = StrictMaxPoolResourceDefinition.INSTANCE_ACQUISITION_TIMEOUT.resolveModelAttribute(context, strictMaxPoolModel).asLong();
        final String unit = StrictMaxPoolResourceDefinition.INSTANCE_ACQUISITION_TIMEOUT_UNIT.resolveModelAttribute(context, strictMaxPoolModel).asString();
        // create the pool config
        final PoolConfig strictMaxPoolConfig = new StrictMaxPoolConfig(poolName, maxPoolSize, timeout, TimeUnit.valueOf(unit));
        // create and install the service
        final PoolConfigService poolConfigService = new PoolConfigService(strictMaxPoolConfig);
        final ServiceName serviceName = PoolConfigService.EJB_POOL_CONFIG_BASE_SERVICE_NAME.append(poolName);
        ServiceBuilder<PoolConfig> svcBuilder = context.getServiceTarget().addService(serviceName, poolConfigService);
        if (verificationHandler != null) {
            svcBuilder.addListener(verificationHandler);
        }
View Full Code Here


        final String poolName = PathAddress.pathAddress(operation.get(ModelDescriptionConstants.ADDRESS)).getLastElement().getValue();
        final int maxPoolSize = StrictMaxPoolResourceDefinition.MAX_POOL_SIZE.resolveModelAttribute(context, strictMaxPoolModel).asInt();
        final long timeout = StrictMaxPoolResourceDefinition.INSTANCE_ACQUISITION_TIMEOUT.resolveModelAttribute(context, strictMaxPoolModel).asLong();
        final String unit = StrictMaxPoolResourceDefinition.INSTANCE_ACQUISITION_TIMEOUT_UNIT.resolveModelAttribute(context, strictMaxPoolModel).asString();
        // create the pool config
        final PoolConfig strictMaxPoolConfig = new StrictMaxPoolConfig(poolName, maxPoolSize, timeout, TimeUnit.valueOf(unit));
        // create and install the service
        final PoolConfigService poolConfigService = new PoolConfigService(strictMaxPoolConfig);
        final ServiceName serviceName = PoolConfigService.EJB_POOL_CONFIG_BASE_SERVICE_NAME.append(poolName);
        ServiceBuilder<PoolConfig> svcBuilder = context.getServiceTarget().addService(serviceName, poolConfigService);
        if (verificationHandler != null) {
View Full Code Here

        final String poolName = PathAddress.pathAddress(operation.get(ModelDescriptionConstants.OP_ADDR)).getLastElement().getValue();
        final ServiceName serviceName = PoolConfigService.EJB_POOL_CONFIG_BASE_SERVICE_NAME.append(poolName);
        final ServiceRegistry registry = context.getServiceRegistry(true);
        ServiceController<?> sc = registry.getService(serviceName);
        if (sc != null) {
            StrictMaxPoolConfig smpc = StrictMaxPoolConfig.class.cast(sc.getValue());
            if (smpc != null) {
                if (StrictMaxPoolResourceDefinition.MAX_POOL_SIZE.getName().equals(attributeName)) {
                    int maxPoolSize = StrictMaxPoolResourceDefinition.MAX_POOL_SIZE.resolveModelAttribute(context, model).asInt();
                    smpc.setMaxPoolSize(maxPoolSize);
                } else if (StrictMaxPoolResourceDefinition.INSTANCE_ACQUISITION_TIMEOUT.getName().equals(attributeName)) {
                    long timeout = StrictMaxPoolResourceDefinition.INSTANCE_ACQUISITION_TIMEOUT.resolveModelAttribute(context, model).asLong();
                    smpc.setTimeout(timeout);
                } else if (StrictMaxPoolResourceDefinition.INSTANCE_ACQUISITION_TIMEOUT_UNIT.getName().equals(attributeName)) {
                    String timeoutUnit = StrictMaxPoolResourceDefinition.INSTANCE_ACQUISITION_TIMEOUT_UNIT.resolveModelAttribute(context, model).asString();
                    smpc.setTimeoutUnit(TimeUnit.valueOf(timeoutUnit));
                }
            }
        }
    }
View Full Code Here

        final String poolName = PathAddress.pathAddress(operation.get(ModelDescriptionConstants.OP_ADDR)).getLastElement().getValue();
        final ServiceName serviceName = PoolConfigService.EJB_POOL_CONFIG_BASE_SERVICE_NAME.append(poolName);
        final ServiceRegistry registry = context.getServiceRegistry(true);
        ServiceController sc = registry.getService(serviceName);
        if (sc != null) {
            StrictMaxPoolConfig smpc = StrictMaxPoolConfig.class.cast(sc.getValue());
            if (smpc != null) {
                if (StrictMaxPoolResourceDefinition.MAX_POOL_SIZE.equals(attributeName)) {
                    int maxPoolSize = StrictMaxPoolResourceDefinition.MAX_POOL_SIZE.resolveModelAttribute(context, model).asInt();
                    smpc.setMaxPoolSize(maxPoolSize);
                } else if (StrictMaxPoolResourceDefinition.INSTANCE_ACQUISITION_TIMEOUT.equals(attributeName)) {
                    long timeout = StrictMaxPoolResourceDefinition.INSTANCE_ACQUISITION_TIMEOUT.resolveModelAttribute(context, model).asLong();
                    smpc.setTimeout(timeout);
                } else if (StrictMaxPoolResourceDefinition.INSTANCE_ACQUISITION_TIMEOUT_UNIT.equals(attributeName)) {
                    String timeoutUnit = StrictMaxPoolResourceDefinition.INSTANCE_ACQUISITION_TIMEOUT_UNIT.resolveModelAttribute(context, model).asString();
                    smpc.setTimeoutUnit(TimeUnit.valueOf(timeoutUnit));
                }
            }
        }
    }
View Full Code Here

        final String poolName = strictMaxPoolModel.require(EJB3SubsystemModel.NAME).asString();
        final int maxPoolSize = StrictMaxPoolResourceDefinition.MAX_POOL_SIZE.resolveModelAttribute(context, strictMaxPoolModel).asInt();
        final long timeout = StrictMaxPoolResourceDefinition.INSTANCE_ACQUISITION_TIMEOUT.resolveModelAttribute(context, strictMaxPoolModel).asLong();
        final String unit = StrictMaxPoolResourceDefinition.INSTANCE_ACQUISITION_TIMEOUT_UNIT.resolveModelAttribute(context, strictMaxPoolModel).asString();
        // create the pool config
        final PoolConfig strictMaxPoolConfig = new StrictMaxPoolConfig(poolName, maxPoolSize, timeout, TimeUnit.valueOf(unit));
        // create and install the service
        final PoolConfigService poolConfigService = new PoolConfigService(strictMaxPoolConfig);
        final ServiceName serviceName = PoolConfigService.EJB_POOL_CONFIG_BASE_SERVICE_NAME.append(poolName);
        ServiceBuilder<PoolConfig> svcBuilder = context.getServiceTarget().addService(serviceName, poolConfigService);
        if (verificationHandler != null) {
View Full Code Here

        final String poolName = strictMaxPoolModel.require(EJB3SubsystemModel.NAME).asString();
        final int maxPoolSize = StrictMaxPoolResourceDefinition.MAX_POOL_SIZE.resolveModelAttribute(context, strictMaxPoolModel).asInt();
        final long timeout = StrictMaxPoolResourceDefinition.INSTANCE_ACQUISITION_TIMEOUT.resolveModelAttribute(context, strictMaxPoolModel).asLong();
        final String unit = StrictMaxPoolResourceDefinition.INSTANCE_ACQUISITION_TIMEOUT_UNIT.resolveModelAttribute(context, strictMaxPoolModel).asString();
        // create the pool config
        final PoolConfig strictMaxPoolConfig = new StrictMaxPoolConfig(poolName, maxPoolSize, timeout, TimeUnit.valueOf(unit));
        // create and install the service
        final PoolConfigService poolConfigService = new PoolConfigService(strictMaxPoolConfig);
        final ServiceName serviceName = PoolConfigService.EJB_POOL_CONFIG_BASE_SERVICE_NAME.append(poolName);
        ServiceBuilder<PoolConfig> svcBuilder = context.getServiceTarget().addService(serviceName, poolConfigService);
        if (verificationHandler != null) {
View Full Code Here

        final long timeout = strictMaxPoolModel.get(EJB3SubsystemModel.INSTANCE_ACQUISITION_TIMEOUT).asLong(StrictMaxPoolConfig.DEFAULT_TIMEOUT);
        final String unit = strictMaxPoolModel.hasDefined(EJB3SubsystemModel.INSTANCE_ACQUISITION_TIMEOUT_UNIT)
                ? strictMaxPoolModel.get(EJB3SubsystemModel.INSTANCE_ACQUISITION_TIMEOUT_UNIT).asString()
                : StrictMaxPoolConfig.DEFAULT_TIMEOUT_UNIT.name();
        // create the pool config
        final PoolConfig strictMaxPoolConfig = new StrictMaxPoolConfig(poolName, maxPoolSize, timeout, TimeUnit.valueOf(unit));
        // create and install the service
        final PoolConfigService poolConfigService = new PoolConfigService(strictMaxPoolConfig);
        final ServiceName serviceName = PoolConfigService.EJB_POOL_CONFIG_BASE_SERVICE_NAME.append(poolName);
        final ServiceController serviceController = context.getServiceTarget().addService(serviceName, poolConfigService).install();
        // add this to the service controllers
View Full Code Here

        final ClassAnnotationInformation<Clustered, ClusteringInfo> clustering = clazz.getAnnotationInformation(Clustered.class);
        if (clustering == null || clustering.getClassLevelAnnotations().isEmpty()) {
            return;
        }
        // get the annotation information
        final ClusteringInfo clusteringInfo = clustering.getClassLevelAnnotations().get(0);
        // validate that the bean is eligible for clustering, before marking it as clustered
        this.validateAndMarkBeanAsClustered(ejbComponentDescription, clusteringInfo, deploymentUnit);
    }
View Full Code Here

                }
            }
        }
        if (beanClustered != null) {
            if (beanClustered) {
                this.validateAndMarkBeanAsClustered(ejbComponentDescription, new ClusteringInfo(), deploymentUnit);
            } else {
                // if the bean is marked as not-clustered, then we have to set the ClusteringInfo to null
                // in the EJB component description, so that we override any annotation information that's
                // already applied for the bean
                this.validateAndMarkBeanAsClustered(ejbComponentDescription, null, deploymentUnit);
            }
        } else if (allBeansClustered != null) {
            if (allBeansClustered) {
                this.validateAndMarkBeanAsClustered(ejbComponentDescription, new ClusteringInfo(), deploymentUnit);
            } else {
                // if the bean is marked as not-clustered, then we have to set the ClusteringInfo to null
                // in the EJB component description, so that we override any annotation information that's
                // already applied for the bean
                this.validateAndMarkBeanAsClustered(ejbComponentDescription, null, deploymentUnit);
View Full Code Here

    private final boolean stateful;
    private final boolean singleton;
    private final boolean messageDriven;

    public EjbDescriptorImpl(EJBComponentDescription componentDescription, BeanDeploymentArchiveImpl beanDeploymentArchive, final DeploymentReflectionIndex reflectionIndex) {
        final SessionBeanComponentDescription description = componentDescription instanceof SessionBeanComponentDescription ? (SessionBeanComponentDescription) componentDescription : null;
        final Set<BusinessInterfaceDescriptor<?>> localInterfaces = new HashSet<BusinessInterfaceDescriptor<?>>();
        final Set<BusinessInterfaceDescriptor<?>> remoteInterfaces = new HashSet<BusinessInterfaceDescriptor<?>>();
        final ResourceLoader loader = beanDeploymentArchive.getServices().get(ResourceLoader.class);

        ejbClass = (Class<T>) loader.classForName(componentDescription.getEJBClassName());
View Full Code Here

TOP

Related Classes of org.jboss.as.ejb3.component.pool.StrictMaxPoolConfig

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.