/** * Get the service name for this view. * * @return the service name */ public ServiceName getServiceName() { //TODO: need to set viewNameParts somewhere if (!viewNameParts.isEmpty()) { return componentDescription.getServiceName().append("VIEW").append(viewNameParts.toArray(new String[viewNameParts.size()])); } else { return componentDescription.getServiceName().append("VIEW").append(viewClassName); } }
private static ServiceName addWeldInterceptorBindingService(final ServiceTarget target, final ComponentConfiguration configuration, final Class<?> componentClass, final String beanName, final ServiceName weldServiceName, final ServiceName weldStartService, final String beanDeploymentArchiveId, final ComponentInterceptorSupport componentInterceptorSupport) { ServiceName bindingServiceName = configuration.getComponentDescription().getServiceName().append(WeldInterceptorBindingsService.SERVICE_NAME); final ServiceBuilder<?> sb = target.addService(bindingServiceName); final Consumer<InterceptorBindings> interceptorBindingsConsumer = sb.provides(bindingServiceName); final Supplier<WeldBootstrapService> weldContainerSupplier = sb.requires(weldServiceName); sb.requires(weldStartService); sb.setInstance(new WeldInterceptorBindingsService(interceptorBindingsConsumer, weldContainerSupplier, beanDeploymentArchiveId, beanName, componentClass, componentInterceptorSupport)); sb.install(); return bindingServiceName; }
final ServiceName serviceName = componentDescription.getServiceName().append(TimerServiceImpl.SERVICE_NAME); final TimerServiceImpl service = new TimerServiceImpl(ejbComponentDescription.getScheduleMethods(), serviceName, timerServiceRegistry); final ServiceBuilder<javax.ejb.TimerService> createBuilder = context.getServiceTarget().addService(serviceName, service);
failed.add(componentDescription.getServiceName()); iterator.remove(); } else {
ServiceName jndiDepServiceName = configuration.getComponentDescription().getServiceName().append(JNDI_BINDINGS_SERVICE); final ServiceBuilder<Void> jndiDepServiceBuilder = serviceTarget.addService(jndiDepServiceName, Service.NULL); jndiDependencies.add(jndiDepServiceName);
final ServiceName serviceName = configuration.getComponentDescription().getServiceName().append("WeldInstantiator"); final ServiceBuilder<?> builder = target.addService(serviceName); builder.requires(weldStartService);
/** * Get the service name for this view. * * @return the service name */ public ServiceName getServiceName() { //TODO: need to set viewNameParts somewhere if (!viewNameParts.isEmpty()) { return componentDescription.getServiceName().append("VIEW").append(viewNameParts.toArray(new String[viewNameParts.size()])); } else { return componentDescription.getServiceName().append("VIEW").append(viewClassName); } }
/** * Get the service name for this view. * * @return the service name */ public ServiceName getServiceName() { //TODO: need to set viewNameParts somewhere if (!viewNameParts.isEmpty()) { return componentDescription.getServiceName().append("VIEW").append(viewNameParts.toArray(new String[viewNameParts.size()])); } else { return componentDescription.getServiceName().append("VIEW").append(viewClassName); } }
/** * Get the service name for this view. * * @return the service name */ public ServiceName getServiceName() { //TODO: need to set viewNameParts somewhere if (!viewNameParts.isEmpty()) { return componentDescription.getServiceName().append("VIEW").append(viewNameParts.toArray(new String[viewNameParts.size()])); } else { return componentDescription.getServiceName().append("VIEW").append(viewClassName); } }
@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); } }); } });
final ServiceName serviceName = configuration.getComponentDescription().getServiceName().append("WeldInstantiator");
failed.add(componentDescription.getStartServiceName()); failed.add(componentDescription.getCreateServiceName()); failed.add(componentDescription.getServiceName()); iterator.remove(); } else {
failed.add(componentDescription.getServiceName()); iterator.remove(); } else {
failed.add(componentDescription.getServiceName()); iterator.remove(); } else {
ServiceName jndiDepServiceName = configuration.getComponentDescription().getServiceName().append(JNDI_BINDINGS_SERVICE); final ServiceBuilder<Void> jndiDepServiceBuilder = serviceTarget.addService(jndiDepServiceName, Service.NULL); jndiDependencies.add(jndiDepServiceName);
ServiceName jndiDepServiceName = configuration.getComponentDescription().getServiceName().append(JNDI_BINDINGS_SERVICE); final ServiceBuilder<Void> jndiDepServiceBuilder = serviceTarget.addService(jndiDepServiceName, Service.NULL); jndiDependencies.add(jndiDepServiceName);