@Test(expected = RemoteException.class) public void testGetDeploymentEJBRequestRemoteException() throws RemoteException { final EJBMetaDataImpl ejbMetadata = new EJBMetaDataImpl(null, null, null, null, null, 0, InterfaceType.BUSINESS_REMOTE, null, null); final EJBRequest request = new EJBRequest(null, ejbMetadata, method, null, null, null); deploymentIndex.getDeployment(request); }
public BeanContext getDeployment(final EJBRequest req) throws RemoteException { final BeanContext info; final int deploymentCode = req.getDeploymentCode(); if (deploymentCode > 0 && deploymentCode < deployments.length) { info = deployments[deploymentCode]; req.setDeploymentId((String) info.getDeploymentID()); return info; } if (req.getDeploymentId() == null) { throw new RemoteException(messages.format("invalidDeploymentIdAndCode", req.getDeploymentId(), req.getDeploymentCode())); } final int idCode = getDeploymentIndex(req.getDeploymentId()); if (idCode == -1) { throw new RemoteException(messages.format("noSuchDeploymentIdAndCode", req.getDeploymentId(), req.getDeploymentCode())); } req.setDeploymentCode(idCode); if (req.getDeploymentCode() < 0 || req.getDeploymentCode() >= deployments.length) { throw new RemoteException(messages.format("invalidDeploymentIdAndCode", req.getDeploymentId(), req.getDeploymentCode())); } return deployments[req.getDeploymentCode()]; }
DeploymentIndex { public BeanContext getDeployment(final EJBRequest req) throws RemoteException { final BeanContext info; final int deploymentCode = req.getDeploymentCode(); if (deploymentCode > 0 && deploymentCode < deployments.length) { info = deployments[deploymentCode]; req.setDeploymentId((String) info.getDeploymentID()); return info; } if (req.getDeploymentId() == null) { throw new RemoteException(messages.format("invalidDeploymentIdAndCode", req.getDeploymentId(), req.getDeploymentCode())); } final int idCode = getDeploymentIndex(req.getDeploymentId()); if (idCode == -1) { throw new RemoteException(messages.format("noSuchDeploymentIdAndCode", req.getDeploymentId(), req.getDeploymentCode())); } req.setDeploymentCode(idCode); if (req.getDeploymentCode() < 0 || req.getDeploymentCode() >= deployments.length) { throw new RemoteException(messages.format("invalidDeploymentIdAndCode", req.getDeploymentId(), req.getDeploymentCode())); } return deployments[req.getDeploymentCode()]; } }
DeploymentIndex { public BeanContext getDeployment(final EJBRequest req) throws RemoteException { final BeanContext info; final int deploymentCode = req.getDeploymentCode(); if (deploymentCode > 0 && deploymentCode < deployments.length) { info = deployments[deploymentCode]; req.setDeploymentId((String) info.getDeploymentID()); return info; } if (req.getDeploymentId() == null) { throw new RemoteException(messages.format("invalidDeploymentIdAndCode", req.getDeploymentId(), req.getDeploymentCode())); } final int idCode = getDeploymentIndex(req.getDeploymentId()); if (idCode == -1) { throw new RemoteException(messages.format("noSuchDeploymentIdAndCode", req.getDeploymentId(), req.getDeploymentCode())); } req.setDeploymentCode(idCode); if (req.getDeploymentCode() < 0 || req.getDeploymentCode() >= deployments.length) { throw new RemoteException(messages.format("invalidDeploymentIdAndCode", req.getDeploymentId(), req.getDeploymentCode())); } return deployments[req.getDeploymentCode()]; } @SuppressWarnings("unchecked")  DeploymentIndex(final BeanContext[] beanContexts); }
DeploymentIndex { public BeanContext getDeployment(final EJBRequest req) throws RemoteException { final BeanContext info; final int deploymentCode = req.getDeploymentCode(); if (deploymentCode > 0 && deploymentCode < deployments.length) { info = deployments[deploymentCode]; req.setDeploymentId((String) info.getDeploymentID()); return info; } if (req.getDeploymentId() == null) { throw new RemoteException(messages.format("invalidDeploymentIdAndCode", req.getDeploymentId(), req.getDeploymentCode())); } final int idCode = getDeploymentIndex(req.getDeploymentId()); if (idCode == -1) { throw new RemoteException(messages.format("noSuchDeploymentIdAndCode", req.getDeploymentId(), req.getDeploymentCode())); } req.setDeploymentCode(idCode); if (req.getDeploymentCode() < 0 || req.getDeploymentCode() >= deployments.length) { throw new RemoteException(messages.format("invalidDeploymentIdAndCode", req.getDeploymentId(), req.getDeploymentCode())); } return deployments[req.getDeploymentCode()]; } @SuppressWarnings("unchecked")  DeploymentIndex(final BeanContext[] beanContexts); BeanContext getDeployment(final EJBRequest req); int getDeploymentIndex(final BeanContext deployment); int getDeploymentIndex(final String deploymentID); BeanContext getDeployment(final String deploymentID); BeanContext getDeployment(final Integer index); BeanContext getDeployment(final int index); }
DeploymentIndex { public BeanContext getDeployment(final EJBRequest req) throws RemoteException { final BeanContext info; final int deploymentCode = req.getDeploymentCode(); if (deploymentCode > 0 && deploymentCode < deployments.length) { info = deployments[deploymentCode]; req.setDeploymentId((String) info.getDeploymentID()); return info; } if (req.getDeploymentId() == null) { throw new RemoteException(messages.format("invalidDeploymentIdAndCode", req.getDeploymentId(), req.getDeploymentCode())); } final int idCode = getDeploymentIndex(req.getDeploymentId()); if (idCode == -1) { throw new RemoteException(messages.format("noSuchDeploymentIdAndCode", req.getDeploymentId(), req.getDeploymentCode())); } req.setDeploymentCode(idCode); if (req.getDeploymentCode() < 0 || req.getDeploymentCode() >= deployments.length) { throw new RemoteException(messages.format("invalidDeploymentIdAndCode", req.getDeploymentId(), req.getDeploymentCode())); } return deployments[req.getDeploymentCode()]; } @SuppressWarnings("unchecked")  DeploymentIndex(final BeanContext[] beanContexts); BeanContext getDeployment(final EJBRequest req); int getDeploymentIndex(final BeanContext deployment); int getDeploymentIndex(final String deploymentID); BeanContext getDeployment(final String deploymentID); BeanContext getDeployment(final Integer index); BeanContext getDeployment(final int index);  }