Package com.sun.ejb.containers
Class BaseContainer
- java.lang.Object
-
- com.sun.ejb.containers.BaseContainer
-
- All Implemented Interfaces:
Container,com.sun.enterprise.container.common.spi.JavaEEContainer,org.glassfish.enterprise.iiop.spi.EjbContainerFacade
- Direct Known Subclasses:
AbstractSingletonContainer,StatefulSessionContainer,StatelessSessionContainer
public abstract class BaseContainer extends Object implements Container, org.glassfish.enterprise.iiop.spi.EjbContainerFacade, com.sun.enterprise.container.common.spi.JavaEEContainer
This class implements part of the com.sun.ejb.Container interface. It implements the container's side of the EJB-to-Container contract definweed by the EJB 2.0 spec. It contains code shared by SessionBeans, EntityBeans and MessageDrivenBeans. Its subclasses provide the remaining implementation of the container functionality.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBaseContainer.ContainerInfoStrings for monitoring infostatic classBaseContainer.ContainerTypestatic classBaseContainer.PreInvokeExceptionPreInvokeException is used to wrap exceptions thrown from BaseContainer.preInvoke, so it indicates that the bean's method will not be called.
-
Field Summary
-
Fields 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
Constructors Modifier Constructor Description protectedBaseContainer(BaseContainer.ContainerType type, EjbDescriptor ejbDesc, ClassLoader loader, com.sun.enterprise.security.SecurityManager sm)This constructor is called from ContainerFactoryImpl when an EJB Jar is deployed.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected EJBContextImpl_constructEJBContextImpl(Object instance)protected Object_constructEJBInstance()protected abstract ComponentContext_getContext(EjbInvocation inv)protected InvocationInfoaddInvocationInfo(Method method, String methodIntf, Class originalIntf)protected voidaddLocalRemoteInvocationInfo()protected voidaddProxyInterfacesSetClass(Set proxyInterfacesSet, boolean local)protected voidadjustHomeTargetMethodInfo(InvocationInfo invInfo, String methodName, Class[] paramTypes)protected voidadjustInvocationInfo(InvocationInfo invInfo, Method method, int txAttr, boolean flushEnabled, String methodIntf, Class originalIntf)protected abstract voidafterBegin(EJBContextImpl context)protected abstract voidafterCompletion(EJBContextImpl context, int status)voidassertValidLocalObject(Object o)Verify that a given object is an EJBLocalObject of an ejb from this ejb container.voidassertValidRemoteObject(Object o)Asserts validity of RemoteHome objects.booleanauthorize(EjbInvocation invocation)Common code to handle EJB security manager authorization call.protected voidauthorizeLocalGetPrimaryKey(EJBLocalRemoteObject ejbObj)protected voidauthorizeLocalMethod(int method)Check if caller is authorized to invoke the method.protected voidauthorizeRemoteGetPrimaryKey(EJBLocalRemoteObject ejbObj)protected voidauthorizeRemoteMethod(int method)Check if caller is authorized to invoke the method.protected abstract voidbeforeCompletion(EJBContextImpl context)protected booleancallEJBTimeout(RuntimeTimerState timerState, EJBTimerService timerService)protected voidcancelTimers(Object key)protected ThrowablecheckExceptionClientTx(EJBContextImpl context, Throwable exception)protected voidcheckExists(EJBLocalRemoteObject ejbObj)Check if the given EJBObject/LocalObject has been removed.protected voidcheckUnfinishedTx(jakarta.transaction.Transaction prevTx, EjbInvocation inv)voidcheckUserTransactionLookup(org.glassfish.api.invocation.ComponentInvocation inv)protected voidcleanupInstance(EJBContextImpl context)protected static StringcontainerStateToString(int state)protected voidcreateCallFlowAgent(com.sun.enterprise.admin.monitor.callflow.ComponentType compType)protected EJBContextImplcreateEjbInstanceAndContext()voidcreateEjbInstanceForInterceptors(Object[] params, EJBContextImpl ctx)protected EjbInvocationcreateEjbInvocation()protected EjbInvocationcreateEjbInvocation(Object ejb, ComponentContext context)protected EJBLocalObjectImplcreateEJBLocalObjectImpl()protected abstract EJBObjectImplcreateEJBObjectImpl()protected voidcreateMonitoringRegistry()RemotecreateRemoteReferenceWithId(byte[] instanceKey, String generatedRemoteBusinessIntf)Create an EJBObject reference from the instanceKey Called from EJBObjectOutputStream.SerializableRemoteRef during deserialization of a remote-refprotected voiddelistExtendedEntityManagers(ComponentContext ctx)voiddoAfterBegin(org.glassfish.api.invocation.ComponentInvocation ci)Called from the TM when an EJB with Bean-Managed transactions starts a txprotected abstract voiddoConcreteContainerShutdown(boolean appBeingUndeployed)protected voiddoEJBHomeRemove(Object pk, Method m, boolean isLocal)protected voiddoFlush(EjbInvocation inv)protected voiddoTimerInvocationInit(EjbInvocation inv, Object primaryKey)This is implemented by concrete containers that support TimedObjects.protected voidenlistExtendedEntityManagers(ComponentContext ctx)voidexternalPostInvoke()Performs post external invocation cleanup such as restoring the original class loader.voidexternalPreInvoke()Performs pre external invocation setup such as setting application context class loader.protected booleanfindFlushEnabledAttr(com.sun.enterprise.deployment.MethodDescriptor md)protected abstract voidforceDestroyBean(EJBContextImpl sc)longgetApplicationId()ClassLoadergetClassLoader()StringgetComponentId()Called from NamingManagerImpl during java:comp/env lookup.ClassLoadergetContainerClassLoader()protected longgetContainerId()BaseContainer.ContainerTypegetContainerType()protected ComponentContextgetContext(EjbInvocation inv)booleangetDebugMonitorFlag()org.glassfish.deployment.common.DescriptorgetDescriptor()Method defined on JavaEEContainerClassgetEJBClass()EjbDescriptorgetEjbDescriptor()jakarta.ejb.EJBHomegetEJBHome()protected EJBHomeInvocationHandlergetEJBHomeInvocationHandler(Class homeIntfClass)jakarta.ejb.EJBHomegetEJBHomeStub()GenericEJBLocalHomegetEJBLocalBusinessHome(String clientViewClassName)Return an object that implements ejb's local business home interface.jakarta.ejb.EJBLocalHomegetEJBLocalHome()Return an object that implements ejb's local home interface.protected EJBLocalHomeInvocationHandlergetEJBLocalHomeInvocationHandler(Class homeIntfClass)jakarta.ejb.EJBLocalObjectgetEJBLocalObjectForPrimaryKey(Object pkey)jakarta.ejb.EJBLocalObjectgetEJBLocalObjectForPrimaryKey(Object pkey, jakarta.ejb.EJBContext ctx)Obtain an Entity EJBLocalObject corresponding to the primary key.protected EJBLocalObjectImplgetEJBLocalObjectImpl(Object key)jakarta.ejb.EJBMetaDatagetEJBMetaData()jakarta.ejb.EJBObjectgetEJBObjectForPrimaryKey(Object pkey)Obtain an Entity EJBObject corresponding to the primary key.protected abstract EJBObjectImplgetEJBObjectImpl(byte[] streamKey)Called when a remote invocation arrives for an EJB.protected ObjectgetInvocationKey(EjbInvocation inv)ObjectgetJaccEjb(EjbInvocation ejbInvocation)Called-back from security implementation through EjbInvocation when a jacc policy provider wants an enterprise bean instance.protected StringgetJavaGlobalJndiNamePrefix()protected String[]getMonitoringMethodsArray()protected String[]getMonitoringMethodsArray(boolean hasGeneratedClasses)protected abstract EjbMonitoringStatsProvidergetMonitoringStatsProvider(String appName, String modName, String ejbName)booleangetPassByReference()protected String[]getPre30LifecycleMethodNames()protected org.glassfish.enterprise.iiop.api.ProtocolManagergetProtocolManager()com.sun.enterprise.security.SecurityManagergetSecurityManager()RemotegetTargetObject(byte[] instanceKey, String generatedRemoteBusinessIntf)Return the EJBObject/EJBHome Proxy for the given ejbId and instanceKey.protected MethodgetTimeoutMethod(RuntimeTimerState timerState)protected intgetTxAttr(EjbInvocation inv)protected intgetTxAttr(Method method, String methodIntf)protected intgetTxAttrForLifecycleCallback(Set<com.sun.enterprise.deployment.LifecycleCallbackDescriptor> lifecycleCallbackDescriptors, int defaultTxAttr, int... validateTxAttr)jakarta.transaction.UserTransactiongetUserTransaction()StringgetUseThreadPoolId()protected voidincrementCreatedTimedObject()protected voidincrementDeliveredTimedObject()protected voidincrementRemovedTimedObject()protected voidinitializeHome()Called from the ContainerFactory during initialization.protected voidinitializeProtocolManager()protected voidinjectEjbInstance(EJBContextImpl context)protected EJBLocalObjectImplinstantiateEJBLocalBusinessObjectImpl()protected EJBLocalObjectImplinstantiateEJBLocalObjectImpl()protected EJBLocalObjectImplinstantiateEJBLocalObjectImpl(Object key)protected EJBObjectImplinstantiateEJBObjectImpl()protected EJBObjectImplinstantiateEJBObjectImpl(jakarta.ejb.EJBObject ejbStub, Object key)protected EJBLocalObjectImplinstantiateOptionalEJBLocalBusinessObjectImpl()protected EJBObjectImplinstantiateRemoteBusinessObjectImpl()protected Objectintercept(EjbInvocation inv)Called from various places within the container that are responsible for dispatching invocations to business methods.booleanintercept(com.sun.enterprise.deployment.LifecycleCallbackDescriptor.CallbackType eventType, EJBContextImpl ctx)ObjectinvokeBeanMethod(EjbInvocation invocation)Called from Interceptor Chain to invoke the actual bean method.protected ObjectinvokeFindByPrimaryKey(Method method, EjbInvocation inv, Object[] args)protected ObjectinvokeTargetBeanMethod(Method beanClassMethod, EjbInvocation inv, Object target, Object[] params, com.sun.enterprise.security.SecurityManager mgr)protected booleanisApplicationException(Throwable exception)protected booleanisCreateHomeFinder(Method method)protected booleanisEjbTimeoutMethod(Method m)booleanisHAEnabled()protected booleanisIdentical(EJBObjectImpl ejbo, jakarta.ejb.EJBObject other)protected booleanisLocalInterfaceSupported()booleanisLocalObject()Returns true if the bean associated with this Container has a LocalHome/Local view OR a Local business view OR both.protected booleanisRemoteInterfaceSupported()booleanisRemoteObject()Returns true if the bean associated with this Container has a RemoteHome/Remote view OR a Remote business view OR both.booleanisStopped()protected booleanisSystemUncheckedException(Throwable exception)booleanisTimedObject()Returns true if this Container uses EJB Timer Service.booleanisUndeployed()jakarta.persistence.EntityManagerlookupExtendedEntityManager(jakarta.persistence.EntityManagerFactory emf)Containers that allow extended EntityManager will override this method.voidonEnteringContainer()voidonLeavingContainer()voidonReady()Called when server instance is ReadyvoidonShutdown()Container shutdown event.voidonTermination()Called when server instance is terminating.protected abstract booleanpassivateEJB(ComponentContext context)voidpostCreate(EjbInvocation inv, Object primaryKey)Called by the EJB(Local)Home after invoking ejbCreate on an EntityBean.protected booleanpostEjbTimeout(RuntimeTimerState timerState, EJBTimerService timerService)ObjectpostFind(EjbInvocation inv, Object primaryKeys, Object[] findParams)Called by the EJB(Local)Home after invoking ejbFind* on an EntityBean.voidpostInvoke(EjbInvocation inv)Called from EJBObject/EJBHome after invoking on bean.protected voidpostInvoke(EjbInvocation inv, boolean doTxProcessing)protected voidpostInvokeNoTx(EjbInvocation inv)protected voidpostInvokeTx(EjbInvocation inv)postInvokeTx is called after every invocation on the EJB instance, including ejbCreate/ejbFind---/ejbRemove.protected InvocationInfopostProcessInvocationInfo(InvocationInfo invInfo)protected voidpreInitialize(EjbDescriptor ejbDesc, ClassLoader loader)voidpreInvoke(EjbInvocation inv)Called from EJBObject/EJBHome before invoking on EJB.protected voidpreInvokeNoTx(EjbInvocation inv)protected voidpreInvokeTx(EjbInvocation inv)This is called from preInvoke before every method invocation on the EJB instance, including ejbCreate, ejbFind*, ejbRemove.protected voidprepareEjbTimeoutParams(EjbInvocation inv, RuntimeTimerState timerState, EJBTimerService timerService)voidpreSelect()Notification from persistence manager than an ejbSelect query is about to be invoked on a bean of the ejb type for this container.protected voidregisterMonitorableComponents()protected voidregisterTimerMonitorableComponent()protected abstract voidreleaseContext(EjbInvocation inv)voidreleaseTargetObject(Remote remoteObj)Release the EJBObject/EJBHome object.protected abstract voidremoveBean(EJBLocalRemoteObject ejbo, Method removeMethod, boolean local)voidremoveBeanUnchecked(jakarta.ejb.EJBLocalObject bean)Remove a bean.voidremoveBeanUnchecked(Object pkey)Remove a bean given primary key.protected booleanresumeTransaction(EjbInvocation inv)booleanscanForEjbCreateMethod()voidsetDebugMonitorFlag(boolean flag)protected voidsetEJBMetaData()voidsetStartedState()Start servicing invocations for EJB instances in this Container.voidsetStoppedState()Stop servicing invocations for EJB instances in this Container.voidsetUndeployedState()Stop servicing invocations for EJB instances in this Container as the container is being undeployed.voidstartApplication(boolean deploy)Called after all the components in the container's application have deployed successfully.protected booleansuspendTransaction(EjbInvocation inv)StringtoString()voidundeploy()Undeploy event.protected voiduseClientTx(jakarta.transaction.Transaction prevTx, EjbInvocation inv)booleanuserTransactionMethodsAllowed(org.glassfish.api.invocation.ComponentInvocation inv)EJB spec makes a distinction between access to the UserTransaction object itself and access to its methods.protected voidvalidateEMForClientTx(EjbInvocation inv, com.sun.enterprise.transaction.api.JavaEETransaction t)protected voidvalidateTxAttr(com.sun.enterprise.deployment.MethodDescriptor md, int txAttr)Validate transaction attribute value.voidwebServicePostInvoke(EjbInvocation inv)Called by webservice code to do ejb invocation post processing.
-
-
-
Field Detail
-
_logger
protected static final Logger _logger
-
NO_PARAMS
protected static final Class[] NO_PARAMS
-
logParams
protected Object[] logParams
-
containerType
protected BaseContainer.ContainerType containerType
-
EJBObject_getPrimaryKey
protected static final int EJBObject_getPrimaryKey
- See Also:
- Constant Field Values
-
EJBLocalObject_getPrimaryKey
protected static final int EJBLocalObject_getPrimaryKey
- See Also:
- Constant Field Values
-
SINGLETON_BEAN_POOL_PROP
protected static final String SINGLETON_BEAN_POOL_PROP
- See Also:
- Constant Field Values
-
loader
protected ClassLoader loader
-
ejbClass
protected Class ejbClass
-
sfsbSerializedClass
protected Class sfsbSerializedClass
-
ejbPassivateMethod
protected Method ejbPassivateMethod
-
ejbActivateMethod
protected Method ejbActivateMethod
-
ejbRemoveMethod
protected Method ejbRemoveMethod
-
webServiceEndpointIntf
protected Class webServiceEndpointIntf
-
isWebServiceEndpoint
protected boolean isWebServiceEndpoint
-
isLocal
protected boolean isLocal
Data members for Local views *
-
hasLocalHomeView
protected boolean hasLocalHomeView
-
hasLocalBusinessView
protected boolean hasLocalBusinessView
-
hasOptionalLocalBusinessView
protected boolean hasOptionalLocalBusinessView
-
ejbGeneratedOptionalLocalBusinessIntfClass
protected Class ejbGeneratedOptionalLocalBusinessIntfClass
-
localHomeIntf
protected Class localHomeIntf
-
ejbLocalHome
protected jakarta.ejb.EJBLocalHome ejbLocalHome
-
ejbLocalHomeImpl
protected EJBLocalHomeImpl ejbLocalHomeImpl
-
localBusinessHomeIntf
protected Class localBusinessHomeIntf
-
ejbOptionalLocalBusinessHomeIntf
protected Class ejbOptionalLocalBusinessHomeIntf
-
ejbLocalBusinessHome
protected GenericEJBLocalHome ejbLocalBusinessHome
-
ejbOptionalLocalBusinessHome
protected GenericEJBLocalHome ejbOptionalLocalBusinessHome
-
ejbLocalBusinessHomeImpl
protected EJBLocalHomeImpl ejbLocalBusinessHomeImpl
-
ejbOptionalLocalBusinessHomeImpl
protected EJBLocalHomeImpl ejbOptionalLocalBusinessHomeImpl
-
isRemote
protected boolean isRemote
Data members for Remote views *
-
hasRemoteHomeView
protected boolean hasRemoteHomeView
-
hasRemoteBusinessView
protected boolean hasRemoteBusinessView
-
homeIntf
protected Class homeIntf
-
remoteIntf
protected Class remoteIntf
-
ejbHomeImpl
protected EJBHomeImpl ejbHomeImpl
-
ejbHome
protected jakarta.ejb.EJBHome ejbHome
-
ejbHomeStub
protected jakarta.ejb.EJBHome ejbHomeStub
-
remoteHomeRefFactory
protected org.glassfish.enterprise.iiop.api.RemoteReferenceFactory remoteHomeRefFactory
-
remoteBusinessHomeIntf
protected Class remoteBusinessHomeIntf
-
ejbRemoteBusinessHomeImpl
protected EJBHomeImpl ejbRemoteBusinessHomeImpl
-
ejbRemoteBusinessHome
protected jakarta.ejb.EJBHome ejbRemoteBusinessHome
-
ejbRemoteBusinessHomeStub
protected jakarta.ejb.EJBHome ejbRemoteBusinessHomeStub
-
remoteBusinessIntfInfo
protected Map<String,com.sun.ejb.containers.RemoteBusinessIntfInfo> remoteBusinessIntfInfo
-
metadata
protected jakarta.ejb.EJBMetaData metadata
-
securityManager
protected final com.sun.enterprise.security.SecurityManager securityManager
-
isSession
protected boolean isSession
-
isStatelessSession
protected boolean isStatelessSession
-
isStatefulSession
protected boolean isStatefulSession
-
isMessageDriven
protected boolean isMessageDriven
-
isSingleton
protected boolean isSingleton
-
ejbDescriptor
protected EjbDescriptor ejbDescriptor
-
componentId
protected String componentId
-
invocationInfoMap
protected Map invocationInfoMap
-
scheduleIds
protected Map<TimerPrimaryKey,Method> scheduleIds
-
webServiceInvocationInfoMap
protected Map webServiceInvocationInfoMap
-
ejbIntfMethods
protected Method[] ejbIntfMethods
-
ejbIntfMethodInfo
protected InvocationInfo[] ejbIntfMethodInfo
-
envProps
protected Properties envProps
-
isBeanManagedTran
protected boolean isBeanManagedTran
-
debugMonitorFlag
protected boolean debugMonitorFlag
-
CONTAINER_INITIALIZING
protected static final int CONTAINER_INITIALIZING
- See Also:
- Constant Field Values
-
CONTAINER_STARTED
protected static final int CONTAINER_STARTED
- See Also:
- Constant Field Values
-
CONTAINER_STOPPED
protected static final int CONTAINER_STOPPED
- See Also:
- Constant Field Values
-
CONTAINER_UNDEPLOYED
protected static final int CONTAINER_UNDEPLOYED
- See Also:
- Constant Field Values
-
CONTAINER_ON_HOLD
protected static final int CONTAINER_ON_HOLD
- See Also:
- Constant Field Values
-
containerState
protected int containerState
-
methodMonitorMap
protected HashMap methodMonitorMap
-
monitorOn
protected boolean monitorOn
-
ejbProbeListener
protected EjbMonitoringStatsProvider ejbProbeListener
-
ejbProbeNotifier
protected EjbMonitoringProbeProvider ejbProbeNotifier
-
timerProbeListener
protected EjbTimedObjectStatsProvider timerProbeListener
-
timerProbeNotifier
protected EjbTimedObjectProbeProvider timerProbeNotifier
-
poolProbeListener
protected EjbPoolStatsProvider poolProbeListener
-
cacheProbeNotifier
protected EjbCacheProbeProvider cacheProbeNotifier
-
cacheProbeListener
protected EjbCacheStatsProvider cacheProbeListener
-
containerInfo
protected BaseContainer.ContainerInfo containerInfo
-
callFlowInfo
protected com.sun.enterprise.admin.monitor.callflow.CallFlowInfo callFlowInfo
-
interceptorManager
protected InterceptorManager interceptorManager
-
invocationManager
protected org.glassfish.api.invocation.InvocationManager invocationManager
-
injectionManager
protected com.sun.enterprise.container.common.spi.util.InjectionManager injectionManager
-
namingManager
protected org.glassfish.api.naming.GlassfishNamingManager namingManager
-
transactionManager
protected com.sun.enterprise.transaction.api.JavaEETransactionManager transactionManager
-
ejbContainerUtilImpl
protected EjbContainerUtil ejbContainerUtilImpl
-
optIntfClassLoader
protected EjbOptionalIntfGenerator optIntfClassLoader
-
containerStateManager
protected EJBContainerStateManager containerStateManager
-
containerTransactionManager
protected EJBContainerTransactionManager containerTransactionManager
-
-
Constructor Detail
-
BaseContainer
protected BaseContainer(BaseContainer.ContainerType type, EjbDescriptor ejbDesc, ClassLoader loader, com.sun.enterprise.security.SecurityManager sm) throws Exception
This constructor is called from ContainerFactoryImpl when an EJB Jar is deployed.- Throws:
Exception
-
-
Method Detail
-
getProtocolManager
protected org.glassfish.enterprise.iiop.api.ProtocolManager getProtocolManager()
-
getContainerType
public BaseContainer.ContainerType getContainerType()
-
doEJBHomeRemove
protected void doEJBHomeRemove(Object pk, Method m, boolean isLocal) throws RemoteException, jakarta.ejb.RemoveException
- Throws:
RemoteExceptionjakarta.ejb.RemoveException
-
initializeProtocolManager
protected void initializeProtocolManager()
-
preInitialize
protected void preInitialize(EjbDescriptor ejbDesc, ClassLoader loader)
-
checkUserTransactionLookup
public void checkUserTransactionLookup(org.glassfish.api.invocation.ComponentInvocation inv) throws NameNotFoundException- Throws:
NameNotFoundException
-
createCallFlowAgent
protected final void createCallFlowAgent(com.sun.enterprise.admin.monitor.callflow.ComponentType compType)
-
setStartedState
public final void setStartedState()
Description copied from interface:ContainerStart servicing invocations for EJB instances in this Container.- Specified by:
setStartedStatein interfaceContainer
-
setStoppedState
public final void setStoppedState()
Description copied from interface:ContainerStop servicing invocations for EJB instances in this Container. Subsequent EJB invocations will receive exceptions. Invocations already in progress will be allowed to complete eventually.- Specified by:
setStoppedStatein interfaceContainer
-
isStopped
public final boolean isStopped()
-
setUndeployedState
public final void setUndeployedState()
Description copied from interface:ContainerStop servicing invocations for EJB instances in this Container as the container is being undeployed. No new EJB invocations will be accepted from now on. Invocations already in progress will be allowed to complete eventually.- Specified by:
setUndeployedStatein interfaceContainer
-
isUndeployed
public final boolean isUndeployed()
-
isTimedObject
public final boolean isTimedObject()
Description copied from interface:ContainerReturns true if this Container uses EJB Timer Service.- Specified by:
isTimedObjectin interfaceContainer
-
isLocalObject
public final boolean isLocalObject()
Description copied from interface:ContainerReturns true if the bean associated with this Container has a LocalHome/Local view OR a Local business view OR both.- Specified by:
isLocalObjectin interfaceContainer
-
isRemoteObject
public final boolean isRemoteObject()
Description copied from interface:ContainerReturns true if the bean associated with this Container has a RemoteHome/Remote view OR a Remote business view OR both.- Specified by:
isRemoteObjectin interfaceContainer
-
getContainerClassLoader
public final ClassLoader getContainerClassLoader()
- Specified by:
getContainerClassLoaderin interfacecom.sun.enterprise.container.common.spi.JavaEEContainer
-
getClassLoader
public final ClassLoader getClassLoader()
- Specified by:
getClassLoaderin interfaceContainer- Specified by:
getClassLoaderin interfaceorg.glassfish.enterprise.iiop.spi.EjbContainerFacade- Returns:
- the classloader of this container instance.
-
getUseThreadPoolId
public final String getUseThreadPoolId()
- Specified by:
getUseThreadPoolIdin interfaceorg.glassfish.enterprise.iiop.spi.EjbContainerFacade
-
getPassByReference
public final boolean getPassByReference()
- Specified by:
getPassByReferencein interfaceorg.glassfish.enterprise.iiop.spi.EjbContainerFacade
-
getContainerId
protected final long getContainerId()
-
getApplicationId
public final long getApplicationId()
-
getEjbDescriptor
public final EjbDescriptor getEjbDescriptor()
- Specified by:
getEjbDescriptorin interfaceContainer- Specified by:
getEjbDescriptorin interfaceorg.glassfish.enterprise.iiop.spi.EjbContainerFacade- Returns:
- the EjbDescriptor containing deployment information for the EJB type corresponding to this Container instance.
-
getDescriptor
public final org.glassfish.deployment.common.Descriptor getDescriptor()
Method defined on JavaEEContainer- Specified by:
getDescriptorin interfacecom.sun.enterprise.container.common.spi.JavaEEContainer
-
getEJBMetaData
public final jakarta.ejb.EJBMetaData getEJBMetaData()
- Specified by:
getEJBMetaDatain interfaceContainer- Returns:
- the MetaData for this EJB type.
-
getUserTransaction
public final jakarta.transaction.UserTransaction getUserTransaction()
-
isHAEnabled
public boolean isHAEnabled()
-
userTransactionMethodsAllowed
public boolean userTransactionMethodsAllowed(org.glassfish.api.invocation.ComponentInvocation inv)
EJB spec makes a distinction between access to the UserTransaction object itself and access to its methods. getUserTransaction covers the first check and this method covers the second. It is called by the UserTransaction implementation to verify access.- Specified by:
userTransactionMethodsAllowedin interfaceContainer
-
getEJBHomeStub
public final jakarta.ejb.EJBHome getEJBHomeStub()
-
getEJBHome
public final jakarta.ejb.EJBHome getEJBHome()
- Specified by:
getEJBHomein interfaceContainer- Returns:
- the EJBHome object reference for this container instance.
-
getEJBLocalHome
public final jakarta.ejb.EJBLocalHome getEJBLocalHome()
Return an object that implements ejb's local home interface. If dynamic proxies are being used, this is the proxy itself, it can't be directly cast to an EJBLocalHomeImpl.
-
getEJBLocalBusinessHome
public final GenericEJBLocalHome getEJBLocalBusinessHome(String clientViewClassName)
Return an object that implements ejb's local business home interface.
-
getEJBClass
public final Class getEJBClass()
-
getSecurityManager
public final com.sun.enterprise.security.SecurityManager getSecurityManager()
- Specified by:
getSecurityManagerin interfaceContainer- Returns:
- A SecurityManager object for this container.
-
createRemoteReferenceWithId
public Remote createRemoteReferenceWithId(byte[] instanceKey, String generatedRemoteBusinessIntf)
Create an EJBObject reference from the instanceKey Called from EJBObjectOutputStream.SerializableRemoteRef during deserialization of a remote-ref- Parameters:
instanceKey- instanceKey of the ejbobjectgeneratedRemoteBusinessIntf- non-null, this is a remote business view and the param is the name of the generated remote business interface. Otherwise, this is for the RemoteHome view
-
initializeHome
protected void initializeHome() throws ExceptionCalled from the ContainerFactory during initialization.- Throws:
Exception
-
getJavaGlobalJndiNamePrefix
protected String getJavaGlobalJndiNamePrefix()
-
createEjbInstanceForInterceptors
public void createEjbInstanceForInterceptors(Object[] params, EJBContextImpl ctx) throws Exception
- Throws:
Exception
-
createEjbInstanceAndContext
protected EJBContextImpl createEjbInstanceAndContext() throws Exception
- Throws:
Exception
-
_constructEJBContextImpl
protected EJBContextImpl _constructEJBContextImpl(Object instance)
-
injectEjbInstance
protected void injectEjbInstance(EJBContextImpl context) throws Exception
- Throws:
Exception
-
cleanupInstance
protected void cleanupInstance(EJBContextImpl context)
-
getTargetObject
public Remote getTargetObject(byte[] instanceKey, String generatedRemoteBusinessIntf)
Return the EJBObject/EJBHome Proxy for the given ejbId and instanceKey. Called from the ProtocolManager when a remote invocation arrives.- Specified by:
getTargetObjectin interfaceContainer- Specified by:
getTargetObjectin interfaceorg.glassfish.enterprise.iiop.spi.EjbContainerFacadegeneratedRemoteBusinessIntf- True if this invocation is for the RemoteHome view of the bean. False if for the RemoteBusiness view. Called from the ProtocolManager when a remote invocation arrives.- Throws:
jakarta.ejb.NoSuchObjectLocalException- if the target object does not exist
-
releaseTargetObject
public void releaseTargetObject(Remote remoteObj)
Release the EJBObject/EJBHome object. Called from the ProtocolManager after a remote invocation completes.- Specified by:
releaseTargetObjectin interfaceContainer- Specified by:
releaseTargetObjectin interfaceorg.glassfish.enterprise.iiop.spi.EjbContainerFacade
-
externalPreInvoke
public void externalPreInvoke()
Description copied from interface:ContainerPerforms pre external invocation setup such as setting application context class loader. Called by getTargetObject() and web service inv- Specified by:
externalPreInvokein interfaceContainer
-
externalPostInvoke
public void externalPostInvoke()
Description copied from interface:ContainerPerforms post external invocation cleanup such as restoring the original class loader. Called by releaseTargetObject() and web service inv- Specified by:
externalPostInvokein interfaceContainer
-
preInvoke
public void preInvoke(EjbInvocation inv)
Called from EJBObject/EJBHome before invoking on EJB. Set the EJB instance in the EjbInvocation. It must be ensured that the following general pattern is followed by various parts of the EJBContainer code: try { container.preInvoke(inv); returnValue = container.intercept(inv); } catch (Exception1 e1) { ... } catch (Exception2 e2) { ... } finally { container.postInvoke(); }
-
intercept
public boolean intercept(com.sun.enterprise.deployment.LifecycleCallbackDescriptor.CallbackType eventType, EJBContextImpl ctx) throws Throwable- Throws:
Throwable
-
enlistExtendedEntityManagers
protected void enlistExtendedEntityManagers(ComponentContext ctx)
-
delistExtendedEntityManagers
protected void delistExtendedEntityManagers(ComponentContext ctx)
-
lookupExtendedEntityManager
public jakarta.persistence.EntityManager lookupExtendedEntityManager(jakarta.persistence.EntityManagerFactory emf)
Containers that allow extended EntityManager will override this method.- Specified by:
lookupExtendedEntityManagerin interfacecom.sun.enterprise.container.common.spi.JavaEEContainer
-
webServicePostInvoke
public void webServicePostInvoke(EjbInvocation inv)
Description copied from interface:ContainerCalled by webservice code to do ejb invocation post processing.- Specified by:
webServicePostInvokein interfaceContainer
-
postInvoke
public void postInvoke(EjbInvocation inv)
Called from EJBObject/EJBHome after invoking on bean.- Specified by:
postInvokein interfaceContainer
-
postInvoke
protected void postInvoke(EjbInvocation inv, boolean doTxProcessing)
-
authorizeLocalMethod
protected void authorizeLocalMethod(int method)
Check if caller is authorized to invoke the method. Only called for EJBLocalObject and EJBLocalHome methods, from EJBLocalHome|ObjectImpl classes.- Parameters:
method- an integer identifying the method to be checked, must be one of the EJBLocal{Home|Object}_* constants.
-
authorizeRemoteMethod
protected void authorizeRemoteMethod(int method) throws RemoteExceptionCheck if caller is authorized to invoke the method. Only called for EJBObject and EJBHome methods, from EJBHome|ObjectImpl classes.- Parameters:
method- an integer identifying the method to be checked, must be one of the EJB{Home|Object}_* constants.- Throws:
RemoteException
-
authorize
public boolean authorize(EjbInvocation invocation)
Common code to handle EJB security manager authorization call.
-
cancelTimers
protected void cancelTimers(Object key)
-
isEjbTimeoutMethod
protected boolean isEjbTimeoutMethod(Method m)
-
createEJBObjectImpl
protected abstract EJBObjectImpl createEJBObjectImpl() throws jakarta.ejb.CreateException, RemoteException
- Throws:
jakarta.ejb.CreateExceptionRemoteException
-
createEJBLocalObjectImpl
protected EJBLocalObjectImpl createEJBLocalObjectImpl() throws jakarta.ejb.CreateException
- Throws:
jakarta.ejb.CreateException
-
getEJBObjectImpl
protected abstract EJBObjectImpl getEJBObjectImpl(byte[] streamKey)
Called when a remote invocation arrives for an EJB. Implemented in subclasses.
-
getEJBLocalObjectImpl
protected EJBLocalObjectImpl getEJBLocalObjectImpl(Object key)
-
checkExists
protected void checkExists(EJBLocalRemoteObject ejbObj)
Check if the given EJBObject/LocalObject has been removed.- Throws:
jakarta.ejb.NoSuchObjectLocalException- if the object has been removed.
-
getContext
protected final ComponentContext getContext(EjbInvocation inv) throws jakarta.ejb.EJBException
- Throws:
jakarta.ejb.EJBException
-
getInvocationKey
protected final Object getInvocationKey(EjbInvocation inv)
-
_getContext
protected abstract ComponentContext _getContext(EjbInvocation inv) throws jakarta.ejb.EJBException
- Throws:
jakarta.ejb.EJBException
-
releaseContext
protected abstract void releaseContext(EjbInvocation inv) throws jakarta.ejb.EJBException
- Throws:
jakarta.ejb.EJBException
-
passivateEJB
protected abstract boolean passivateEJB(ComponentContext context)
-
forceDestroyBean
protected abstract void forceDestroyBean(EJBContextImpl sc) throws jakarta.ejb.EJBException
- Throws:
jakarta.ejb.EJBException
-
removeBean
protected abstract void removeBean(EJBLocalRemoteObject ejbo, Method removeMethod, boolean local) throws jakarta.ejb.RemoveException, jakarta.ejb.EJBException, RemoteException
- Throws:
jakarta.ejb.RemoveExceptionjakarta.ejb.EJBExceptionRemoteException
-
authorizeLocalGetPrimaryKey
protected void authorizeLocalGetPrimaryKey(EJBLocalRemoteObject ejbObj) throws jakarta.ejb.EJBException
- Throws:
jakarta.ejb.EJBException
-
authorizeRemoteGetPrimaryKey
protected void authorizeRemoteGetPrimaryKey(EJBLocalRemoteObject ejbObj) throws RemoteException
- Throws:
RemoteException
-
invokeFindByPrimaryKey
protected Object invokeFindByPrimaryKey(Method method, EjbInvocation inv, Object[] args) throws Throwable
- Throws:
Throwable
-
removeBeanUnchecked
public void removeBeanUnchecked(Object pkey)
Description copied from interface:ContainerRemove a bean given primary key. Used by the PersistenceManager.- Specified by:
removeBeanUncheckedin interfaceContainer
-
removeBeanUnchecked
public void removeBeanUnchecked(jakarta.ejb.EJBLocalObject bean)
Description copied from interface:ContainerRemove a bean. Used by the PersistenceManager.- Specified by:
removeBeanUncheckedin interfaceContainer
-
preSelect
public void preSelect()
Description copied from interface:ContainerNotification from persistence manager than an ejbSelect query is about to be invoked on a bean of the ejb type for this container. This allows the ejb container to perform the same set of actions as take place before a finder method, such as calling ejbStore on bean instances. (See EJB 2.1, Section 10.5.3 ejbFind,ejbStore)
-
getEJBLocalObjectForPrimaryKey
public jakarta.ejb.EJBLocalObject getEJBLocalObjectForPrimaryKey(Object pkey, jakarta.ejb.EJBContext ctx)
Description copied from interface:ContainerObtain an Entity EJBLocalObject corresponding to the primary key. Used by the PersistenceManager.- Specified by:
getEJBLocalObjectForPrimaryKeyin interfaceContainer
-
getEJBLocalObjectForPrimaryKey
public jakarta.ejb.EJBLocalObject getEJBLocalObjectForPrimaryKey(Object pkey)
- Specified by:
getEJBLocalObjectForPrimaryKeyin interfaceContainer
-
getEJBObjectForPrimaryKey
public jakarta.ejb.EJBObject getEJBObjectForPrimaryKey(Object pkey)
Description copied from interface:ContainerObtain an Entity EJBObject corresponding to the primary key. Used by the PersistenceManager.- Specified by:
getEJBObjectForPrimaryKeyin interfaceContainer
-
isIdentical
protected boolean isIdentical(EJBObjectImpl ejbo, jakarta.ejb.EJBObject other) throws RemoteException
- Throws:
RemoteException
-
getJaccEjb
public Object getJaccEjb(EjbInvocation ejbInvocation)
Called-back from security implementation through EjbInvocation when a jacc policy provider wants an enterprise bean instance.- Specified by:
getJaccEjbin interfaceContainer- Returns:
- EnterpriseBean instance or null if not applicable for this invocation.
-
assertValidLocalObject
public void assertValidLocalObject(Object o) throws jakarta.ejb.EJBException
Description copied from interface:ContainerVerify that a given object is an EJBLocalObject of an ejb from this ejb container. The given object must be an EJBLocalObject and have the same ejb type ( meaning same ejb-jar and same ejb-name ) as this container. Note that for entity beans this equality check is independent of primary key.- Specified by:
assertValidLocalObjectin interfaceContainer- Throws:
jakarta.ejb.EJBException- Thrown when the assertion fails.
-
assertValidRemoteObject
public void assertValidRemoteObject(Object o) throws jakarta.ejb.EJBException
Asserts validity of RemoteHome objects. This was defined for the J2EE 1.4 implementation and is exposed through Container SPI.- Specified by:
assertValidRemoteObjectin interfaceContainer- Throws:
jakarta.ejb.EJBException- Thrown when the assertion fails.
-
getTxAttr
protected final int getTxAttr(Method method, String methodIntf) throws jakarta.ejb.EJBException
- Throws:
jakarta.ejb.EJBException
-
getTxAttr
protected final int getTxAttr(EjbInvocation inv) throws jakarta.ejb.EJBException
- Throws:
jakarta.ejb.EJBException
-
isCreateHomeFinder
protected boolean isCreateHomeFinder(Method method)
-
addInvocationInfo
protected InvocationInfo addInvocationInfo(Method method, String methodIntf, Class originalIntf) throws jakarta.ejb.EJBException
- Throws:
jakarta.ejb.EJBException
-
adjustInvocationInfo
protected void adjustInvocationInfo(InvocationInfo invInfo, Method method, int txAttr, boolean flushEnabled, String methodIntf, Class originalIntf) throws jakarta.ejb.EJBException
- Throws:
jakarta.ejb.EJBException
-
postProcessInvocationInfo
protected InvocationInfo postProcessInvocationInfo(InvocationInfo invInfo)
-
adjustHomeTargetMethodInfo
protected void adjustHomeTargetMethodInfo(InvocationInfo invInfo, String methodName, Class[] paramTypes) throws NoSuchMethodException
- Throws:
NoSuchMethodException
-
getPre30LifecycleMethodNames
protected String[] getPre30LifecycleMethodNames()
-
addLocalRemoteInvocationInfo
protected void addLocalRemoteInvocationInfo() throws Exception- Throws:
Exception
-
validateTxAttr
protected void validateTxAttr(com.sun.enterprise.deployment.MethodDescriptor md, int txAttr) throws jakarta.ejb.EJBExceptionValidate transaction attribute value. Allow subclasses to add their own validation.- Throws:
jakarta.ejb.EJBException
-
findFlushEnabledAttr
protected boolean findFlushEnabledAttr(com.sun.enterprise.deployment.MethodDescriptor md)
-
addProxyInterfacesSetClass
protected void addProxyInterfacesSetClass(Set proxyInterfacesSet, boolean local)
-
getEJBHomeInvocationHandler
protected EJBHomeInvocationHandler getEJBHomeInvocationHandler(Class homeIntfClass) throws Exception
- Throws:
Exception
-
createEjbInvocation
protected EjbInvocation createEjbInvocation()
-
createEjbInvocation
protected EjbInvocation createEjbInvocation(Object ejb, ComponentContext context)
-
getEJBLocalHomeInvocationHandler
protected EJBLocalHomeInvocationHandler getEJBLocalHomeInvocationHandler(Class homeIntfClass) throws Exception
- Throws:
Exception
-
instantiateEJBLocalObjectImpl
protected EJBLocalObjectImpl instantiateEJBLocalObjectImpl() throws Exception
- Throws:
Exception
-
instantiateEJBLocalObjectImpl
protected EJBLocalObjectImpl instantiateEJBLocalObjectImpl(Object key) throws Exception
- Throws:
Exception
-
instantiateEJBLocalBusinessObjectImpl
protected EJBLocalObjectImpl instantiateEJBLocalBusinessObjectImpl() throws Exception
- Throws:
Exception
-
instantiateOptionalEJBLocalBusinessObjectImpl
protected EJBLocalObjectImpl instantiateOptionalEJBLocalBusinessObjectImpl() throws Exception
- Throws:
Exception
-
instantiateEJBObjectImpl
protected EJBObjectImpl instantiateEJBObjectImpl() throws Exception
- Throws:
Exception
-
instantiateEJBObjectImpl
protected EJBObjectImpl instantiateEJBObjectImpl(jakarta.ejb.EJBObject ejbStub, Object key) throws Exception
- Throws:
Exception
-
instantiateRemoteBusinessObjectImpl
protected EJBObjectImpl instantiateRemoteBusinessObjectImpl() throws Exception
- Throws:
Exception
-
scanForEjbCreateMethod
public boolean scanForEjbCreateMethod()
-
postCreate
public void postCreate(EjbInvocation inv, Object primaryKey) throws jakarta.ejb.CreateException
Description copied from interface:ContainerCalled by the EJB(Local)Home after invoking ejbCreate on an EntityBean. After this postCreate the EJB(Local)Home can call ejbPostCreate on the EntityBean.- Specified by:
postCreatein interfaceContainerprimaryKey- the value returned from ejbCreate.- Throws:
jakarta.ejb.CreateException
-
postFind
public Object postFind(EjbInvocation inv, Object primaryKeys, Object[] findParams) throws jakarta.ejb.FinderException
Description copied from interface:ContainerCalled by the EJB(Local)Home after invoking ejbFind* on an EntityBean.- Specified by:
postFindin interfaceContainerprimaryKeys- the primaryKey or collection of primaryKeys (Collection/Enumeration) returned from ejbFind.findParams- the parameters to the ejbFind method.- Returns:
- an EJBObject reference or Collection/Enumeration of EJBObjects.
- Throws:
jakarta.ejb.FinderException
-
getComponentId
public String getComponentId()
Called from NamingManagerImpl during java:comp/env lookup.- Specified by:
getComponentIdin interfaceContainer- Specified by:
getComponentIdin interfacecom.sun.enterprise.container.common.spi.JavaEEContainer
-
startApplication
public void startApplication(boolean deploy)
Called after all the components in the container's application have deployed successfully.- Specified by:
startApplicationin interfaceContainer- Parameters:
deploy- true if this method is called during application deploy
-
callEJBTimeout
protected boolean callEJBTimeout(RuntimeTimerState timerState, EJBTimerService timerService) throws Exception
- Throws:
Exception
-
getTimeoutMethod
protected Method getTimeoutMethod(RuntimeTimerState timerState)
-
postEjbTimeout
protected boolean postEjbTimeout(RuntimeTimerState timerState, EJBTimerService timerService)
-
prepareEjbTimeoutParams
protected void prepareEjbTimeoutParams(EjbInvocation inv, RuntimeTimerState timerState, EJBTimerService timerService)
-
onEnteringContainer
public final void onEnteringContainer()
-
onLeavingContainer
public final void onLeavingContainer()
-
invokeTargetBeanMethod
protected Object invokeTargetBeanMethod(Method beanClassMethod, EjbInvocation inv, Object target, Object[] params, com.sun.enterprise.security.SecurityManager mgr) throws Throwable
- Throws:
Throwable
-
doTimerInvocationInit
protected void doTimerInvocationInit(EjbInvocation inv, Object primaryKey) throws Exception
This is implemented by concrete containers that support TimedObjects.- Throws:
Exception
-
undeploy
public final void undeploy()
Undeploy event. Code must be able to gracefully handle redundant undeploy/shutdown calls for the same container instance.
-
onShutdown
public final void onShutdown()
Container shutdown event. This happens for every kind of shutdown other than undeploy. It could mean the server is shutting down or that the app has been disabled while the server is still running. The two cases are handled the same. We must be able to gracefully handle redundant shutdown calls for the same container instance.- Specified by:
onShutdownin interfaceContainer
-
doConcreteContainerShutdown
protected abstract void doConcreteContainerShutdown(boolean appBeingUndeployed)
-
onReady
public void onReady()
Called when server instance is Ready
-
onTermination
public void onTermination()
Called when server instance is terminating. This method is the last one called during server shutdown.- Specified by:
onTerminationin interfaceContainer
-
preInvokeTx
protected final void preInvokeTx(EjbInvocation inv) throws Exception
This is called from preInvoke before every method invocation on the EJB instance, including ejbCreate, ejbFind*, ejbRemove. Also called from MessageBeanContainer, WebServiceInvocationHandler, etc, so we can't assume that BaseContainer.preInvoke(EjbInvocation) has run. Therefore, handle inv.invocationInfo defensively since it might not have been initialized.- Throws:
Exception
-
checkUnfinishedTx
protected void checkUnfinishedTx(jakarta.transaction.Transaction prevTx, EjbInvocation inv)
-
suspendTransaction
protected boolean suspendTransaction(EjbInvocation inv) throws Exception
- Throws:
Exception
-
resumeTransaction
protected boolean resumeTransaction(EjbInvocation inv) throws Exception
- Throws:
Exception
-
useClientTx
protected void useClientTx(jakarta.transaction.Transaction prevTx, EjbInvocation inv)
-
validateEMForClientTx
protected void validateEMForClientTx(EjbInvocation inv, com.sun.enterprise.transaction.api.JavaEETransaction t)
-
postInvokeTx
protected void postInvokeTx(EjbInvocation inv) throws Exception
postInvokeTx is called after every invocation on the EJB instance, including ejbCreate/ejbFind---/ejbRemove. NOTE: postInvokeTx is called even if the EJB was not invoked because of an exception thrown from preInvokeTx.- Throws:
Exception
-
checkExceptionClientTx
protected Throwable checkExceptionClientTx(EJBContextImpl context, Throwable exception) throws Exception
- Throws:
Exception
-
doAfterBegin
public final void doAfterBegin(org.glassfish.api.invocation.ComponentInvocation ci)
Description copied from interface:ContainerCalled from the TM when an EJB with Bean-Managed transactions starts a tx- Specified by:
doAfterBeginin interfaceContainer
-
afterBegin
protected abstract void afterBegin(EJBContextImpl context)
-
beforeCompletion
protected abstract void beforeCompletion(EJBContextImpl context)
-
afterCompletion
protected abstract void afterCompletion(EJBContextImpl context, int status)
-
preInvokeNoTx
protected void preInvokeNoTx(EjbInvocation inv)
-
postInvokeNoTx
protected void postInvokeNoTx(EjbInvocation inv)
-
isApplicationException
protected boolean isApplicationException(Throwable exception)
-
isSystemUncheckedException
protected boolean isSystemUncheckedException(Throwable exception)
-
getDebugMonitorFlag
public boolean getDebugMonitorFlag()
-
setDebugMonitorFlag
public void setDebugMonitorFlag(boolean flag)
-
containerStateToString
protected static final String containerStateToString(int state)
-
isRemoteInterfaceSupported
protected final boolean isRemoteInterfaceSupported()
-
isLocalInterfaceSupported
protected final boolean isLocalInterfaceSupported()
-
getTxAttrForLifecycleCallback
protected int getTxAttrForLifecycleCallback(Set<com.sun.enterprise.deployment.LifecycleCallbackDescriptor> lifecycleCallbackDescriptors, int defaultTxAttr, int... validateTxAttr) throws Exception
- Throws:
Exception
-
intercept
protected Object intercept(EjbInvocation inv) throws Throwable
Called from various places within the container that are responsible for dispatching invocations to business methods. This method has the exception semantics of Method.invoke(). Any exception that originated from the business method or application code within an interceptor will be propagated as the cause within an InvocationTargetException.- Throws:
Throwable
-
invokeBeanMethod
public Object invokeBeanMethod(EjbInvocation invocation) throws Throwable
Called from Interceptor Chain to invoke the actual bean method.This method must throw any exception from the bean method *as is*, without being wrapped in an InvocationTargetException. The exception thrown from this method will be propagated through the application's interceptor code, so it must not be changed in order for any exception handling logic in that code to function properly.
- Throws:
Throwable
-
getMonitoringStatsProvider
protected abstract EjbMonitoringStatsProvider getMonitoringStatsProvider(String appName, String modName, String ejbName)
-
createMonitoringRegistry
protected void createMonitoringRegistry()
-
getMonitoringMethodsArray
protected String[] getMonitoringMethodsArray()
-
getMonitoringMethodsArray
protected String[] getMonitoringMethodsArray(boolean hasGeneratedClasses)
-
doFlush
protected void doFlush(EjbInvocation inv)
-
registerMonitorableComponents
protected void registerMonitorableComponents()
-
registerTimerMonitorableComponent
protected void registerTimerMonitorableComponent()
-
incrementCreatedTimedObject
protected void incrementCreatedTimedObject()
-
incrementRemovedTimedObject
protected void incrementRemovedTimedObject()
-
incrementDeliveredTimedObject
protected void incrementDeliveredTimedObject()
-
-