@Override protected boolean requiresInterceptors(final Method method, final ComponentConfiguration componentConfiguration) { if (super.requiresInterceptors(method, componentConfiguration)) { return true; } final EJBComponentDescription ejbComponentDescription = (EJBComponentDescription) componentConfiguration.getComponentDescription(); if ((ejbComponentDescription.getTimeoutMethod() != null && ejbComponentDescription.getTimeoutMethod().equals(method)) || ejbComponentDescription.getScheduleMethods().containsKey(method)) { return true; } return false; }
public BasicComponentCreateService constructService(final ComponentConfiguration configuration) { return new BasicComponentCreateService(configuration); } };
/** * {@inheritDoc} */ public synchronized void start(final StartContext context) throws StartException { component = createComponent(); }
/** * Construct a new instance. * * @param createService the create service which created this component */ public BasicComponent(final BasicComponentCreateService createService) { componentName = createService.getComponentName(); componentClass = createService.getComponentClass(); postConstruct = createService.getPostConstruct(); preDestroy = createService.getPreDestroy(); interceptorFactoryMap = createService.getComponentInterceptors(); namespaceContextSelector = createService.getNamespaceContextSelector(); createServiceName = createService.getServiceName(); }
final ServiceBuilder<Component> createBuilder = serviceTarget.addService(createServiceName, createService); createBuilder.addDependency(deploymentUnit.getServiceName(), DeploymentUnit.class, createService.getDeploymentUnitInjector());
/** * Construct a new instance. * * @param createService the create service which created this component */ public BasicComponent(final BasicComponentCreateService createService) { componentName = createService.getComponentName(); componentClass = createService.getComponentClass(); postConstruct = createService.getPostConstruct(); preDestroy = createService.getPreDestroy(); interceptorFactoryMap = createService.getComponentInterceptors(); namespaceContextSelector = createService.getNamespaceContextSelector(); createServiceName = createService.getServiceName(); }
final ServiceBuilder<Component> createBuilder = serviceTarget.addService(createServiceName, createService); createBuilder.addDependency(deploymentUnit.getServiceName(), DeploymentUnit.class, createService.getDeploymentUnitInjector());
/** * Construct a new instance. * * @param createService the create service which created this component */ public BasicComponent(final BasicComponentCreateService createService) { componentName = createService.getComponentName(); componentClass = createService.getComponentClass(); postConstruct = createService.getPostConstruct(); preDestroy = createService.getPreDestroy(); interceptorFactoryMap = createService.getComponentInterceptors(); namespaceContextSelector = createService.getNamespaceContextSelector(); createServiceName = createService.getServiceName(); }
/** * Construct a new instance. * * @param componentConfiguration the component configuration */ public BasicComponentCreateService(final ComponentConfiguration componentConfiguration) { serviceName = componentConfiguration.getComponentDescription().getCreateServiceName(); componentName = componentConfiguration.getComponentName(); postConstruct = Interceptors.getChainedInterceptorFactory(componentConfiguration.getPostConstructInterceptors()); preDestroy = Interceptors.getChainedInterceptorFactory(componentConfiguration.getPreDestroyInterceptors()); final IdentityHashMap<Method, InterceptorFactory> componentInterceptors = new IdentityHashMap<Method, InterceptorFactory>(); for (Method method : componentConfiguration.getDefinedComponentMethods()) { if(requiresInterceptors(method, componentConfiguration)) { componentInterceptors.put(method, Interceptors.getChainedInterceptorFactory(componentConfiguration.getComponentInterceptors(method))); } } componentClass = componentConfiguration.getComponentClass(); this.componentInterceptors = componentInterceptors; this.namespaceContextSelector = componentConfiguration.getNamespaceContextSelector(); }
/** * {@inheritDoc} */ public synchronized void start(final StartContext context) throws StartException { component = createComponent(); }
public BasicComponentCreateService constructService(final ComponentConfiguration configuration) { return new BasicComponentCreateService(configuration); } };
final ServiceBuilder<Component> createBuilder = serviceTarget.addService(createServiceName, createService); createBuilder.addDependency(deploymentUnit.getServiceName(), DeploymentUnit.class, createService.getDeploymentUnitInjector());
/** * Construct a new instance. * * @param createService the create service which created this component */ public BasicComponent(final BasicComponentCreateService createService) { componentName = createService.getComponentName(); componentClass = createService.getComponentClass(); postConstruct = createService.getPostConstruct(); preDestroy = createService.getPreDestroy(); interceptorFactoryMap = createService.getComponentInterceptors(); namespaceContextSelector = createService.getNamespaceContextSelector(); createServiceName = createService.getServiceName(); }
@Override protected boolean requiresInterceptors(final Method method, final ComponentConfiguration componentConfiguration) { if(super.requiresInterceptors(method, componentConfiguration)) { return true; } final EJBComponentDescription ejbComponentDescription = (EJBComponentDescription)componentConfiguration.getComponentDescription(); if ((ejbComponentDescription.getTimeoutMethod() != null && ejbComponentDescription.getTimeoutMethod().equals(method)) || ejbComponentDescription.getScheduleMethods().containsKey(method)) { return true; } return false; }
/** * {@inheritDoc} */ public synchronized void start(final StartContext context) throws StartException { component = createComponent(); }
public BasicComponentCreateService constructService(final ComponentConfiguration configuration) { return new BasicComponentCreateService(configuration); } };
/** * Construct a new instance. * * @param componentConfiguration the component configuration */ public BasicComponentCreateService(final ComponentConfiguration componentConfiguration) { serviceName = componentConfiguration.getComponentDescription().getCreateServiceName(); componentName = componentConfiguration.getComponentName(); postConstruct = Interceptors.getChainedInterceptorFactory(componentConfiguration.getPostConstructInterceptors()); preDestroy = Interceptors.getChainedInterceptorFactory(componentConfiguration.getPreDestroyInterceptors()); final IdentityHashMap<Method, InterceptorFactory> componentInterceptors = new IdentityHashMap<Method, InterceptorFactory>(); for (Method method : componentConfiguration.getDefinedComponentMethods()) { if(requiresInterceptors(method, componentConfiguration)) { componentInterceptors.put(method, Interceptors.getChainedInterceptorFactory(componentConfiguration.getComponentInterceptors(method))); } } componentClass = componentConfiguration.getComponentClass(); this.componentInterceptors = componentInterceptors; this.namespaceContextSelector = componentConfiguration.getNamespaceContextSelector(); }
/** * {@inheritDoc} */ public synchronized void start(final StartContext context) throws StartException { component = createComponent(); }
public BasicComponentCreateService constructService(final ComponentConfiguration configuration) { return new BasicComponentCreateService(configuration); } };
/** * Construct a new instance. * * @param componentConfiguration the component configuration */ public BasicComponentCreateService(final ComponentConfiguration componentConfiguration) { serviceName = componentConfiguration.getComponentDescription().getCreateServiceName(); componentName = componentConfiguration.getComponentName(); postConstruct = Interceptors.getChainedInterceptorFactory(componentConfiguration.getPostConstructInterceptors()); preDestroy = Interceptors.getChainedInterceptorFactory(componentConfiguration.getPreDestroyInterceptors()); final IdentityHashMap<Method, InterceptorFactory> componentInterceptors = new IdentityHashMap<Method, InterceptorFactory>(); for (Method method : componentConfiguration.getDefinedComponentMethods()) { if(requiresInterceptors(method, componentConfiguration)) { componentInterceptors.put(method, Interceptors.getChainedInterceptorFactory(componentConfiguration.getComponentInterceptors(method))); } } componentClass = componentConfiguration.getComponentClass(); this.componentInterceptors = componentInterceptors; this.namespaceContextSelector = componentConfiguration.getNamespaceContextSelector(); }