private EjbDeploymentInformation findBean(final EJBLocator<?> locator) { final String appName = locator.getAppName(); final String moduleName = locator.getModuleName(); final String distinctName = locator.getDistinctName(); final String beanName = locator.getBeanName(); final DeploymentModuleIdentifier moduleIdentifier = new DeploymentModuleIdentifier(appName, moduleName, distinctName); final ModuleDeployment module = deploymentRepository.getModules().get(moduleIdentifier); if (module == null) { throw EjbLogger.ROOT_LOGGER.unknownDeployment(locator); } final EjbDeploymentInformation ejbInfo = module.getEjbs().get(beanName); if (ejbInfo == null) { throw EjbLogger.ROOT_LOGGER.ejbNotFoundInDeployment(locator); } return ejbInfo; }
private EjbIIOPService serviceForLocator(final EJBLocator<?> locator, DeploymentRepository deploymentRepository) { final ModuleDeployment module = deploymentRepository.getModules().get(new DeploymentModuleIdentifier(locator.getAppName(), locator.getModuleName(), locator.getDistinctName())); if (module == null) { EjbLogger.ROOT_LOGGER.couldNotFindEjbForLocatorIIOP(locator); return null; } final EjbDeploymentInformation ejb = module.getEjbs().get(locator.getBeanName()); if (ejb == null) { EjbLogger.ROOT_LOGGER.couldNotFindEjbForLocatorIIOP(locator); return null; } final EjbIIOPService factory = ejb.getIorFactory(); if (factory == null) { EjbLogger.ROOT_LOGGER.ejbNotExposedOverIIOP(locator); return null; } return factory; }
protected EjbDeploymentInformation findEJB(final String appName, final String moduleName, final String distinctName, final String beanName) { final DeploymentModuleIdentifier ejbModule = new DeploymentModuleIdentifier(appName, moduleName, distinctName); final ModuleDeployment moduleDeployment = this.deploymentRepository.getModules().get(ejbModule); if (moduleDeployment == null) { return null; } return moduleDeployment.getEjbs().get(beanName); }
@Override public void listenerAdded(final DeploymentRepository repository) { for (Map.Entry<DeploymentModuleIdentifier, ModuleDeployment> entry : repository.getModules().entrySet()) { final DeploymentModuleIdentifier module = entry.getKey(); LocalEjbReceiver.this.registerModule(module.getApplicationName(), module.getModuleName(), module.getDistinctName()); } }
@Override public void listenerAdded(DeploymentRepository repository) { // get the initial available modules and send a message to the client final Map<DeploymentModuleIdentifier, ModuleDeployment> availableModules = this.deploymentRepository.getModules(); if (availableModules != null && !availableModules.isEmpty()) { try { EjbLogger.ROOT_LOGGER.debug("Sending initial module availability message, containing " + availableModules.size() + " module(s) to channel " + this.channelAssociation.getChannel()); this.sendModuleAvailability(availableModules.keySet().toArray(new DeploymentModuleIdentifier[availableModules.size()])); } catch (IOException e) { EjbLogger.ROOT_LOGGER.failedToSendModuleAvailabilityMessageToClient(e, this.channelAssociation.getChannel()); } } }
private EjbDeploymentInformation findBean(final String appName, final String moduleName, final String distinctName, final String beanName) { final ModuleDeployment module = deploymentRepository.getValue().getModules().get(new DeploymentModuleIdentifier(appName, moduleName, distinctName)); if (module == null) { throw MESSAGES.unknownDeployment(appName, moduleName, distinctName); } final EjbDeploymentInformation ejbInfo = module.getEjbs().get(beanName); if (ejbInfo == null) { throw MESSAGES.ejbNotFoundInDeployment(beanName, appName, moduleName, distinctName); } return ejbInfo; }
private EjbIIOPService serviceForLocator(final EJBLocator locator, DeploymentRepository deploymentRepository) { final ModuleDeployment module = deploymentRepository.getModules().get(new DeploymentModuleIdentifier(locator.getAppName(), locator.getModuleName(), locator.getDistinctName())); if (module == null) { EjbLogger.ROOT_LOGGER.couldNotFindEjbForLocatorIIOP(locator); return null; } final EjbDeploymentInformation ejb = module.getEjbs().get(locator.getBeanName()); if (ejb == null) { EjbLogger.ROOT_LOGGER.couldNotFindEjbForLocatorIIOP(locator); return null; } final EjbIIOPService factory = ejb.getIorFactory(); if (factory == null) { EjbLogger.ROOT_LOGGER.ejbNotExposedOverIIOP(locator); return null; } return factory; }