/** * Get the application name. * * @return the application name */ public String getApplicationName() { return componentDescription.getApplicationName(); }
/** * Get the context service name. * * @return the context service name */ public ServiceName getContextServiceName() { if (contextServiceName != null) return contextServiceName; if (getNamingMode() == ComponentNamingMode.CREATE) { return ContextNames.contextServiceNameOfComponent(getApplicationName(), getModuleName(), getComponentName()); } else if (getNamingMode() == ComponentNamingMode.USE_MODULE) { return ContextNames.contextServiceNameOfModule(getApplicationName(), getModuleName()); } else { throw new IllegalStateException(); } }
@Override public void configure(DeploymentPhaseContext context, ComponentDescription description, final ComponentConfiguration configuration) throws DeploymentUnitProcessingException { final ConcurrentContext concurrentContext = configuration.getConcurrentContext(); // setup context setupConcurrentContext(concurrentContext, description.getApplicationName(), description.getModuleName(), description.getComponentName(), configuration.getModuleClassLoader(), configuration.getNamespaceContextSelector(), context.getDeploymentUnit(), context.getServiceTarget()); // add the interceptor which manages the concurrent context final ConcurrentContextInterceptor interceptor = new ConcurrentContextInterceptor(concurrentContext); final InterceptorFactory interceptorFactory = new ImmediateInterceptorFactory(interceptor); configuration.addPostConstructInterceptor(interceptorFactory, InterceptorOrder.ComponentPostConstruct.CONCURRENT_CONTEXT); configuration.addPreDestroyInterceptor(interceptorFactory, InterceptorOrder.ComponentPreDestroy.CONCURRENT_CONTEXT); if (description.isPassivationApplicable()) { configuration.addPrePassivateInterceptor(interceptorFactory, InterceptorOrder.ComponentPassivation.CONCURRENT_CONTEXT); configuration.addPostActivateInterceptor(interceptorFactory, InterceptorOrder.ComponentPassivation.CONCURRENT_CONTEXT); } configuration.addComponentInterceptor(interceptorFactory, InterceptorOrder.Component.CONCURRENT_CONTEXT, false); } };
/** * Get the application name. * * @return the application name */ public String getApplicationName() { return componentDescription.getApplicationName(); }
/** * Get the application name. * * @return the application name */ public String getApplicationName() { return componentDescription.getApplicationName(); }
/** * Get the application name. * * @return the application name */ public String getApplicationName() { return componentDescription.getApplicationName(); }
/** * Get the context service name. * * @return the context service name */ public ServiceName getContextServiceName() { if (contextServiceName != null) return contextServiceName; if (getNamingMode() == ComponentNamingMode.CREATE) { return ContextNames.contextServiceNameOfComponent(getApplicationName(), getModuleName(), getComponentName()); } else if (getNamingMode() == ComponentNamingMode.USE_MODULE) { return ContextNames.contextServiceNameOfModule(getApplicationName(), getModuleName()); } else { throw new IllegalStateException(); } }
/** * Get the context service name. * * @return the context service name */ public ServiceName getContextServiceName() { if (contextServiceName != null) return contextServiceName; if (getNamingMode() == ComponentNamingMode.CREATE) { return ContextNames.contextServiceNameOfComponent(getApplicationName(), getModuleName(), getComponentName()); } else if (getNamingMode() == ComponentNamingMode.USE_MODULE) { return ContextNames.contextServiceNameOfModule(getApplicationName(), getModuleName()); } else { throw new IllegalStateException(); } }
/** * Get the context service name. * * @return the context service name */ public ServiceName getContextServiceName() { if (contextServiceName != null) return contextServiceName; if (getNamingMode() == ComponentNamingMode.CREATE) { return ContextNames.contextServiceNameOfComponent(getApplicationName(), getModuleName(), getComponentName()); } else if (getNamingMode() == ComponentNamingMode.USE_MODULE) { return ContextNames.contextServiceNameOfModule(getApplicationName(), getModuleName()); } else { throw new IllegalStateException(); } }
@Override public void configure(DeploymentPhaseContext context, ComponentDescription description, final ComponentConfiguration configuration) throws DeploymentUnitProcessingException { final ConcurrentContext concurrentContext = configuration.getConcurrentContext(); // setup context setupConcurrentContext(concurrentContext, description.getApplicationName(), description.getModuleName(), description.getComponentName(), configuration.getModuleClassLoader(), configuration.getNamespaceContextSelector(), context.getDeploymentUnit(), context.getServiceTarget()); // add the interceptor which manages the concurrent context final ConcurrentContextInterceptor interceptor = new ConcurrentContextInterceptor(concurrentContext); final InterceptorFactory interceptorFactory = new ImmediateInterceptorFactory(interceptor); configuration.addPostConstructInterceptor(interceptorFactory, InterceptorOrder.ComponentPostConstruct.CONCURRENT_CONTEXT); configuration.addPreDestroyInterceptor(interceptorFactory, InterceptorOrder.ComponentPreDestroy.CONCURRENT_CONTEXT); if (description.isPassivationApplicable()) { configuration.addPrePassivateInterceptor(interceptorFactory, InterceptorOrder.ComponentPassivation.CONCURRENT_CONTEXT); configuration.addPostActivateInterceptor(interceptorFactory, InterceptorOrder.ComponentPassivation.CONCURRENT_CONTEXT); } configuration.addComponentInterceptor(interceptorFactory, InterceptorOrder.Component.CONCURRENT_CONTEXT, false); } };
@Override public void configure(DeploymentPhaseContext context, ComponentDescription description, final ComponentConfiguration configuration) throws DeploymentUnitProcessingException { final ConcurrentContext concurrentContext = configuration.getConcurrentContext(); // setup context setupConcurrentContext(concurrentContext, description.getApplicationName(), description.getModuleName(), description.getComponentName(), configuration.getModuleClassLoader(), configuration.getNamespaceContextSelector(), context.getDeploymentUnit(), context.getServiceTarget()); // add the interceptor which manages the concurrent context final ConcurrentContextInterceptor interceptor = new ConcurrentContextInterceptor(concurrentContext); final InterceptorFactory interceptorFactory = new ImmediateInterceptorFactory(interceptor); configuration.addPostConstructInterceptor(interceptorFactory, InterceptorOrder.ComponentPostConstruct.CONCURRENT_CONTEXT); configuration.addPreDestroyInterceptor(interceptorFactory, InterceptorOrder.ComponentPreDestroy.CONCURRENT_CONTEXT); if (description.isPassivationApplicable()) { configuration.addPrePassivateInterceptor(interceptorFactory, InterceptorOrder.ComponentPassivation.CONCURRENT_CONTEXT); configuration.addPostActivateInterceptor(interceptorFactory, InterceptorOrder.ComponentPassivation.CONCURRENT_CONTEXT); } configuration.addComponentInterceptor(interceptorFactory, InterceptorOrder.Component.CONCURRENT_CONTEXT, false); } };