@Override public StatefulContainer getContainer() { if (container == null) { container = (StatefulContainer) Ejb3Registry.findContainer(containerGuid); if (isClustered && container == null) container = (StatefulContainer) Ejb3Registry.getClusterContainer(containerClusterUid); } return container; }
public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment) throws Exception { Reference ref = (Reference) obj; String containerGuid = (String) ref.get("containerGuid").getContent(); boolean isClustered = Boolean.getBoolean((String)ref.get("isClustered").getContent()); EJBContainer container = (EJBContainer)Ejb3Registry.getContainer(containerGuid); if (container == null && isClustered) { String containerClusterUid = (String) ref.get("containerClusterUid").getContent(); container = (EJBContainer)Ejb3Registry.getClusterContainer(containerClusterUid); } return container.peekContext().getEJBContext(); } }
container = (StatefulContainer)Ejb3Registry.getClusterContainer(containerClusterUid);
public StatefulBeanContext getBeanContext() { if (beanContext == null) { StatefulContainer container = (StatefulContainer)Ejb3Registry.findContainer(containerGuid); if (isClustered && container == null) container = (StatefulContainer)Ejb3Registry.getClusterContainer(containerClusterUid); // We are willing to accept a context that has been marked as removed // as it can still hold nested children beanContext = container.getCache().get(oid, false); assert beanContext != null : "beanContext no longer in cache"; } return beanContext; } }
protected SessionContext getDelegate() { if(delegate == null) { StatefulContainer container = (StatefulContainer)Ejb3Registry.getContainer(containerGuid); if (container == null && isClustered) container = (StatefulContainer)Ejb3Registry.getClusterContainer(containerClusterUid); delegate = new StatefulSessionContextDelegate(container.getCache().get(id, false)); } return delegate; }
container = Ejb3Registry.getClusterContainer(Ejb3Registry.clusterUid(oid, partitionName));