public static ServiceName serviceNameFor(final EJBComponentDescription ejbComponentDescription) { if (ejbComponentDescription == null || ejbComponentDescription.getServiceName() == null) { return null; } return ejbComponentDescription.getServiceName().append("ejb", "non-functional-timerservice"); }
@Override public String toString() { return getClass().getName() + "{" + "serviceName=" + getServiceName() + '}' + "@" + Integer.toHexString(hashCode()); }
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)
injectedValues.put(ejbComponentDescription.getServiceName().append(EjbIIOPService.SERVICE_NAME), iorFactory);
final ServiceBuilder<EjbIIOPService> builder = serviceTarget.addService(componentDescription.getServiceName().append(EjbIIOPService.SERVICE_NAME), service); builder.addDependency(componentDescription.getCreateServiceName(), EJBComponent.class, service.getEjbComponentInjectedValue()); builder.addDependency(homeView.getServiceName(), ComponentView.class, service.getHomeView());
@Override public String toString() { return getClass().getName() + "{" + "serviceName=" + getServiceName() + '}' + "@" + Integer.toHexString(hashCode()); } }
@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); } }); } });
this.localInterfaces = localInterfaces; this.remoteInterfaces = remoteInterfaces; this.baseName = componentDescription.getServiceName(); this.stateless = componentDescription.isStateless(); this.messageDriven = componentDescription.isMessageDriven();
injectedValues.put(ejbComponentDescription.getServiceName().append(EjbIIOPService.SERVICE_NAME), iorFactory);
this.localInterfaces = localInterfaces; this.remoteInterfaces = remoteInterfaces; this.baseName = componentDescription.getServiceName(); this.stateless = componentDescription.isStateless(); this.messageDriven = componentDescription.isMessageDriven();
final ServiceBuilder<EjbIIOPService> builder = serviceTarget.addService(componentDescription.getServiceName().append(EjbIIOPService.SERVICE_NAME), service); builder.addDependency(componentDescription.getCreateServiceName(), EJBComponent.class, service.getEjbComponentInjectedValue()); builder.addDependency(homeView.getServiceName(), ComponentView.class, service.getHomeView());