|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.easybeans.container.EasyBeansEJBContext
org.objectweb.easybeans.container.session.EasyBeansSessionContext<BeanType>
BeanType
- Could be a stateless or stateful.public class EasyBeansSessionContext<BeanType extends EasyBeansSB>
Defines the Session Context used by Stateless and Stateful beans.
Field Summary | |
---|---|
private BeanType |
bean
Reference to the bean. |
private javax.transaction.Transaction |
beanTransaction
Transaction used by this bean. |
Constructor Summary | |
---|---|
EasyBeansSessionContext(BeanType bean)
Build a new Session context. |
Method Summary | ||
---|---|---|
BeanType |
getBean()
Gets the bean of this context. |
|
javax.transaction.Transaction |
getBeanTransaction()
Gets the transaction used by this bean. |
|
|
getBusinessObject(java.lang.Class<T> businessInterface)
Obtain an object that can be used to invoke the current bean through the given business interface. |
|
javax.ejb.EJBLocalObject |
getEJBLocalObject()
Obtain a reference to the EJB local object that is associated with the instance. |
|
javax.ejb.EJBObject |
getEJBObject()
Obtain a reference to the EJB object that is currently associated with the instance. |
|
java.lang.Class |
getInvokedBusinessInterface()
Obtain the business interface through which the current business method invocation was made. |
|
javax.xml.rpc.handler.MessageContext |
getMessageContext()
Obtain a reference to the JAX-RPC MessageContext. |
|
void |
setBeanTransaction(javax.transaction.Transaction beanTransaction)
Sets the transaction used by this bean. |
Methods inherited from class org.objectweb.easybeans.container.EasyBeansEJBContext |
---|
getCallerIdentity, getCallerPrincipal, getEJBHome, getEJBLocalHome, getEnvironment, getRollbackOnly, getTimerService, getUserTransaction, isCallerInRole, isCallerInRole, lookup, setRollbackOnly, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.ejb.EJBContext |
---|
getCallerIdentity, getCallerPrincipal, getEJBHome, getEJBLocalHome, getEnvironment, getRollbackOnly, getTimerService, getUserTransaction, isCallerInRole, isCallerInRole, lookup, setRollbackOnly |
Field Detail |
---|
private BeanType extends EasyBeansSB bean
private javax.transaction.Transaction beanTransaction
Constructor Detail |
---|
public EasyBeansSessionContext(BeanType bean)
bean
- the bean on which we are linked.Method Detail |
---|
public javax.transaction.Transaction getBeanTransaction()
public void setBeanTransaction(javax.transaction.Transaction beanTransaction)
beanTransaction
- the bean transaction.public BeanType getBean()
public javax.ejb.EJBLocalObject getEJBLocalObject() throws java.lang.IllegalStateException
getEJBLocalObject
in interface SessionContext
java.lang.IllegalStateException
- - Thrown if the instance invokes
this method while the instance is in a state that does not allow
the instance to invoke this method, or if the instance does not
have a local interface.public javax.ejb.EJBObject getEJBObject() throws java.lang.IllegalStateException
getEJBObject
in interface SessionContext
java.lang.IllegalStateException
- - Thrown if the instance invokes
this method while the instance is in a state that does not allow
the instance to invoke this method, or if the instance does not
have a remote interface.public javax.xml.rpc.handler.MessageContext getMessageContext() throws java.lang.IllegalStateException
getMessageContext
in interface SessionContext
java.lang.IllegalStateException
- - Thrown if this method is
invoked while the instance is in a state that does not allow
access to this method.public <T> T getBusinessObject(java.lang.Class<T> businessInterface) throws java.lang.IllegalStateException
getBusinessObject
in interface SessionContext
T
- the interface of the beanbusinessInterface
- One of the local business interfaces or
remote business interfaces for this session bean.
java.lang.IllegalStateException
- - Thrown if this method is invoked with an
invalid business interface for the current bean.public java.lang.Class getInvokedBusinessInterface() throws java.lang.IllegalStateException
getInvokedBusinessInterface
in interface SessionContext
java.lang.IllegalStateException
- - Thrown if this method is called and the
bean has not been invoked through a business interface.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |