Class ReadOnlyBeanContainer
java.lang.Object
com.sun.ejb.containers.BaseContainer
org.glassfish.persistence.ejb.entitybean.container.EntityContainer
org.glassfish.persistence.ejb.entitybean.container.ReadOnlyBeanContainer
- All Implemented Interfaces:
com.sun.appserv.util.cache.CacheListener,com.sun.ejb.Container,com.sun.enterprise.container.common.spi.JavaEEContainer,org.glassfish.enterprise.iiop.spi.EjbContainerFacade,ReadOnlyBeanRefreshEventHandler
public class ReadOnlyBeanContainer
extends EntityContainer
implements ReadOnlyBeanRefreshEventHandler
The Container that manages instances of ReadOnly Beans. This container
blocks all calls to ejbStore() and selectively performs ejbLoad()
- Author:
- Mahesh Kannan, Pramod Gopinath
-
Nested Class Summary
Nested classes/interfaces inherited from class org.glassfish.persistence.ejb.entitybean.container.EntityContainer
EntityContainer.CacheProperties, EntityContainer.EJBObjectCacheVictimHandler, EntityContainer.LocalEJBObjectCacheVictimHandlerNested classes/interfaces inherited from class com.sun.ejb.containers.BaseContainer
com.sun.ejb.containers.BaseContainer.ContainerInfo, com.sun.ejb.containers.BaseContainer.ContainerType, com.sun.ejb.containers.BaseContainer.PreInvokeException -
Field Summary
Fields inherited from class org.glassfish.persistence.ejb.entitybean.container.EntityContainer
_maxBuckets, beanCacheDes, beanPoolDes, DEFAULT_CACHE_SIZE, DEFAULT_LOAD_FACTOR, defaultCacheEJBO, ejbContainer, ejbLocalObjectStore, ejbObjectStore, ejboRemoved, entityCtxPool, HIGH_WATER_MARK, iased, idleEJBObjectPassivator, idleLocalEJBObjectPassivator, isContainerManagedPers, isReentrant, passivationCandidates, readyStore, totalPassivationErrors, totalPassivationsFields inherited from class com.sun.ejb.containers.BaseContainer
cacheProbeListener, cacheProbeNotifier, callFlowInfo, componentId, CONTAINER_INITIALIZING, CONTAINER_ON_HOLD, CONTAINER_STARTED, CONTAINER_STOPPED, CONTAINER_UNDEPLOYED, containerInfo, containerState, containerStateManager, containerTransactionManager, debugMonitorFlag, ejbActivateMethod, ejbClass, ejbContainerUtilImpl, ejbDescriptor, ejbGeneratedOptionalLocalBusinessIntfClass, ejbHome, ejbHomeImpl, ejbHomeStub, ejbIntfMethodInfo, ejbIntfMethods, ejbLocalBusinessHome, ejbLocalBusinessHomeImpl, ejbLocalHome, ejbLocalHomeImpl, EJBLocalObject_getPrimaryKey, EJBObject_getPrimaryKey, ejbOptionalLocalBusinessHome, ejbOptionalLocalBusinessHomeImpl, ejbOptionalLocalBusinessHomeIntf, ejbPassivateMethod, ejbProbeListener, ejbProbeNotifier, ejbRemoteBusinessHome, ejbRemoteBusinessHomeImpl, ejbRemoteBusinessHomeStub, ejbRemoveMethod, envProps, hasLocalBusinessView, hasLocalHomeView, hasOptionalLocalBusinessView, hasRemoteBusinessView, hasRemoteHomeView, homeIntf, injectionManager, interceptorManager, invocationInfoMap, invocationManager, isBeanManagedTran, isLocal, isMessageDriven, isRemote, isSession, isSingleton, isStatefulSession, isStatelessSession, isWebServiceEndpoint, loader, localBusinessHomeIntf, localBusinessIntfs, localHomeIntf, metadata, methodMonitorMap, monitorOn, namingManager, NO_PARAMS, optIntfClassLoader, poolProbeListener, remoteBusinessHomeIntf, remoteBusinessIntfInfo, remoteHomeRefFactory, remoteIntf, scheduleIds, securityManager, sfsbSerializedClass, SINGLETON_BEAN_POOL_PROP, timerProbeListener, timerProbeNotifier, transactionManager, webServiceEndpointIntf, webServiceInvocationInfoMapFields inherited from interface com.sun.ejb.Container
SEC_CHECKED, SEC_EXCLUDED, SEC_NOT_INITIALIZED, SEC_UNCHECKED, secAttrStrings, TX_BEAN_MANAGED, TX_MANDATORY, TX_NEVER, TX_NOT_INITIALIZED, TX_NOT_SUPPORTED, TX_REQUIRED, TX_REQUIRES_NEW, TX_SUPPORTS, txAttrStrings -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedReadOnlyBeanContainer(org.glassfish.ejb.deployment.descriptor.EjbDescriptor desc, ClassLoader loader, com.sun.enterprise.security.SecurityManager sm) -
Method Summary
Modifier and TypeMethodDescriptionprotected com.sun.ejb.ComponentContext_getContext(com.sun.ejb.EjbInvocation inv) Called from BaseContainer.preInvoke which is called from the EJBObject for local and remote invocations, and from the EJBHome for create/find.protected voidprotected voidafterNewlyActivated(EntityContextImpl context) protected voidcallEJBLoad(jakarta.ejb.EntityBean ejb, EntityContextImpl entityCtx, boolean activeTx) protected voidcallEJBRemove(jakarta.ejb.EntityBean ejb, EntityContextImpl context) protected voidcallEJBStore(jakarta.ejb.EntityBean ejb, EntityContextImpl context) protected EntityContextImplcreateEntityContextInstance(jakarta.ejb.EntityBean ejb, EntityContainer entityContainer) protected voiddoConcreteContainerShutdown(boolean appBeingUndeployed) protected voidforceDestroyBean(com.sun.ejb.containers.EJBContextImpl context) Discard the bean instance.protected com.sun.ejb.containers.EJBHomeInvocationHandlergetEJBHomeInvocationHandler(Class homeIntfClass) protected com.sun.ejb.containers.EJBLocalHomeInvocationHandlergetEJBLocalHomeInvocationHandler(Class homeIntfClass) voidCalled from DistributedReadOnlyBeanServiceImpl when a refreshAll message arrives at this instancevoidhandleRefreshRequest(Object primaryKey) Called from DistributedReadOnlyBeanServiceImpl when a refresh message arrives at this instanceprotected voidCalled from the ContainerFactory during initialization.protected ObjectinvokeFindByPrimaryKey(Method method, com.sun.ejb.EjbInvocation inv, Object[] args) protected ObjectinvokeTargetBeanMethod(Method beanClassMethod, com.sun.ejb.EjbInvocation inv, Object target, Object[] params, com.sun.enterprise.security.SecurityManager mgr) Convert a collection of primary keys to a collection of EJBObjects.voidpreInvoke(com.sun.ejb.EjbInvocation inv) protected voidpreInvokeNoTx(com.sun.ejb.EjbInvocation inv) protected voidremoveBean(com.sun.ejb.containers.EJBLocalRemoteObject ejbo, Method removeMethod, boolean local) voidsetRefreshFlag(Object primaryKey) Methods inherited from class org.glassfish.persistence.ejb.entitybean.container.EntityContainer
activateEJBFromPool, addProxyInterfacesSetClass, addReadyEJB, adjustHomeTargetMethodInfo, adjustInvocationInfo, afterBegin, afterCompletion, authorizeLocalGetPrimaryKey, authorizeRemoteGetPrimaryKey, beforeCompletion, cancelTimerTasks, checkExists, checkUnfinishedTx, createEJBLocalObjectImpl, createEJBObjectImpl, createEJBObjectStores, createReadyStore, destroyReadyStoreOnUndeploy, doEJBHomeRemove, doFlush, doTimerInvocationInit, getEJBLocalObjectForPrimaryKey, getEJBLocalObjectForPrimaryKey, getEJBLocalObjectImpl, getEJBObjectForPrimaryKey, getEJBObjectImpl, getMaxCacheSize, getMaxPoolSize, getMonitoringStatsProvider, getPooledCount, getPooledEJB, getReadyCount, getReadyEJB, getSteadyPoolSize, internalGetEJBLocalObjectImpl, internalGetEJBLocalObjectImpl, internalGetEJBLocalObjectImpl, isIdentical, onReady, passivateAndPoolEJB, passivateEJB, postCreate, postInvokeNoTx, postProcessInvocationInfo, preCreate, preFind, preInitialize, preSelect, registerMonitorableComponents, releaseContext, removeBean, removeBeanUnchecked, removeBeanUnchecked, removeContextFromReadyStore, removeIncompleteTxEJB, setEJBMetaData, setupIdleBeansPassivator, trimEvent, validateTxAttr, willInvokeWithClientTxMethods inherited from class com.sun.ejb.containers.BaseContainer
_constructEJBContextImpl, _constructEJBInstance, addInvocationInfo, addLocalRemoteInvocationInfo, assertValidLocalObject, assertValidRemoteObject, authorize, authorizeLocalMethod, authorizeRemoteMethod, callEJBTimeout, cancelTimers, checkExceptionClientTx, checkUserTransactionLookup, cleanupInstance, containerStateToString, createCallFlowAgent, createEjbInstanceAndContext, createEjbInstanceForInterceptors, createEjbInvocation, createEjbInvocation, createMonitoringRegistry, createRemoteReferenceWithId, delistExtendedEntityManagers, doAfterBegin, enlistExtendedEntityManagers, externalPostInvoke, externalPreInvoke, findFlushEnabledAttr, getApplicationId, getClassLoader, getComponentId, getContainerClassLoader, getContainerId, getContainerInfo, getContext, getDebugMonitorFlag, getDescriptor, getEJBClass, getEjbDescriptor, getEJBHome, getEJBHomeStub, getEJBLocalBusinessHome, getEJBLocalHome, getEJBMetaData, getInvocationKey, getJaccEjb, getJavaGlobalJndiNamePrefix, getMonitoringMethodsArray, getMonitoringMethodsArray, getPassByReference, getPre30LifecycleMethodNames, getProtocolManager, getSecurityManager, getTargetObject, getTimeoutMethod, getTxAttr, getTxAttr, getTxAttrForLifecycleCallback, getUserTransaction, getUseThreadPoolId, incrementCreatedTimedObject, incrementDeliveredTimedObject, incrementRemovedTimedObject, initializeProtocolManager, injectEjbInstance, instantiateEJBLocalBusinessObjectImpl, instantiateEJBLocalObjectImpl, instantiateEJBLocalObjectImpl, instantiateEJBObjectImpl, instantiateEJBObjectImpl, instantiateOptionalEJBLocalBusinessObjectImpl, instantiateRemoteBusinessObjectImpl, intercept, intercept, invokeBeanMethod, isApplicationException, isCreateHomeFinder, isEjbTimeoutMethod, isHAEnabled, isLocalInterfaceSupported, isLocalObject, isRemoteInterfaceSupported, isRemoteObject, isStopped, isSystemUncheckedException, isTimedObject, isUndeployed, lookupExtendedEntityManager, onEnteringContainer, onLeavingContainer, onShutdown, onTermination, postEjbTimeout, postInvoke, postInvoke, postInvokeTx, preInvokeTx, prepareEjbTimeoutParams, registerSystemInterceptor, registerTimerMonitorableComponent, releaseTargetObject, resumeTransaction, scanForEjbCreateMethod, setDebugMonitorFlag, setStartedState, setStoppedState, setUndeployedState, startApplication, suspendTransaction, toString, undeploy, useClientTx, userTransactionMethodsAllowed, validateEMForClientTx, webServicePostInvokeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.glassfish.persistence.ejb.entitybean.container.distributed.ReadOnlyBeanRefreshEventHandler
getClassLoader
-
Constructor Details
-
ReadOnlyBeanContainer
protected ReadOnlyBeanContainer(org.glassfish.ejb.deployment.descriptor.EjbDescriptor desc, ClassLoader loader, com.sun.enterprise.security.SecurityManager sm) throws Exception - Throws:
Exception
-
-
Method Details
-
callEJBStore
- Overrides:
callEJBStorein classEntityContainer
-
_getContext
protected com.sun.ejb.ComponentContext _getContext(com.sun.ejb.EjbInvocation inv) Description copied from class:EntityContainerCalled from BaseContainer.preInvoke which is called from the EJBObject for local and remote invocations, and from the EJBHome for create/find.- Overrides:
_getContextin classEntityContainer
-
callEJBLoad
protected void callEJBLoad(jakarta.ejb.EntityBean ejb, EntityContextImpl entityCtx, boolean activeTx) throws Exception - Overrides:
callEJBLoadin classEntityContainer- Throws:
Exception
-
callEJBRemove
protected void callEJBRemove(jakarta.ejb.EntityBean ejb, EntityContextImpl context) throws Exception - Overrides:
callEJBRemovein classEntityContainer- Throws:
Exception
-
doConcreteContainerShutdown
protected void doConcreteContainerShutdown(boolean appBeingUndeployed) - Overrides:
doConcreteContainerShutdownin classEntityContainer
-
preInvokeNoTx
protected void preInvokeNoTx(com.sun.ejb.EjbInvocation inv) - Overrides:
preInvokeNoTxin classEntityContainer
-
afterNewlyActivated
- Overrides:
afterNewlyActivatedin classEntityContainer
-
addPooledEJB
- Overrides:
addPooledEJBin classEntityContainer
-
forceDestroyBean
protected void forceDestroyBean(com.sun.ejb.containers.EJBContextImpl context) Description copied from class:EntityContainerDiscard the bean instance. The bean's persistent state is not removed. This is usually called when the bean instance throws a system exception, from BaseContainer.postInvokeTx, getReadyEJB, afterBegin, beforeCompletion, passivateEJB.- Overrides:
forceDestroyBeanin classEntityContainer
-
preInvoke
public void preInvoke(com.sun.ejb.EjbInvocation inv) - Specified by:
preInvokein interfacecom.sun.ejb.Container- Overrides:
preInvokein classcom.sun.ejb.containers.BaseContainer
-
invokeTargetBeanMethod
protected Object invokeTargetBeanMethod(Method beanClassMethod, com.sun.ejb.EjbInvocation inv, Object target, Object[] params, com.sun.enterprise.security.SecurityManager mgr) throws Throwable - Overrides:
invokeTargetBeanMethodin classcom.sun.ejb.containers.BaseContainer- Throws:
Throwable
-
removeBean
protected void removeBean(com.sun.ejb.containers.EJBLocalRemoteObject ejbo, Method removeMethod, boolean local) throws jakarta.ejb.RemoveException, jakarta.ejb.EJBException, RemoteException - Overrides:
removeBeanin classEntityContainer- Throws:
jakarta.ejb.RemoveExceptionjakarta.ejb.EJBExceptionRemoteException
-
initializeHome
Description copied from class:EntityContainerCalled from the ContainerFactory during initialization.- Overrides:
initializeHomein classEntityContainer- Throws:
Exception
-
getEJBHomeInvocationHandler
protected com.sun.ejb.containers.EJBHomeInvocationHandler getEJBHomeInvocationHandler(Class homeIntfClass) throws Exception - Overrides:
getEJBHomeInvocationHandlerin classEntityContainer- Throws:
Exception
-
getEJBLocalHomeInvocationHandler
protected com.sun.ejb.containers.EJBLocalHomeInvocationHandler getEJBLocalHomeInvocationHandler(Class homeIntfClass) throws Exception - Overrides:
getEJBLocalHomeInvocationHandlerin classEntityContainer- Throws:
Exception
-
setRefreshFlag
-
handleRefreshRequest
Description copied from interface:ReadOnlyBeanRefreshEventHandlerCalled from DistributedReadOnlyBeanServiceImpl when a refresh message arrives at this instance- Specified by:
handleRefreshRequestin interfaceReadOnlyBeanRefreshEventHandler- Parameters:
primaryKey- the primary key that needs to be refreshed
-
handleRefreshAllRequest
public void handleRefreshAllRequest()Description copied from interface:ReadOnlyBeanRefreshEventHandlerCalled from DistributedReadOnlyBeanServiceImpl when a refreshAll message arrives at this instance- Specified by:
handleRefreshAllRequestin interfaceReadOnlyBeanRefreshEventHandler
-
createEntityContextInstance
protected EntityContextImpl createEntityContextInstance(jakarta.ejb.EntityBean ejb, EntityContainer entityContainer) - Overrides:
createEntityContextInstancein classEntityContainer
-
invokeFindByPrimaryKey
protected Object invokeFindByPrimaryKey(Method method, com.sun.ejb.EjbInvocation inv, Object[] args) throws Throwable - Overrides:
invokeFindByPrimaryKeyin classEntityContainer- Throws:
Throwable
-
postFind
public Object postFind(com.sun.ejb.EjbInvocation inv, Object primaryKeys, Object[] findParams) throws jakarta.ejb.FinderException Description copied from class:EntityContainerConvert a collection of primary keys to a collection of EJBObjects. (special case: single primary key). Note: the order of input & output collections must be maintained. Null values are preserved in both the single primary key return and collection-valued return cases. This is called from the generated "HelloEJBHomeImpl" find* method, after ejb.ejbFind**() has been called. Note: postFind will not be called if ejbFindXXX throws an exception- Specified by:
postFindin interfacecom.sun.ejb.Container- Overrides:
postFindin classEntityContainer- Throws:
jakarta.ejb.FinderException
-