/** * Unregisters a container. * * @param container the container to unregister * @throws IllegalStateException if the container is not registered */ public static void unregister(Container container) { String guid = guid(container); if(!hasContainer(guid)) throw new IllegalStateException("Container " + guid + " + is not registered"); containers.remove(guid); if (container.isClustered()) clusterContainers.remove(clusterUid(container)); log.debug("Unregistered container " + guid); }
/** * Registers a container. * * @param container the container to register * @throws IllegalStateException if the container is already registered */ public static void register(Container container) { String guid = guid(container); if(hasContainer(guid)) throw new IllegalStateException("Container " + guid + " + is already registered"); containers.put(guid, container); if (container.isClustered()) clusterContainers.put(clusterUid(container), container); log.debug("Registered container " + guid); }
/** * An incoming context from serialization. * * @param container * @param beanMO */ protected StatefulBeanContext(StatefulContainer container, MarshalledObject beanMO) { super(container); assert beanMO != null : "beanMO is null"; this.containerClusterUid = Ejb3Registry.clusterUid(container); this.containerGuid = Ejb3Registry.guid(container); this.isClustered = container.isClustered(); this.beanMO = beanMO; }
/** * A brand new stateful session bean. * * @param container * @param bean */ protected StatefulBeanContext(StatefulContainer container, Object bean) { super(container, bean); this.containerClusterUid = Ejb3Registry.clusterUid(container); this.containerGuid = Ejb3Registry.guid(container); this.isClustered = container.isClustered(); this.id = new GUID(); }
container = Ejb3Registry.getClusterContainer(Ejb3Registry.clusterUid(oid, partitionName));
public StatefulBeanContextReference(StatefulBeanContext beanContext) { assert beanContext != null : "beanContext is null"; this.beanContext = beanContext; oid = beanContext.getId(); containerGuid = Ejb3Registry.guid(beanContext.getContainer()); containerClusterUid = Ejb3Registry.clusterUid(beanContext.getContainer()); isClustered = beanContext.getContainer().isClustered(); }
public StatefulSessionContextImpl(StatefulBeanContext beanContext) { assert beanContext != null : "beanContext is null"; this.delegate = new StatefulSessionContextDelegate(beanContext); this.containerGuid = Ejb3Registry.guid(beanContext.getContainer()); this.containerClusterUid =Ejb3Registry.clusterUid(beanContext.getContainer()); this.id = beanContext.getId(); this.isClustered = beanContext.getContainer().isClustered(); }