public abstract class BaseContainer extends Object implements Container, EjbContainerFacade, JavaEEContainer
Modifier and Type | Class and Description |
---|---|
static class |
BaseContainer.ContainerInfo
Strings for monitoring info
|
static 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.
|
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
Modifier | Constructor and Description |
---|---|
protected |
BaseContainer(BaseContainer.ContainerType type,
EjbDescriptor ejbDesc,
ClassLoader loader,
SecurityManager sm)
This constructor is called from ContainerFactoryImpl when an
EJB Jar is deployed.
|
Modifier and Type | Method and Description |
---|---|
protected EJBContextImpl |
_constructEJBContextImpl(Object instance)
Must be overridden for any container that supports injection
|
protected 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(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-ref
|
protected void |
delistExtendedEntityManagers(ComponentContext ctx) |
void |
doAfterBegin(ComponentInvocation ci)
Called from the TM when an EJB with Bean-Managed transactions starts a tx
|
protected 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 JavaEEContainer
|
Class |
getEJBClass() |
EjbDescriptor |
getEjbDescriptor() |
javax.ejb.EJBHome |
getEJBHome() |
protected EJBHomeInvocationHandler |
getEJBHomeInvocationHandler(Class homeIntfClass) |
javax.ejb.EJBHome |
getEJBHomeStub() |
GenericEJBLocalHome |
getEJBLocalBusinessHome(String clientViewClassName)
Return an object that implements ejb's local business home interface.
|
javax.ejb.EJBLocalHome |
getEJBLocalHome()
Return an object that implements ejb's local home interface.
|
protected EJBLocalHomeInvocationHandler |
getEJBLocalHomeInvocationHandler(Class homeIntfClass) |
javax.ejb.EJBLocalObject |
getEJBLocalObjectForPrimaryKey(Object pkey) |
javax.ejb.EJBLocalObject |
getEJBLocalObjectForPrimaryKey(Object pkey,
javax.ejb.EJBContext ctx)
Obtain an Entity EJBLocalObject corresponding to the primary key.
|
protected EJBLocalObjectImpl |
getEJBLocalObjectImpl(Object key) |
javax.ejb.EJBMetaData |
getEJBMetaData() |
javax.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) |
UserTransaction |
getUserTransaction() |
String |
getUseThreadPoolId() |
protected void |
incrementCreatedTimedObject() |
protected void |
incrementDeliveredTimedObject() |
protected void |
incrementRemovedTimedObject() |
void |
initialize()
Called after creation when Hazelcast is available
|
protected 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(javax.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,
javax.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() |
javax.persistence.EntityManager |
lookupExtendedEntityManager(javax.persistence.EntityManagerFactory emf)
Containers that allow extended EntityManager will override this method.
|
void |
onEnteringContainer() |
void |
onLeavingContainer() |
void |
onReady()
Called when server instance is Ready
|
void |
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(javax.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(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.
|
protected static final Logger _logger
protected static final Class[] NO_PARAMS
protected Object[] logParams
protected BaseContainer.ContainerType containerType
protected static final int EJBObject_getPrimaryKey
protected static final int EJBLocalObject_getPrimaryKey
protected static final String SINGLETON_BEAN_POOL_PROP
protected ClassLoader loader
protected Class<?> ejbClass
protected Class sfsbSerializedClass
protected Method ejbPassivateMethod
protected Method ejbActivateMethod
protected Method ejbRemoveMethod
protected Class webServiceEndpointIntf
protected boolean isWebServiceEndpoint
protected boolean isLocal
protected boolean hasLocalHomeView
protected boolean hasLocalBusinessView
protected boolean hasOptionalLocalBusinessView
protected Class ejbGeneratedOptionalLocalBusinessIntfClass
protected Class localHomeIntf
protected javax.ejb.EJBLocalHome ejbLocalHome
protected EJBLocalHomeImpl ejbLocalHomeImpl
protected Class localBusinessHomeIntf
protected Class ejbOptionalLocalBusinessHomeIntf
protected GenericEJBLocalHome ejbLocalBusinessHome
protected GenericEJBLocalHome ejbOptionalLocalBusinessHome
protected EJBLocalHomeImpl ejbLocalBusinessHomeImpl
protected EJBLocalHomeImpl ejbOptionalLocalBusinessHomeImpl
protected boolean isRemote
protected boolean hasRemoteHomeView
protected boolean hasRemoteBusinessView
protected Class homeIntf
protected Class remoteIntf
protected EJBHomeImpl ejbHomeImpl
protected javax.ejb.EJBHome ejbHome
protected javax.ejb.EJBHome ejbHomeStub
protected RemoteReferenceFactory remoteHomeRefFactory
protected Class remoteBusinessHomeIntf
protected EJBHomeImpl ejbRemoteBusinessHomeImpl
protected javax.ejb.EJBHome ejbRemoteBusinessHome
protected javax.ejb.EJBHome ejbRemoteBusinessHomeStub
protected final Map<String,com.sun.ejb.containers.RemoteBusinessIntfInfo> remoteBusinessIntfInfo
protected javax.ejb.EJBMetaData metadata
protected final SecurityManager securityManager
protected boolean isSession
protected boolean isStatelessSession
protected boolean isStatefulSession
protected boolean isMessageDriven
protected boolean isSingleton
protected EjbDescriptor ejbDescriptor
protected String componentId
protected final Map<Method,InvocationInfo> invocationInfoMap
protected final Map<TimerPrimaryKey,Method> scheduleIds
protected final Map<Method,InvocationInfo> webServiceInvocationInfoMap
protected Method[] ejbIntfMethods
protected InvocationInfo[] ejbIntfMethodInfo
protected Properties envProps
protected boolean isBeanManagedTran
protected boolean debugMonitorFlag
protected static final int CONTAINER_INITIALIZING
protected static final int CONTAINER_STARTED
protected static final int CONTAINER_STOPPED
protected static final int CONTAINER_UNDEPLOYED
protected static final int CONTAINER_ON_HOLD
protected volatile int containerState
protected EjbMonitoringStatsProvider ejbProbeListener
protected EjbMonitoringProbeProvider ejbProbeNotifier
protected EjbTimedObjectStatsProvider timerProbeListener
protected EjbTimedObjectProbeProvider timerProbeNotifier
protected EjbPoolStatsProvider poolProbeListener
protected EjbCacheProbeProvider cacheProbeNotifier
protected EjbCacheStatsProvider cacheProbeListener
protected EjbThreadPoolExecutorStatsProvider executorProbeListener
protected BaseContainer.ContainerInfo containerInfo
protected CallFlowInfo callFlowInfo
protected InterceptorManager interceptorManager
protected InvocationManager invocationManager
protected InjectionManager injectionManager
protected GlassfishNamingManager namingManager
protected JavaEETransactionManager transactionManager
protected EjbContainerUtil ejbContainerUtilImpl
protected EjbOptionalIntfGenerator optIntfClassLoader
protected EJBContainerStateManager containerStateManager
protected EJBContainerTransactionManager containerTransactionManager
protected JCDIService jcdiService
protected BaseContainer(BaseContainer.ContainerType type, EjbDescriptor ejbDesc, ClassLoader loader, SecurityManager sm) throws Exception
Exception
public void initialize()
Container
initialize
in interface Container
protected ProtocolManager getProtocolManager()
public BaseContainer.ContainerType getContainerType()
protected void doEJBHomeRemove(Object pk, Method m, boolean isLocal) throws RemoteException, javax.ejb.RemoveException
RemoteException
javax.ejb.RemoveException
protected void initializeProtocolManager()
protected void preInitialize(EjbDescriptor ejbDesc, ClassLoader loader)
public void checkUserTransactionLookup(ComponentInvocation inv) throws NameNotFoundException
NameNotFoundException
protected final void createCallFlowAgent(ComponentType compType)
public final void setStartedState()
Container
setStartedState
in interface Container
public final void setStoppedState()
Container
setStoppedState
in interface Container
public final boolean isStopped()
public final void setUndeployedState()
Container
setUndeployedState
in interface Container
public final boolean isUndeployed()
public final boolean isTimedObject()
Container
isTimedObject
in interface Container
public final boolean isLocalObject()
Container
isLocalObject
in interface Container
public final boolean isRemoteObject()
Container
isRemoteObject
in interface Container
public final ClassLoader getContainerClassLoader()
getContainerClassLoader
in interface JavaEEContainer
public final ClassLoader getClassLoader()
getClassLoader
in interface Container
getClassLoader
in interface EjbContainerFacade
public final String getUseThreadPoolId()
getUseThreadPoolId
in interface EjbContainerFacade
public final boolean getPassByReference()
getPassByReference
in interface EjbContainerFacade
protected final long getContainerId()
public final long getApplicationId()
public final EjbDescriptor getEjbDescriptor()
getEjbDescriptor
in interface Container
getEjbDescriptor
in interface EjbContainerFacade
public final Descriptor getDescriptor()
getDescriptor
in interface JavaEEContainer
public final javax.ejb.EJBMetaData getEJBMetaData()
getEJBMetaData
in interface Container
public final UserTransaction getUserTransaction()
public boolean isHAEnabled()
public boolean userTransactionMethodsAllowed(ComponentInvocation inv)
userTransactionMethodsAllowed
in interface Container
public final javax.ejb.EJBHome getEJBHomeStub()
public final javax.ejb.EJBHome getEJBHome()
getEJBHome
in interface Container
public final javax.ejb.EJBLocalHome getEJBLocalHome()
public final GenericEJBLocalHome getEJBLocalBusinessHome(String clientViewClassName)
public final Class getEJBClass()
public final SecurityManager getSecurityManager()
getSecurityManager
in interface Container
public Remote createRemoteReferenceWithId(byte[] instanceKey, String generatedRemoteBusinessIntf)
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 viewprotected void initializeHome() throws Exception
Exception
protected String getJavaGlobalJndiNamePrefix()
public void createEjbInstanceForInterceptors(Object[] params, EJBContextImpl context) throws Exception
Exception
protected void createEmptyContextAndInterceptors(EJBContextImpl context) throws Exception
Exception
protected EJBContextImpl createEjbInstanceAndContext() throws Exception
Exception
protected boolean isJCDIEnabled()
protected JCDIService.JCDIInjectionContext<?> _createJCDIInjectionContext(EJBContextImpl ctx, Object instance)
protected JCDIService.JCDIInjectionContext<?> _createJCDIInjectionContext(EJBContextImpl ejbContext, Object instance, JCDIService.JCDIInjectionContext<?> cdiInjectionContext)
protected EJBContextImpl _constructEJBContextImpl(Object instance)
instance
- EJBContextImpl
protected void injectEjbInstance(EJBContextImpl context) throws Exception
Exception
protected void cleanupInstance(EJBContextImpl context)
public Remote getTargetObject(byte[] instanceKey, String generatedRemoteBusinessIntf)
getTargetObject
in interface Container
getTargetObject
in interface EjbContainerFacade
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.javax.ejb.NoSuchObjectLocalException
- if the target object does not existpublic void releaseTargetObject(Remote remoteObj)
releaseTargetObject
in interface Container
releaseTargetObject
in interface EjbContainerFacade
public void externalPreInvoke()
Container
externalPreInvoke
in interface Container
public void externalPostInvoke()
Container
externalPostInvoke
in interface Container
public void preInvoke(EjbInvocation inv)
public boolean intercept(LifecycleCallbackDescriptor.CallbackType eventType, EJBContextImpl ctx) throws Throwable
Throwable
protected void enlistExtendedEntityManagers(ComponentContext ctx)
protected void delistExtendedEntityManagers(ComponentContext ctx)
public javax.persistence.EntityManager lookupExtendedEntityManager(javax.persistence.EntityManagerFactory emf)
lookupExtendedEntityManager
in interface JavaEEContainer
public void webServicePostInvoke(EjbInvocation inv)
Container
webServicePostInvoke
in interface Container
public void postInvoke(EjbInvocation inv)
postInvoke
in interface Container
protected void postInvoke(EjbInvocation inv, boolean doTxProcessing)
protected void authorizeLocalMethod(int method)
method
- an integer identifying the method to be checked,
must be one of the EJBLocal{Home|Object}_* constants.protected void authorizeRemoteMethod(int method) throws RemoteException
method
- an integer identifying the method to be checked,
must be one of the EJB{Home|Object}_* constants.RemoteException
public boolean authorize(EjbInvocation inv)
protected void cancelTimers(Object key)
protected boolean isEjbTimeoutMethod(Method m)
protected abstract EJBObjectImpl createEJBObjectImpl() throws javax.ejb.CreateException, RemoteException
javax.ejb.CreateException
RemoteException
protected EJBLocalObjectImpl createEJBLocalObjectImpl() throws javax.ejb.CreateException
javax.ejb.CreateException
protected abstract EJBObjectImpl getEJBObjectImpl(byte[] streamKey)
protected EJBLocalObjectImpl getEJBLocalObjectImpl(Object key)
protected void checkExists(EJBLocalRemoteObject ejbObj)
javax.ejb.NoSuchObjectLocalException
- if the object has been removed.protected final ComponentContext getContext(EjbInvocation inv) throws javax.ejb.EJBException
javax.ejb.EJBException
protected final Object getInvocationKey(EjbInvocation inv)
protected abstract ComponentContext _getContext(EjbInvocation inv) throws javax.ejb.EJBException
javax.ejb.EJBException
protected abstract void releaseContext(EjbInvocation inv) throws javax.ejb.EJBException
javax.ejb.EJBException
protected abstract boolean passivateEJB(ComponentContext context)
protected abstract void forceDestroyBean(EJBContextImpl sc) throws javax.ejb.EJBException
javax.ejb.EJBException
protected abstract void removeBean(EJBLocalRemoteObject ejbo, Method removeMethod, boolean local) throws javax.ejb.RemoveException, javax.ejb.EJBException, RemoteException
javax.ejb.RemoveException
javax.ejb.EJBException
RemoteException
protected void authorizeLocalGetPrimaryKey(EJBLocalRemoteObject ejbObj) throws javax.ejb.EJBException
javax.ejb.EJBException
protected void authorizeRemoteGetPrimaryKey(EJBLocalRemoteObject ejbObj) throws RemoteException
RemoteException
protected Object invokeFindByPrimaryKey(Method method, EjbInvocation inv, Object[] args) throws Throwable
Throwable
public void removeBeanUnchecked(Object pkey)
Container
removeBeanUnchecked
in interface Container
public void removeBeanUnchecked(javax.ejb.EJBLocalObject bean)
Container
removeBeanUnchecked
in interface Container
public void preSelect()
Container
public javax.ejb.EJBLocalObject getEJBLocalObjectForPrimaryKey(Object pkey, javax.ejb.EJBContext ctx)
Container
getEJBLocalObjectForPrimaryKey
in interface Container
public javax.ejb.EJBLocalObject getEJBLocalObjectForPrimaryKey(Object pkey)
getEJBLocalObjectForPrimaryKey
in interface Container
public javax.ejb.EJBObject getEJBObjectForPrimaryKey(Object pkey)
Container
getEJBObjectForPrimaryKey
in interface Container
protected boolean isIdentical(EJBObjectImpl ejbo, javax.ejb.EJBObject other) throws RemoteException
RemoteException
public Object getJaccEjb(EjbInvocation inv)
getJaccEjb
in interface Container
public void assertValidLocalObject(Object o) throws javax.ejb.EJBException
Container
assertValidLocalObject
in interface Container
javax.ejb.EJBException
- Thrown when the assertion fails.public void assertValidRemoteObject(Object o) throws javax.ejb.EJBException
assertValidRemoteObject
in interface Container
javax.ejb.EJBException
- Thrown when the assertion fails.protected final int getTxAttr(Method method, String methodIntf) throws javax.ejb.EJBException
javax.ejb.EJBException
protected final int getTxAttr(EjbInvocation inv) throws javax.ejb.EJBException
javax.ejb.EJBException
protected boolean isCreateHomeFinder(Method method)
protected InvocationInfo addInvocationInfo(Method method, String methodIntf, Class originalIntf) throws javax.ejb.EJBException
javax.ejb.EJBException
protected void adjustInvocationInfo(InvocationInfo invInfo, Method method, int txAttr, boolean flushEnabled, String methodIntf, Class originalIntf) throws javax.ejb.EJBException
javax.ejb.EJBException
protected InvocationInfo postProcessInvocationInfo(InvocationInfo invInfo)
protected void adjustHomeTargetMethodInfo(InvocationInfo invInfo, String methodName, Class[] paramTypes) throws NoSuchMethodException
NoSuchMethodException
protected String[] getPre30LifecycleMethodNames()
protected void addLocalRemoteInvocationInfo() throws Exception
Exception
protected void validateTxAttr(MethodDescriptor md, int txAttr) throws javax.ejb.EJBException
javax.ejb.EJBException
protected boolean findFlushEnabledAttr(MethodDescriptor md)
protected void addProxyInterfacesSetClass(Set proxyInterfacesSet, boolean local)
protected EJBHomeInvocationHandler getEJBHomeInvocationHandler(Class homeIntfClass) throws Exception
Exception
protected EjbInvocation createEjbInvocation()
protected EjbInvocation createEjbInvocation(Object ejb, ComponentContext context)
protected EJBLocalHomeInvocationHandler getEJBLocalHomeInvocationHandler(Class homeIntfClass) throws Exception
Exception
protected EJBLocalObjectImpl instantiateEJBLocalObjectImpl() throws Exception
Exception
protected EJBLocalObjectImpl instantiateEJBLocalObjectImpl(Object key) throws Exception
Exception
protected EJBLocalObjectImpl instantiateEJBLocalBusinessObjectImpl() throws Exception
Exception
protected EJBLocalObjectImpl instantiateOptionalEJBLocalBusinessObjectImpl() throws Exception
Exception
protected EJBObjectImpl instantiateEJBObjectImpl() throws Exception
Exception
protected EJBObjectImpl instantiateEJBObjectImpl(javax.ejb.EJBObject ejbStub, Object key) throws Exception
Exception
protected EJBObjectImpl instantiateRemoteBusinessObjectImpl() throws Exception
Exception
public boolean scanForEjbCreateMethod()
public void postCreate(EjbInvocation inv, Object primaryKey) throws javax.ejb.CreateException
Container
postCreate
in interface Container
primaryKey
- the value returned from ejbCreate.javax.ejb.CreateException
public Object postFind(EjbInvocation inv, Object primaryKeys, Object[] findParams) throws javax.ejb.FinderException
Container
postFind
in interface Container
primaryKeys
- the primaryKey or collection of primaryKeys
(Collection/Enumeration) returned from ejbFind.findParams
- the parameters to the ejbFind method.javax.ejb.FinderException
public String getComponentId()
getComponentId
in interface Container
getComponentId
in interface JavaEEContainer
public void startApplication(boolean deploy)
startApplication
in interface Container
deploy
- true if this method is called during application deployprotected boolean callEJBTimeout(RuntimeTimerState timerState, EJBTimerService timerService) throws Exception
timerState
- timerService
- Exception
protected Method getTimeoutMethod(RuntimeTimerState timerState)
protected boolean postEjbTimeout(RuntimeTimerState timerState, EJBTimerService timerService)
protected void prepareEjbTimeoutParams(EjbInvocation inv, RuntimeTimerState timerState, EJBTimerService timerService)
public final void onEnteringContainer()
public final void onLeavingContainer()
protected Object invokeTargetBeanMethod(Method beanClassMethod, EjbInvocation inv, Object target, Object[] params, SecurityManager mgr) throws Throwable
Throwable
protected void doTimerInvocationInit(EjbInvocation inv, Object primaryKey) throws Exception
Exception
public final void undeploy()
public final void onShutdown()
onShutdown
in interface Container
protected abstract void doConcreteContainerShutdown(boolean appBeingUndeployed)
public void onReady()
public void onTermination()
onTermination
in interface Container
protected final void preInvokeTx(EjbInvocation inv) throws Exception
Exception
protected void checkUnfinishedTx(Transaction prevTx, EjbInvocation inv)
protected boolean suspendTransaction(EjbInvocation inv) throws Exception
Exception
protected boolean resumeTransaction(EjbInvocation inv) throws Exception
Exception
protected void useClientTx(Transaction prevTx, EjbInvocation inv)
protected void validateEMForClientTx(EjbInvocation inv, JavaEETransaction t)
protected void postInvokeTx(EjbInvocation inv) throws Exception
Exception
protected Throwable checkExceptionClientTx(EJBContextImpl context, Throwable exception) throws Exception
Exception
public final void doAfterBegin(ComponentInvocation ci)
Container
doAfterBegin
in interface Container
protected abstract void afterBegin(EJBContextImpl context)
protected abstract void beforeCompletion(EJBContextImpl context)
protected abstract void afterCompletion(EJBContextImpl context, int status)
protected void preInvokeNoTx(EjbInvocation inv)
protected void postInvokeNoTx(EjbInvocation inv)
protected boolean isApplicationException(Throwable exception)
exception
- can be nullprotected boolean isSystemUncheckedException(Throwable exception)
exception
- can be nullpublic boolean getDebugMonitorFlag()
public void setDebugMonitorFlag(boolean flag)
protected static final String containerStateToString(int state)
protected final boolean isRemoteInterfaceSupported()
protected final boolean isLocalInterfaceSupported()
protected int getTxAttrForLifecycleCallback(Set<LifecycleCallbackDescriptor> lifecycleCallbackDescriptors, int defaultTxAttr, int... validateTxAttr) throws Exception
Exception
protected Object intercept(EjbInvocation inv) throws Throwable
Throwable
public Object invokeBeanMethod(EjbInvocation inv) throws Throwable
Throwable
protected abstract EjbMonitoringStatsProvider getMonitoringStatsProvider(String appName, String modName, String ejbName)
protected void createMonitoringRegistry()
protected String[] getMonitoringMethodsArray()
protected String[] getMonitoringMethodsArray(boolean hasGeneratedClasses)
protected void doFlush(EjbInvocation inv)
protected void registerMonitorableComponents()
protected void registerTimerMonitorableComponent()
protected void incrementCreatedTimedObject()
protected void incrementRemovedTimedObject()
protected void incrementDeliveredTimedObject()
Copyright © 2021. All rights reserved.