final TimedObjectInvokerImpl invoker = new TimedObjectInvokerImpl(deploymentName, module); context.getServiceTarget().addService(invokerServiceName, invoker) .addDependency(componentDescription.getCreateServiceName(), EJBComponent.class, invoker.getEjbComponent()) .install(); final ServiceBuilder<javax.ejb.TimerService> createBuilder = context.getServiceTarget().addService(serviceName, service); createBuilder.addDependency(TIMER_SERVICE_NAME, Timer.class, service.getTimerInjectedValue()); createBuilder.addDependency(componentDescription.getCreateServiceName(), EJBComponent.class, service.getEjbComponentInjectedValue()); createBuilder.addDependency(timerServiceThreadPool, ExecutorService.class, service.getExecutorServiceInjectedValue()); if (timerPersistenceServices.containsKey(ejbComponentDescription.getEJBName())) {
injectedValues.put(component.getCreateServiceName(), componentInjectedValue); final Map<String, InjectedValue<ComponentView>> remoteViews = new HashMap<String, InjectedValue<ComponentView>>(); final Map<String, InjectedValue<ComponentView>> localViews = new HashMap<String, InjectedValue<ComponentView>>();
/** * 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(); }
failed.add(componentDescription.getCreateServiceName()); failed.add(componentDescription.getServiceName()); iterator.remove();
final ServiceBuilder<MdbDeliveryControllerService> builder = serviceTarget .addService(mdbDescription.getDeliveryControllerName(), mdbDeliveryControllerService) .addDependency(description.getCreateServiceName(), MessageDrivenComponent.class, mdbDeliveryControllerService.getMdbComponent()) .setInitialMode(Mode.PASSIVE);
final ServiceName createServiceName = configuration.getComponentDescription().getCreateServiceName(); final ServiceName startServiceName = configuration.getComponentDescription().getStartServiceName(); final BasicComponentCreateService createService = configuration.getComponentCreateServiceFactory().constructService(configuration);
@Override public void configure(final DeploymentPhaseContext context, final ComponentDescription description, final ComponentConfiguration configuration) throws DeploymentUnitProcessingException { final EJBComponentDescription ejbComponentDescription = (EJBComponentDescription) description; final ServiceName invokerServiceName = ejbComponentDescription.getServiceName().append(TimedObjectInvokerImpl.SERVICE_NAME); final TimedObjectInvokerImpl invoker = new TimedObjectInvokerImpl(deploymentName, module); context.getServiceTarget().addService(invokerServiceName, invoker) .addDependency(component.getCreateServiceName(), EJBComponent.class, invoker.getEjbComponent()) .install(); //install the timer create service final ServiceName serviceName = component.getServiceName().append(TimerServiceImpl.SERVICE_NAME); final TimerServiceImpl service = new TimerServiceImpl(ejbComponentDescription.getScheduleMethods(), serviceName); final ServiceBuilder<javax.ejb.TimerService> createBuilder = context.getServiceTarget().addService(serviceName, service); createBuilder.addDependency(TIMER_SERVICE_NAME, Timer.class, service.getTimerInjectedValue()); createBuilder.addDependency(component.getCreateServiceName(), EJBComponent.class, service.getEjbComponentInjectedValue()); createBuilder.addDependency(timerServiceThreadPool, ExecutorService.class, service.getExecutorServiceInjectedValue()); createBuilder.addDependency(FileTimerPersistence.SERVICE_NAME, TimerPersistence.class, service.getTimerPersistence()); createBuilder.addDependency(invokerServiceName, TimedObjectInvoker.class, service.getTimedObjectInvoker()); createBuilder.install(); ejbComponentDescription.setTimerService(service); //inject the timer service directly into the start service configuration.getStartDependencies().add(new DependencyConfigurator<ComponentStartService>() { @Override public void configureDependency(final ServiceBuilder<?> serviceBuilder, final ComponentStartService service) throws DeploymentUnitProcessingException { serviceBuilder.addDependency(serviceName); } }); } });
injectedValues.put(component.getCreateServiceName(), componentInjectedValue); final Map<String, InjectedValue<ComponentView>> remoteViews = new HashMap<String, InjectedValue<ComponentView>>(); final Map<String, InjectedValue<ComponentView>> localViews = new HashMap<String, InjectedValue<ComponentView>>();
/** * 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(); }
/** * 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(); }
/** * 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(); }
ROOT_LOGGER.componentInstallationFailure(e, componentDescription.getComponentName()); failed.add(componentDescription.getStartServiceName()); failed.add(componentDescription.getCreateServiceName()); failed.add(componentDescription.getServiceName()); iterator.remove();
final ServiceName createServiceName = configuration.getComponentDescription().getCreateServiceName(); final ServiceName startServiceName = configuration.getComponentDescription().getStartServiceName(); final BasicComponentCreateService createService = configuration.getComponentCreateServiceFactory().constructService(configuration);
failed.add(componentDescription.getCreateServiceName()); failed.add(componentDescription.getServiceName()); iterator.remove();
failed.add(componentDescription.getCreateServiceName()); failed.add(componentDescription.getServiceName()); iterator.remove();
final ServiceName createServiceName = configuration.getComponentDescription().getCreateServiceName(); final ServiceName startServiceName = configuration.getComponentDescription().getStartServiceName(); final BasicComponentCreateService createService = configuration.getComponentCreateServiceFactory().constructService(configuration);
final ServiceName createServiceName = configuration.getComponentDescription().getCreateServiceName(); final ServiceName startServiceName = configuration.getComponentDescription().getStartServiceName(); final BasicComponentCreateService createService = configuration.getComponentCreateServiceFactory().constructService(configuration);