@Override public void configure(final DeploymentPhaseContext context, final ComponentConfiguration componentConfiguration, final ViewDescription description, final ViewConfiguration configuration) throws DeploymentUnitProcessingException { final String earApplicationName = componentConfiguration.getComponentDescription().getModuleDescription().getEarApplicationName(); configuration.setViewInstanceFactory(new StatelessRemoteViewInstanceFactory(earApplicationName, componentConfiguration.getModuleName(), componentConfiguration.getComponentDescription().getModuleDescription().getDistinctName(), componentConfiguration.getComponentName())); } });
@Override public void configure(final DeploymentPhaseContext context, final ComponentConfiguration componentConfiguration, final ViewDescription description, final ViewConfiguration configuration) throws DeploymentUnitProcessingException { final String earApplicationName = componentConfiguration.getComponentDescription().getModuleDescription().getEarApplicationName(); configuration.setViewInstanceFactory(new StatefulRemoteViewInstanceFactory(earApplicationName, componentConfiguration.getModuleName(), componentConfiguration.getComponentDescription().getModuleDescription().getDistinctName(), componentConfiguration.getComponentName())); } });
@Override public void configure(final DeploymentPhaseContext context, final ComponentConfiguration componentConfiguration, final ViewDescription description, final ViewConfiguration configuration) throws DeploymentUnitProcessingException { if (Remote.class.isAssignableFrom(configuration.getViewClass())) { final String earApplicationName = componentConfiguration.getComponentDescription().getModuleDescription().getEarApplicationName(); configuration.setViewInstanceFactory(new RemoteHomeViewInstanceFactory(earApplicationName, componentConfiguration.getModuleName(), componentConfiguration.getComponentDescription().getModuleDescription().getDistinctName(), componentConfiguration.getComponentName())); } } });
protected void processComponentConfig(final ComponentDescription componentDescription) throws DeploymentUnitProcessingException { if (!(componentDescription instanceof EJBComponentDescription)) { return; // Only process EJBs } // if the EJB is packaged in a .war, then we need to bind the java:comp/EJBContext only once for the entire module if (componentDescription.getNamingMode() != ComponentNamingMode.CREATE) { // get the module description final EEModuleDescription moduleDescription = componentDescription.getModuleDescription(); // the java:module/EJBContext binding configuration // Note that we bind to java:module/EJBContext since it's a .war. End users can still lookup java:comp/EJBContext // and that will internally get translated to java:module/EJBContext for .war, since java:comp == java:module in // a web ENC. So binding to java:module/EJBContext is OK. final BindingConfiguration ejbContextBinding = new BindingConfiguration("java:module/EJBContext", directEjbContextReferenceSource); moduleDescription.getBindingConfigurations().add(ejbContextBinding); } else { // EJB packaged outside of a .war. So process normally. // add the binding configuration to the component description final BindingConfiguration ejbContextBinding = new BindingConfiguration("java:comp/EJBContext", directEjbContextReferenceSource); componentDescription.getBindingConfigurations().add(ejbContextBinding); } }
@Override public void configure(final DeploymentPhaseContext context, final ComponentConfiguration componentConfiguration, final ViewDescription description, final ViewConfiguration configuration) throws DeploymentUnitProcessingException { final String earApplicationName = componentConfiguration.getComponentDescription().getModuleDescription().getEarApplicationName(); configuration.setViewInstanceFactory(new StatelessRemoteViewInstanceFactory(earApplicationName, componentConfiguration.getModuleName(), componentConfiguration.getComponentDescription().getModuleDescription().getDistinctName(), componentConfiguration.getComponentName())); } });
@Override protected void processComponentConfig(DeploymentUnit deploymentUnit, DeploymentPhaseContext phaseContext, CompositeIndex index, ComponentDescription componentDescription) throws DeploymentUnitProcessingException { if (!(componentDescription instanceof EJBComponentDescription)) { return; // Only process EJBs } // if the EJB is packaged in a .war, then we need to bind the java:comp/TimerService only once for the entire module if (componentDescription.getNamingMode() != ComponentNamingMode.CREATE) { // get the module description final EEModuleDescription moduleDescription = componentDescription.getModuleDescription(); // the java:module/TimerService binding configuration // Note that we bind to java:module/TimerService since it's a .war. End users can still lookup java:comp/TimerService // and that will internally get translated to java:module/TimerService for .war, since java:comp == java:module in // a web ENC. So binding to java:module/TimerService is OK. final BindingConfiguration timerServiceBinding = new BindingConfiguration("java:module/TimerService", new TimerServiceBindingSource()); moduleDescription.getBindingConfigurations().add(timerServiceBinding); } else { // EJB packaged outside of a .war. So process normally. // add the binding configuration to the component description final BindingConfiguration timerServiceBinding = new BindingConfiguration("java:comp/TimerService", new TimerServiceBindingSource()); componentDescription.getBindingConfigurations().add(timerServiceBinding); } } }
this.ejbLocalObject = ejbLocalObject == null ? null : ejbLocalObject.getServiceName(); this.applicationName = componentConfiguration.getApplicationName(); this.earApplicationName = componentConfiguration.getComponentDescription().getModuleDescription().getEarApplicationName(); this.moduleName = componentConfiguration.getModuleName(); this.distinctName = componentConfiguration.getComponentDescription().getModuleDescription().getDistinctName(); this.shutDownInterceptorFactory = ejbComponentDescription.getShutDownInterceptorFactory(); this.securityRequired = ejbComponentDescription.isSecurityRequired();
@Override public void configure(final DeploymentPhaseContext context, final ComponentConfiguration componentConfiguration, final ViewDescription description, final ViewConfiguration configuration) throws DeploymentUnitProcessingException { final String earApplicationName = componentConfiguration.getComponentDescription().getModuleDescription().getEarApplicationName(); configuration.setViewInstanceFactory(new StatelessRemoteViewInstanceFactory(earApplicationName, componentConfiguration.getModuleName(), componentConfiguration.getComponentDescription().getModuleDescription().getDistinctName(), componentConfiguration.getComponentName())); } });
@Override public void configure(final DeploymentPhaseContext context, final ComponentConfiguration componentConfiguration, final ViewDescription description, final ViewConfiguration configuration) throws DeploymentUnitProcessingException { final String earApplicationName = componentConfiguration.getComponentDescription().getModuleDescription().getEarApplicationName(); configuration.setViewInstanceFactory(new StatefulRemoteViewInstanceFactory(earApplicationName, componentConfiguration.getModuleName(), componentConfiguration.getComponentDescription().getModuleDescription().getDistinctName(), componentConfiguration.getComponentName())); } });
@Override public void configure(final DeploymentPhaseContext context, final ComponentConfiguration componentConfiguration, final ViewDescription description, final ViewConfiguration configuration) throws DeploymentUnitProcessingException { final String earApplicationName = componentConfiguration.getComponentDescription().getModuleDescription().getEarApplicationName(); configuration.setViewInstanceFactory(new StatelessRemoteViewInstanceFactory(earApplicationName, componentConfiguration.getModuleName(), componentConfiguration.getComponentDescription().getModuleDescription().getDistinctName(), componentConfiguration.getComponentName())); } });
@Override public void configure(final DeploymentPhaseContext context, final ComponentConfiguration componentConfiguration, final ViewDescription description, final ViewConfiguration configuration) throws DeploymentUnitProcessingException { if (Remote.class.isAssignableFrom(configuration.getViewClass())) { final String earApplicationName = componentConfiguration.getComponentDescription().getModuleDescription().getEarApplicationName(); configuration.setViewInstanceFactory(new RemoteHomeViewInstanceFactory(earApplicationName, componentConfiguration.getModuleName(), componentConfiguration.getComponentDescription().getModuleDescription().getDistinctName(), componentConfiguration.getComponentName())); } } });
protected void processComponentConfig(final DeploymentUnit deploymentUnit, final DeploymentPhaseContext phaseContext, final CompositeIndex index, final ComponentDescription componentDescription) throws DeploymentUnitProcessingException { if (!(componentDescription instanceof EJBComponentDescription)) { return; // Only process EJBs } // if the EJB is packaged in a .war, then we need to bind the java:comp/EJBContext only once for the entire module if (componentDescription.getNamingMode() != ComponentNamingMode.CREATE) { // get the module description final EEModuleDescription moduleDescription = componentDescription.getModuleDescription(); // the java:module/EJBContext binding configuration // Note that we bind to java:module/EJBContext since it's a .war. End users can still lookup java:comp/EJBContext // and that will internally get translated to java:module/EJBContext for .war, since java:comp == java:module in // a web ENC. So binding to java:module/EJBContext is OK. final BindingConfiguration ejbContextBinding = new BindingConfiguration("java:module/EJBContext", directEjbContextReferenceSource); moduleDescription.getBindingConfigurations().add(ejbContextBinding); } else { // EJB packaged outside of a .war. So process normally. // add the binding configuration to the component description final BindingConfiguration ejbContextBinding = new BindingConfiguration("java:comp/EJBContext", directEjbContextReferenceSource); componentDescription.getBindingConfigurations().add(ejbContextBinding); } }
@Override protected void processComponentConfig(DeploymentUnit deploymentUnit, DeploymentPhaseContext phaseContext, CompositeIndex index, ComponentDescription componentDescription) throws DeploymentUnitProcessingException { if (!(componentDescription instanceof EJBComponentDescription)) { return; // Only process EJBs } if (componentDescription instanceof StatefulComponentDescription) { return; // TimerService isn't supported for Stateful session beans } // if the EJB is packaged in a .war, then we need to bind the java:comp/TimerService only once for the entire module if (componentDescription.getNamingMode() != ComponentNamingMode.CREATE) { // get the module description final EEModuleDescription moduleDescription = componentDescription.getModuleDescription(); // the java:module/TimerService binding configuration // Note that we bind to java:module/TimerService since it's a .war. End users can still lookup java:comp/TimerService // and that will internally get translated to java:module/TimerService for .war, since java:comp == java:module in // a web ENC. So binding to java:module/TimerService is OK. final BindingConfiguration timerServiceBinding = new BindingConfiguration("java:module/TimerService", new TimerServiceBindingSource()); moduleDescription.getBindingConfigurations().add(timerServiceBinding); } else { // EJB packaged outside of a .war. So process normally. // add the binding configuration to the component description final BindingConfiguration timerServiceBinding = new BindingConfiguration("java:comp/TimerService", new TimerServiceBindingSource()); componentDescription.getBindingConfigurations().add(timerServiceBinding); } } }
@Override public void configure(final DeploymentPhaseContext context, final ComponentConfiguration componentConfiguration, final ViewDescription description, final ViewConfiguration configuration) throws DeploymentUnitProcessingException { final EEModuleDescription moduleDescription = componentConfiguration.getComponentDescription().getModuleDescription(); final String appName = moduleDescription.getEarApplicationName() == null ? "" : moduleDescription.getEarApplicationName(); configuration.setViewInstanceFactory(getRemoteViewInstanceFactory(appName, componentConfiguration.getModuleName(), moduleDescription.getDistinctName(), componentConfiguration.getComponentName())); } });
this.ejbLocalObject = ejbLocalObject == null ? null : ejbLocalObject.getServiceName(); this.applicationName = componentConfiguration.getApplicationName(); this.earApplicationName = componentConfiguration.getComponentDescription().getModuleDescription().getEarApplicationName(); this.moduleName = componentConfiguration.getModuleName(); this.distinctName = componentConfiguration.getComponentDescription().getModuleDescription().getDistinctName(); this.shutDownInterceptorFactory = ejbComponentDescription.getShutDownInterceptorFactory();