public Instance(Object deploymentId, Object primaryKey, Object bean, Map<String, Object> interceptors, EntityManager[] entityManagerArray) { this.deploymentInfo = (CoreDeploymentInfo) SystemInstance.get().getComponent(ContainerSystem.class).getDeploymentInfo(deploymentId); if (deploymentInfo == null) { throw new IllegalArgumentException("Unknown deployment " + deploymentId); } this.primaryKey = primaryKey; this.bean = bean; this.interceptors = interceptors; this.entityManagerArray = entityManagerArray; }
public Instance(Object deploymentId, Object primaryKey, Object bean, Map<String, Object> interceptors, EntityManager[] entityManagerArray) { this.deploymentInfo = (CoreDeploymentInfo) SystemInstance.get().getComponent(ContainerSystem.class).getDeploymentInfo(deploymentId); if (deploymentInfo == null) { throw new IllegalArgumentException("Unknown deployment " + deploymentId); } this.primaryKey = primaryKey; this.bean = bean; this.interceptors = interceptors; this.entityManagerArray = entityManagerArray; }
this.statelessBeans.remove(containerSystem.getDeploymentInfo(bean.ejbDeploymentId).getBeanClass()); break; case EnterpriseBeanInfo.STATEFUL: this.statefulBeans.remove(containerSystem.getDeploymentInfo(bean.ejbDeploymentId).getBeanClass()); break; case EnterpriseBeanInfo.SINGLETON: this.singletonBeans.remove(containerSystem.getDeploymentInfo(bean.ejbDeploymentId).getBeanClass()); break; default:
public DeploymentInfo getDeploymentInfo() { if (deploymentInfo != null) { return deploymentInfo; } else if (deploymentId != null) { ContainerSystem containerSystem = SystemInstance.get().getComponent(ContainerSystem.class); DeploymentInfo deploymentInfoFromContainer = containerSystem.getDeploymentInfo(deploymentId); return deploymentInfoFromContainer; } return null; }
statelessList.add(containerSystem.getDeploymentInfo(bean.ejbDeploymentId)); break; case EnterpriseBeanInfo.STATEFUL: statefulList.add(containerSystem.getDeploymentInfo(bean.ejbDeploymentId)); break; case EnterpriseBeanInfo.SINGLETON: singletonList.add(containerSystem.getDeploymentInfo(bean.ejbDeploymentId)); break; default:
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { in.defaultReadObject(); ContainerSystem containerSystem = SystemInstance.get().getComponent(ContainerSystem.class); setDeploymentInfo(containerSystem.getDeploymentInfo(deploymentID)); container = (RpcContainer) getDeploymentInfo().getContainer(); if (IntraVmCopyMonitor.isCrossClassLoaderOperation()) { setDoCrossClassLoaderCopy(true); } setInterfaces((List<Class>) in.readObject()); setMainInterface((Class) in.readObject()); }
public Timer getTimer() { ContainerSystem containerSystem = SystemInstance.get().getComponent(ContainerSystem.class); if (containerSystem == null) { throw new NoSuchObjectLocalException("OpenEJb container system is not running"); } DeploymentInfo deploymentInfo = containerSystem.getDeploymentInfo(deploymentId); if (deploymentInfo == null) { throw new NoSuchObjectLocalException("Deployment info not found " + deploymentId); } EjbTimerService timerService = deploymentInfo.getEjbTimerService(); if (timerService == null) { throw new NoSuchObjectLocalException("Deployment no longer supports ejbTimout " + deploymentId + ". Has this ejb been redeployed?"); } Timer timer = timerService.getTimer(id); if (timer == null) { throw new NoSuchObjectLocalException("Timer not found for ejb " + deploymentId); } return timer; } }
DeploymentInfo deploymentInfo = containerSystem.getDeploymentInfo(deploymentId);