Package com.sun.ejb.containers
Class BaseContainer
- java.lang.Object
-
- com.sun.ejb.containers.BaseContainer
-
- All Implemented Interfaces:
Container
,JavaEEContainer
,EjbContainerFacade
- Direct Known Subclasses:
AbstractSingletonContainer
,EntityContainer
,MessageBeanContainer
,StatefulSessionContainer
,StatelessSessionContainer
public abstract class BaseContainer extends Object implements Container, EjbContainerFacade, JavaEEContainer
This class implements part of the com.sun.ejb.Container interface. It implements the container's side of the EJB-to-Container contract defined 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 class
BaseContainer.ContainerInfo
Strings for monitoring infostatic class
BaseContainer.ContainerType
static class
BaseContainer.PreInvokeException
PreInvokeException 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 protected
BaseContainer(BaseContainer.ContainerType type, EjbDescriptor ejbDesc, ClassLoader loader, 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)
Must be overridden for any container that supports injectionprotected Object
_constructEJBInstance()
protected JCDIService.JCDIInjectionContext<?>
_createJCDIInjectionContext(EJBContextImpl ctx, Object instance)
protected JCDIService.JCDIInjectionContext<?>
_createJCDIInjectionContext(EJBContextImpl ejbContext, Object instance, JCDIService.JCDIInjectionContext<?> cdiInjectionContext)
protected abstract ComponentContext
_getContext(EjbInvocation inv)
protected InvocationInfo
addInvocationInfo(Method method, String methodIntf, Class originalIntf)
protected void
addLocalRemoteInvocationInfo()
protected void
addProxyInterfacesSetClass(Set proxyInterfacesSet, boolean local)
protected void
adjustHomeTargetMethodInfo(InvocationInfo invInfo, String methodName, Class[] paramTypes)
protected void
adjustInvocationInfo(InvocationInfo invInfo, Method method, int txAttr, boolean flushEnabled, String methodIntf, Class originalIntf)
protected abstract void
afterBegin(EJBContextImpl context)
protected abstract void
afterCompletion(EJBContextImpl context, int status)
void
assertValidLocalObject(Object o)
Verify that a given object is an EJBLocalObject of an ejb from this ejb container.void
assertValidRemoteObject(Object o)
Asserts validity of RemoteHome objects.boolean
authorize(EjbInvocation inv)
Common code to handle EJB security manager authorization call.protected void
authorizeLocalGetPrimaryKey(EJBLocalRemoteObject ejbObj)
protected void
authorizeLocalMethod(int method)
Check if caller is authorized to invoke the method.protected void
authorizeRemoteGetPrimaryKey(EJBLocalRemoteObject ejbObj)
protected void
authorizeRemoteMethod(int method)
Check if caller is authorized to invoke the method.protected abstract void
beforeCompletion(EJBContextImpl context)
protected boolean
callEJBTimeout(RuntimeTimerState timerState, EJBTimerService timerService)
protected void
cancelTimers(Object key)
protected Throwable
checkExceptionClientTx(EJBContextImpl context, Throwable exception)
protected void
checkExists(EJBLocalRemoteObject ejbObj)
Check if the given EJBObject/LocalObject has been removed.protected void
checkUnfinishedTx(jakarta.transaction.Transaction prevTx, EjbInvocation inv)
void
checkUserTransactionLookup(ComponentInvocation inv)
protected void
cleanupInstance(EJBContextImpl context)
protected static String
containerStateToString(int state)
protected void
createCallFlowAgent(ComponentType compType)
protected EJBContextImpl
createEjbInstanceAndContext()
void
createEjbInstanceForInterceptors(Object[] params, EJBContextImpl context)
protected EjbInvocation
createEjbInvocation()
protected EjbInvocation
createEjbInvocation(Object ejb, ComponentContext context)
protected EJBLocalObjectImpl
createEJBLocalObjectImpl()
protected abstract EJBObjectImpl
createEJBObjectImpl()
protected void
createEmptyContextAndInterceptors(EJBContextImpl context)
protected void
createMonitoringRegistry()
Remote
createRemoteReferenceWithId(byte[] instanceKey, String generatedRemoteBusinessIntf)
Create an EJBObject reference from the instanceKey Called from EJBObjectOutputStream.SerializableRemoteRef during deserialization of a remote-refprotected void
delistExtendedEntityManagers(ComponentContext ctx)
void
doAfterBegin(ComponentInvocation ci)
Called from the TM when an EJB with Bean-Managed transactions starts a txprotected abstract void
doConcreteContainerShutdown(boolean appBeingUndeployed)
protected void
doEJBHomeRemove(Object pk, Method m, boolean isLocal)
protected void
doFlush(EjbInvocation inv)
protected void
doTimerInvocationInit(EjbInvocation inv, Object primaryKey)
This is implemented by concrete containers that support TimedObjects.protected void
enlistExtendedEntityManagers(ComponentContext ctx)
void
externalPostInvoke()
Performs post external invocation cleanup such as restoring the original class loader.void
externalPreInvoke()
Performs pre external invocation setup such as setting application context class loader.protected boolean
findFlushEnabledAttr(MethodDescriptor md)
protected abstract void
forceDestroyBean(EJBContextImpl sc)
long
getApplicationId()
ClassLoader
getClassLoader()
String
getComponentId()
Called from NamingManagerImpl during java:comp/env lookup.ClassLoader
getContainerClassLoader()
protected long
getContainerId()
BaseContainer.ContainerType
getContainerType()
protected ComponentContext
getContext(EjbInvocation inv)
boolean
getDebugMonitorFlag()
Descriptor
getDescriptor()
Method defined on JavaEEContainerClass
getEJBClass()
EjbDescriptor
getEjbDescriptor()
jakarta.ejb.EJBHome
getEJBHome()
protected EJBHomeInvocationHandler
getEJBHomeInvocationHandler(Class homeIntfClass)
jakarta.ejb.EJBHome
getEJBHomeStub()
GenericEJBLocalHome
getEJBLocalBusinessHome(String clientViewClassName)
Return an object that implements ejb's local business home interface.jakarta.ejb.EJBLocalHome
getEJBLocalHome()
Return an object that implements ejb's local home interface.protected EJBLocalHomeInvocationHandler
getEJBLocalHomeInvocationHandler(Class homeIntfClass)
jakarta.ejb.EJBLocalObject
getEJBLocalObjectForPrimaryKey(Object pkey)
jakarta.ejb.EJBLocalObject
getEJBLocalObjectForPrimaryKey(Object pkey, jakarta.ejb.EJBContext ctx)
Obtain an Entity EJBLocalObject corresponding to the primary key.protected EJBLocalObjectImpl
getEJBLocalObjectImpl(Object key)
jakarta.ejb.EJBMetaData
getEJBMetaData()
jakarta.ejb.EJBObject
getEJBObjectForPrimaryKey(Object pkey)
Obtain an Entity EJBObject corresponding to the primary key.protected abstract EJBObjectImpl
getEJBObjectImpl(byte[] streamKey)
Called when a remote invocation arrives for an EJB.protected Object
getInvocationKey(EjbInvocation inv)
Object
getJaccEjb(EjbInvocation inv)
Called-back from security implementation through EjbInvocation when a jacc policy provider wants an enterprise bean instance.protected String
getJavaGlobalJndiNamePrefix()
protected String[]
getMonitoringMethodsArray()
protected String[]
getMonitoringMethodsArray(boolean hasGeneratedClasses)
protected abstract EjbMonitoringStatsProvider
getMonitoringStatsProvider(String appName, String modName, String ejbName)
boolean
getPassByReference()
protected String[]
getPre30LifecycleMethodNames()
protected ProtocolManager
getProtocolManager()
SecurityManager
getSecurityManager()
Remote
getTargetObject(byte[] instanceKey, String generatedRemoteBusinessIntf)
Return the EJBObject/EJBHome Proxy for the given ejbId and instanceKey.protected Method
getTimeoutMethod(RuntimeTimerState timerState)
protected int
getTxAttr(EjbInvocation inv)
protected int
getTxAttr(Method method, String methodIntf)
protected int
getTxAttrForLifecycleCallback(Set<LifecycleCallbackDescriptor> lifecycleCallbackDescriptors, int defaultTxAttr, int... validateTxAttr)
jakarta.transaction.UserTransaction
getUserTransaction()
String
getUseThreadPoolId()
protected void
incrementCreatedTimedObject()
protected void
incrementDeliveredTimedObject()
protected void
incrementRemovedTimedObject()
void
initialize()
Called after creation when Hazelcast is availableprotected void
initializeHome()
Called from the ContainerFactory during initialization.protected void
initializeProtocolManager()
protected void
injectEjbInstance(EJBContextImpl context)
protected EJBLocalObjectImpl
instantiateEJBLocalBusinessObjectImpl()
protected EJBLocalObjectImpl
instantiateEJBLocalObjectImpl()
protected EJBLocalObjectImpl
instantiateEJBLocalObjectImpl(Object key)
protected EJBObjectImpl
instantiateEJBObjectImpl()
protected EJBObjectImpl
instantiateEJBObjectImpl(jakarta.ejb.EJBObject ejbStub, Object key)
protected EJBLocalObjectImpl
instantiateOptionalEJBLocalBusinessObjectImpl()
protected EJBObjectImpl
instantiateRemoteBusinessObjectImpl()
protected Object
intercept(EjbInvocation inv)
Called from various places within the container that are responsible for dispatching invocations to business methods.boolean
intercept(LifecycleCallbackDescriptor.CallbackType eventType, EJBContextImpl ctx)
Object
invokeBeanMethod(EjbInvocation inv)
Called from Interceptor Chain to invoke the actual bean method.protected Object
invokeFindByPrimaryKey(Method method, EjbInvocation inv, Object[] args)
protected Object
invokeTargetBeanMethod(Method beanClassMethod, EjbInvocation inv, Object target, Object[] params, SecurityManager mgr)
protected boolean
isApplicationException(Throwable exception)
Checks if the exception is not null and if it is checked exception - uses ejb descriptor to resolve it.protected boolean
isCreateHomeFinder(Method method)
protected boolean
isEjbTimeoutMethod(Method m)
boolean
isHAEnabled()
protected boolean
isIdentical(EJBObjectImpl ejbo, jakarta.ejb.EJBObject other)
protected boolean
isJCDIEnabled()
protected boolean
isLocalInterfaceSupported()
boolean
isLocalObject()
Returns true if the bean associated with this Container has a LocalHome/Local view OR a Local business view OR both.protected boolean
isRemoteInterfaceSupported()
boolean
isRemoteObject()
Returns true if the bean associated with this Container has a RemoteHome/Remote view OR a Remote business view OR both.boolean
isStopped()
protected boolean
isSystemUncheckedException(Throwable exception)
Checks if the exception is not null and if it is a system unchecked exception - uses ejb descriptor to resolve it.boolean
isTimedObject()
Returns true if this Container uses EJB Timer Service.boolean
isUndeployed()
jakarta.persistence.EntityManager
lookupExtendedEntityManager(jakarta.persistence.EntityManagerFactory emf)
Containers that allow extended EntityManager will override this method.void
onEnteringContainer()
void
onLeavingContainer()
void
onReady()
Called when server instance is Readyvoid
onShutdown()
Container shutdown event.void
onTermination()
Called when server instance is terminating.protected abstract boolean
passivateEJB(ComponentContext context)
void
postCreate(EjbInvocation inv, Object primaryKey)
Called by the EJB(Local)Home after invoking ejbCreate on an EntityBean.protected boolean
postEjbTimeout(RuntimeTimerState timerState, EJBTimerService timerService)
Object
postFind(EjbInvocation inv, Object primaryKeys, Object[] findParams)
Called by the EJB(Local)Home after invoking ejbFind* on an EntityBean.void
postInvoke(EjbInvocation inv)
Called from EJBObject/EJBHome after invoking on bean.protected void
postInvoke(EjbInvocation inv, boolean doTxProcessing)
protected void
postInvokeNoTx(EjbInvocation inv)
protected void
postInvokeTx(EjbInvocation inv)
postInvokeTx is called after every invocation on the EJB instance, including ejbCreate/ejbFind---/ejbRemove.protected InvocationInfo
postProcessInvocationInfo(InvocationInfo invInfo)
protected void
preInitialize(EjbDescriptor ejbDesc, ClassLoader loader)
void
preInvoke(EjbInvocation inv)
Called from EJBObject/EJBHome before invoking on EJB.protected void
preInvokeNoTx(EjbInvocation inv)
protected void
preInvokeTx(EjbInvocation inv)
This is called from preInvoke before every method invocation on the EJB instance, including ejbCreate, ejbFind*, ejbRemove.protected void
prepareEjbTimeoutParams(EjbInvocation inv, RuntimeTimerState timerState, EJBTimerService timerService)
void
preSelect()
Notification from persistence manager than an ejbSelect query is about to be invoked on a bean of the ejb type for this container.protected void
registerMonitorableComponents()
protected void
registerTimerMonitorableComponent()
protected abstract void
releaseContext(EjbInvocation inv)
void
releaseTargetObject(Remote remoteObj)
Release the EJBObject/EJBHome object.protected abstract void
removeBean(EJBLocalRemoteObject ejbo, Method removeMethod, boolean local)
void
removeBeanUnchecked(jakarta.ejb.EJBLocalObject bean)
Remove a bean.void
removeBeanUnchecked(Object pkey)
Remove a bean given primary key.protected boolean
resumeTransaction(EjbInvocation inv)
boolean
scanForEjbCreateMethod()
void
setDebugMonitorFlag(boolean flag)
protected void
setEJBMetaData()
void
setStartedState()
Start servicing invocations for EJB instances in this Container.void
setStoppedState()
Stop servicing invocations for EJB instances in this Container.void
setUndeployedState()
Stop servicing invocations for EJB instances in this Container as the container is being undeployed.void
startApplication(boolean deploy)
Called after all the components in the container's application have deployed successfully.protected boolean
suspendTransaction(EjbInvocation inv)
String
toString()
void
undeploy()
Undeploy event.protected void
useClientTx(jakarta.transaction.Transaction prevTx, EjbInvocation inv)
boolean
userTransactionMethodsAllowed(ComponentInvocation inv)
EJB spec makes a distinction between access to the UserTransaction object itself and access to its methods.protected void
validateEMForClientTx(EjbInvocation inv, JavaEETransaction t)
protected void
validateTxAttr(MethodDescriptor md, int txAttr)
Validate transaction attribute value.void
webServicePostInvoke(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 RemoteReferenceFactory remoteHomeRefFactory
-
remoteBusinessHomeIntf
protected Class remoteBusinessHomeIntf
-
ejbRemoteBusinessHomeImpl
protected EJBHomeImpl ejbRemoteBusinessHomeImpl
-
ejbRemoteBusinessHome
protected jakarta.ejb.EJBHome ejbRemoteBusinessHome
-
ejbRemoteBusinessHomeStub
protected jakarta.ejb.EJBHome ejbRemoteBusinessHomeStub
-
remoteBusinessIntfInfo
protected final Map<String,com.sun.ejb.containers.RemoteBusinessIntfInfo> remoteBusinessIntfInfo
-
metadata
protected jakarta.ejb.EJBMetaData metadata
-
securityManager
protected final 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 final Map<Method,InvocationInfo> invocationInfoMap
-
scheduleIds
protected final Map<TimerPrimaryKey,Method> scheduleIds
-
webServiceInvocationInfoMap
protected final Map<Method,InvocationInfo> 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 volatile int containerState
-
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
-
executorProbeListener
protected EjbThreadPoolExecutorStatsProvider executorProbeListener
-
containerInfo
protected BaseContainer.ContainerInfo containerInfo
-
callFlowInfo
protected CallFlowInfo callFlowInfo
-
interceptorManager
protected InterceptorManager interceptorManager
-
invocationManager
protected InvocationManager invocationManager
-
injectionManager
protected InjectionManager injectionManager
-
namingManager
protected GlassfishNamingManager namingManager
-
transactionManager
protected JavaEETransactionManager transactionManager
-
ejbContainerUtilImpl
protected EjbContainerUtil ejbContainerUtilImpl
-
optIntfClassLoader
protected EjbOptionalIntfGenerator optIntfClassLoader
-
containerStateManager
protected EJBContainerStateManager containerStateManager
-
containerTransactionManager
protected EJBContainerTransactionManager containerTransactionManager
-
jcdiService
protected JCDIService jcdiService
-
-
Constructor Detail
-
BaseContainer
protected BaseContainer(BaseContainer.ContainerType type, EjbDescriptor ejbDesc, ClassLoader loader, SecurityManager sm) throws Exception
This constructor is called from ContainerFactoryImpl when an EJB Jar is deployed.- Throws:
Exception
-
-
Method Detail
-
initialize
public void initialize()
Description copied from interface:Container
Called after creation when Hazelcast is available- Specified by:
initialize
in interfaceContainer
-
getProtocolManager
protected ProtocolManager getProtocolManager()
-
getContainerType
public BaseContainer.ContainerType getContainerType()
-
doEJBHomeRemove
protected void doEJBHomeRemove(Object pk, Method m, boolean isLocal) throws RemoteException, jakarta.ejb.RemoveException
- Throws:
RemoteException
jakarta.ejb.RemoveException
-
initializeProtocolManager
protected void initializeProtocolManager()
-
preInitialize
protected void preInitialize(EjbDescriptor ejbDesc, ClassLoader loader)
-
checkUserTransactionLookup
public void checkUserTransactionLookup(ComponentInvocation inv) throws NameNotFoundException
- Throws:
NameNotFoundException
-
createCallFlowAgent
protected final void createCallFlowAgent(ComponentType compType)
-
setStartedState
public final void setStartedState()
Description copied from interface:Container
Start servicing invocations for EJB instances in this Container.- Specified by:
setStartedState
in interfaceContainer
-
setStoppedState
public final void setStoppedState()
Description copied from interface:Container
Stop 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:
setStoppedState
in interfaceContainer
-
isStopped
public final boolean isStopped()
-
setUndeployedState
public final void setUndeployedState()
Description copied from interface:Container
Stop 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:
setUndeployedState
in interfaceContainer
-
isUndeployed
public final boolean isUndeployed()
-
isTimedObject
public final boolean isTimedObject()
Description copied from interface:Container
Returns true if this Container uses EJB Timer Service.- Specified by:
isTimedObject
in interfaceContainer
-
isLocalObject
public final boolean isLocalObject()
Description copied from interface:Container
Returns true if the bean associated with this Container has a LocalHome/Local view OR a Local business view OR both.- Specified by:
isLocalObject
in interfaceContainer
-
isRemoteObject
public final boolean isRemoteObject()
Description copied from interface:Container
Returns true if the bean associated with this Container has a RemoteHome/Remote view OR a Remote business view OR both.- Specified by:
isRemoteObject
in interfaceContainer
-
getContainerClassLoader
public final ClassLoader getContainerClassLoader()
- Specified by:
getContainerClassLoader
in interfaceJavaEEContainer
-
getClassLoader
public final ClassLoader getClassLoader()
- Specified by:
getClassLoader
in interfaceContainer
- Specified by:
getClassLoader
in interfaceEjbContainerFacade
- Returns:
- the classloader of this container instance.
-
getUseThreadPoolId
public final String getUseThreadPoolId()
- Specified by:
getUseThreadPoolId
in interfaceEjbContainerFacade
-
getPassByReference
public final boolean getPassByReference()
- Specified by:
getPassByReference
in interfaceEjbContainerFacade
-
getContainerId
protected final long getContainerId()
-
getApplicationId
public final long getApplicationId()
-
getEjbDescriptor
public final EjbDescriptor getEjbDescriptor()
- Specified by:
getEjbDescriptor
in interfaceContainer
- Specified by:
getEjbDescriptor
in interfaceEjbContainerFacade
- Returns:
- the EjbDescriptor containing deployment information for the EJB type corresponding to this Container instance.
-
getDescriptor
public final Descriptor getDescriptor()
Method defined on JavaEEContainer- Specified by:
getDescriptor
in interfaceJavaEEContainer
-
getEJBMetaData
public final jakarta.ejb.EJBMetaData getEJBMetaData()
- Specified by:
getEJBMetaData
in interfaceContainer
- Returns:
- the MetaData for this EJB type.
-
getUserTransaction
public final jakarta.transaction.UserTransaction getUserTransaction()
-
isHAEnabled
public boolean isHAEnabled()
-
userTransactionMethodsAllowed
public boolean userTransactionMethodsAllowed(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:
userTransactionMethodsAllowed
in interfaceContainer
-
getEJBHomeStub
public final jakarta.ejb.EJBHome getEJBHomeStub()
-
getEJBHome
public final jakarta.ejb.EJBHome getEJBHome()
- Specified by:
getEJBHome
in 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 SecurityManager getSecurityManager()
- Specified by:
getSecurityManager
in 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 Exception
Called from the ContainerFactory during initialization.- Throws:
Exception
-
getJavaGlobalJndiNamePrefix
protected String getJavaGlobalJndiNamePrefix()
-
createEjbInstanceForInterceptors
public void createEjbInstanceForInterceptors(Object[] params, EJBContextImpl context) throws Exception
- Throws:
Exception
-
createEmptyContextAndInterceptors
protected void createEmptyContextAndInterceptors(EJBContextImpl context) throws Exception
- Throws:
Exception
-
createEjbInstanceAndContext
protected EJBContextImpl createEjbInstanceAndContext() throws Exception
- Throws:
Exception
-
isJCDIEnabled
protected boolean isJCDIEnabled()
-
_createJCDIInjectionContext
protected JCDIService.JCDIInjectionContext<?> _createJCDIInjectionContext(EJBContextImpl ctx, Object instance)
-
_createJCDIInjectionContext
protected JCDIService.JCDIInjectionContext<?> _createJCDIInjectionContext(EJBContextImpl ejbContext, Object instance, JCDIService.JCDIInjectionContext<?> cdiInjectionContext)
-
_constructEJBContextImpl
protected EJBContextImpl _constructEJBContextImpl(Object instance)
Must be overridden for any container that supports injection- Parameters:
instance
-- Returns:
EJBContextImpl
-
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:
getTargetObject
in interfaceContainer
- Specified by:
getTargetObject
in interfaceEjbContainerFacade
generatedRemoteBusinessIntf
- 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:
releaseTargetObject
in interfaceContainer
- Specified by:
releaseTargetObject
in interfaceEjbContainerFacade
-
externalPreInvoke
public void externalPreInvoke()
Description copied from interface:Container
Performs pre external invocation setup such as setting application context class loader. Called by getTargetObject() and web service inv- Specified by:
externalPreInvoke
in interfaceContainer
-
externalPostInvoke
public void externalPostInvoke()
Description copied from interface:Container
Performs post external invocation cleanup such as restoring the original class loader. Called by releaseTargetObject() and web service inv- Specified by:
externalPostInvoke
in 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(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:
lookupExtendedEntityManager
in interfaceJavaEEContainer
-
webServicePostInvoke
public void webServicePostInvoke(EjbInvocation inv)
Description copied from interface:Container
Called by webservice code to do ejb invocation post processing.- Specified by:
webServicePostInvoke
in interfaceContainer
-
postInvoke
public void postInvoke(EjbInvocation inv)
Called from EJBObject/EJBHome after invoking on bean.- Specified by:
postInvoke
in 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 RemoteException
Check 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 inv)
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.CreateException
RemoteException
-
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.RemoveException
jakarta.ejb.EJBException
RemoteException
-
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:Container
Remove a bean given primary key. Used by the PersistenceManager.- Specified by:
removeBeanUnchecked
in interfaceContainer
-
removeBeanUnchecked
public void removeBeanUnchecked(jakarta.ejb.EJBLocalObject bean)
Description copied from interface:Container
Remove a bean. Used by the PersistenceManager.- Specified by:
removeBeanUnchecked
in interfaceContainer
-
preSelect
public void preSelect()
Description copied from interface:Container
Notification 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:Container
Obtain an Entity EJBLocalObject corresponding to the primary key. Used by the PersistenceManager.- Specified by:
getEJBLocalObjectForPrimaryKey
in interfaceContainer
-
getEJBLocalObjectForPrimaryKey
public jakarta.ejb.EJBLocalObject getEJBLocalObjectForPrimaryKey(Object pkey)
- Specified by:
getEJBLocalObjectForPrimaryKey
in interfaceContainer
-
getEJBObjectForPrimaryKey
public jakarta.ejb.EJBObject getEJBObjectForPrimaryKey(Object pkey)
Description copied from interface:Container
Obtain an Entity EJBObject corresponding to the primary key. Used by the PersistenceManager.- Specified by:
getEJBObjectForPrimaryKey
in interfaceContainer
-
isIdentical
protected boolean isIdentical(EJBObjectImpl ejbo, jakarta.ejb.EJBObject other) throws RemoteException
- Throws:
RemoteException
-
getJaccEjb
public Object getJaccEjb(EjbInvocation inv)
Called-back from security implementation through EjbInvocation when a jacc policy provider wants an enterprise bean instance.- Specified by:
getJaccEjb
in 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:Container
Verify 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:
assertValidLocalObject
in 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:
assertValidRemoteObject
in 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(MethodDescriptor md, int txAttr) throws jakarta.ejb.EJBException
Validate transaction attribute value. Allow subclasses to add their own validation.- Throws:
jakarta.ejb.EJBException
-
findFlushEnabledAttr
protected boolean findFlushEnabledAttr(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:Container
Called 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:
postCreate
in interfaceContainer
primaryKey
- 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:Container
Called by the EJB(Local)Home after invoking ejbFind* on an EntityBean.- Specified by:
postFind
in interfaceContainer
primaryKeys
- 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:
getComponentId
in interfaceContainer
- Specified by:
getComponentId
in interfaceJavaEEContainer
-
startApplication
public void startApplication(boolean deploy)
Called after all the components in the container's application have deployed successfully.- Specified by:
startApplication
in interfaceContainer
- Parameters:
deploy
- true if this method is called during application deploy
-
callEJBTimeout
protected boolean callEJBTimeout(RuntimeTimerState timerState, EJBTimerService timerService) throws Exception
- Parameters:
timerState
-timerService
-- Returns:
- 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, 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:
onShutdown
in 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:
onTermination
in 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, 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(ComponentInvocation ci)
Description copied from interface:Container
Called from the TM when an EJB with Bean-Managed transactions starts a tx- Specified by:
doAfterBegin
in 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)
Checks if the exception is not null and if it is checked exception - uses ejb descriptor to resolve it.- Parameters:
exception
- can be null- Returns:
- true if the exception is not null and if it is not an unchecked exception
-
isSystemUncheckedException
protected boolean isSystemUncheckedException(Throwable exception)
Checks if the exception is not null and if it is a system unchecked exception - uses ejb descriptor to resolve it.- Parameters:
exception
- can be null- Returns:
- true if the exception is not null and if it is an unchecked 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<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 inv) 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()
-
-