@Override public void configure(DeploymentPhaseContext context, ComponentDescription description, ComponentConfiguration componentConfiguration) throws DeploymentUnitProcessingException { if (this.hasRemoteView((EJBComponentDescription) description)) { // add a dependency on local transaction service componentConfiguration.getCreateDependencies().add((sb, cs) -> sb.requires(TxnServices.JBOSS_TXN_REMOTE_TRANSACTION_SERVICE)); } }
@Override public void configure(DeploymentPhaseContext context, ComponentDescription description, ComponentConfiguration componentConfiguration) throws DeploymentUnitProcessingException { if (this.hasRemoteView((EJBComponentDescription) description)) { // add a dependency on EJBRemoteTransactionsRepository service componentConfiguration.getCreateDependencies().add(new DependencyConfigurator<EJBComponentCreateService>() { @Override public void configureDependency(ServiceBuilder<?> serviceBuilder, EJBComponentCreateService ejbComponentCreateService) throws DeploymentUnitProcessingException { serviceBuilder.addDependency(EJBRemoteTransactionsRepository.SERVICE_NAME, EJBRemoteTransactionsRepository.class, ejbComponentCreateService.getEJBRemoteTransactionsRepositoryInjector()); } }); } }