public interface Container
There is one instance of the Container for each EJB type (deployment desc). When a JAR is deployed on the EJB server, a Container instance is created for each EJB declared in the ejb-jar.xml for the EJB JAR.
The Container interface provides methods called from other parts of the RI as well as from generated EJBHome/EJBObject implementations.
Modifier and Type | Field and Description |
---|---|
static int |
SEC_CHECKED |
static int |
SEC_EXCLUDED |
static int |
SEC_NOT_INITIALIZED |
static int |
SEC_UNCHECKED |
static String[] |
secAttrStrings |
static int |
TX_BEAN_MANAGED |
static int |
TX_MANDATORY |
static int |
TX_NEVER |
static int |
TX_NOT_INITIALIZED |
static int |
TX_NOT_SUPPORTED |
static int |
TX_REQUIRED |
static int |
TX_REQUIRES_NEW |
static int |
TX_SUPPORTS |
static String[] |
txAttrStrings |
Modifier and Type | Method and Description |
---|---|
void |
assertValidLocalObject(Object o)
Verify that a given object is an EJBLocalObject of an ejb from this
ejb container.
|
void |
assertValidRemoteObject(Object o)
Verify that a given object is an EJBObject of an ejb from this
ejb container.
|
boolean |
authorize(EjbInvocation inv)
Go through ejb container to do ejb security manager authorization.
|
void |
doAfterBegin(ComponentInvocation ci)
Called from the TM when an EJB with Bean-Managed transactions starts a tx
|
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.
|
ClassLoader |
getClassLoader() |
String |
getComponentId()
Called from NamingManagerImpl during java:comp/env lookup.
|
EjbDescriptor |
getEjbDescriptor() |
javax.ejb.EJBHome |
getEJBHome() |
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.
|
javax.ejb.EJBMetaData |
getEJBMetaData() |
javax.ejb.EJBObject |
getEJBObjectForPrimaryKey(Object pkey)
Obtain an Entity EJBObject corresponding to the primary key.
|
Object |
getJaccEjb(EjbInvocation inv)
Used by EjbInvocation during JACC EnterpriseBean policy handler request
for target EnterpriseBean instance.
|
SecurityManager |
getSecurityManager() |
Remote |
getTargetObject(byte[] instanceKey,
String remoteBusinessIntf)
Return the EJBObject/EJBHome for the given instanceKey.
|
default void |
initialize()
Called after creation when Hazelcast is available
|
boolean |
isLocalObject()
Returns true if the bean associated with this Container has a LocalHome/Local view
OR a Local business view OR both.
|
boolean |
isRemoteObject()
Returns true if the bean associated with this Container has a RemoteHome/Remote view
OR a Remote business view OR both.
|
boolean |
isTimedObject()
Returns true if this Container uses EJB Timer Service.
|
void |
onReady()
Called when server instance is Ready
|
void |
onShutdown()
Called when server instance is shuting down
|
void |
onTermination()
Called when server instance is terminating.
|
void |
postCreate(EjbInvocation inv,
Object primaryKey)
Called by the EJB(Local)Home after invoking ejbCreate on an EntityBean.
|
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 by the EJB(Local)Object/EJB(Local)Home after an invocation
on a bean.
|
void |
preInvoke(EjbInvocation inv)
Called by the EJB(Local)Object/EJB(Local)Home before an invocation
on a bean.
|
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.
|
void |
releaseTargetObject(Remote remoteObj)
Release the EJBObject/EJBHome object.
|
void |
removeBeanUnchecked(javax.ejb.EJBLocalObject bean)
Remove a bean.
|
void |
removeBeanUnchecked(Object pkey)
Remove a bean given primary key.
|
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 loaded successfully.
|
void |
undeploy()
Called from EJB JarManager when an application is undeployed.
|
boolean |
userTransactionMethodsAllowed(ComponentInvocation inv)
EJB spec makes a distinction between access to the UserTransaction
object itself and access to its methods.
|
void |
webServicePostInvoke(EjbInvocation inv)
Called by webservice code to do ejb invocation post processing.
|
static final int TX_NOT_INITIALIZED
static final int TX_NOT_SUPPORTED
static final int TX_BEAN_MANAGED
static final int TX_REQUIRED
static final int TX_SUPPORTS
static final int TX_REQUIRES_NEW
static final int TX_MANDATORY
static final int TX_NEVER
static final String[] txAttrStrings
static final int SEC_NOT_INITIALIZED
static final int SEC_UNCHECKED
static final int SEC_EXCLUDED
static final int SEC_CHECKED
static final String[] secAttrStrings
Remote getTargetObject(byte[] instanceKey, String remoteBusinessIntf)
remoteBusinessIntf
- 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.void releaseTargetObject(Remote remoteObj)
void externalPreInvoke()
void externalPostInvoke()
javax.ejb.EJBObject getEJBObjectForPrimaryKey(Object pkey)
javax.ejb.EJBLocalObject getEJBLocalObjectForPrimaryKey(Object pkey, javax.ejb.EJBContext ctx)
javax.ejb.EJBLocalObject getEJBLocalObjectForPrimaryKey(Object pkey)
void assertValidLocalObject(Object o) throws javax.ejb.EJBException
javax.ejb.EJBException
- Thrown when the assertion fails.void assertValidRemoteObject(Object o) throws javax.ejb.EJBException
javax.ejb.EJBException
- Thrown when the assertion fails.void removeBeanUnchecked(javax.ejb.EJBLocalObject bean)
void removeBeanUnchecked(Object pkey)
void preSelect() throws javax.ejb.EJBException
javax.ejb.EJBException
- Thrown if an error occurs
during the preSelect actions performed by the container.
If thrown, the remaining select query steps should be
aborted and an EJBException should be propagated
back to the application code.void preInvoke(EjbInvocation inv)
void postInvoke(EjbInvocation inv)
void webServicePostInvoke(EjbInvocation inv)
default void initialize()
void postCreate(EjbInvocation inv, Object primaryKey) throws javax.ejb.CreateException
primaryKey
- the value returned from ejbCreate.javax.ejb.CreateException
Object postFind(EjbInvocation inv, Object primaryKeys, Object[] findParams) throws javax.ejb.FinderException
primaryKeys
- the primaryKey or collection of primaryKeys
(Collection/Enumeration) returned from ejbFind.findParams
- the parameters to the ejbFind method.javax.ejb.FinderException
EjbDescriptor getEjbDescriptor()
javax.ejb.EJBMetaData getEJBMetaData()
ClassLoader getClassLoader()
javax.ejb.EJBHome getEJBHome()
SecurityManager getSecurityManager()
boolean userTransactionMethodsAllowed(ComponentInvocation inv)
void doAfterBegin(ComponentInvocation ci)
void startApplication(boolean deploy)
deploy
- true if this method is called during application deployvoid undeploy()
void onReady()
void onShutdown()
void onTermination()
String getComponentId()
void setStartedState()
void setStoppedState()
void setUndeployedState()
Object getJaccEjb(EjbInvocation inv)
boolean authorize(EjbInvocation inv)
boolean isTimedObject()
boolean isLocalObject()
boolean isRemoteObject()
Copyright © 2019. All rights reserved.