|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ow2.jonas.lib.ejb21.JContext org.ow2.jonas.lib.ejb21.JSessionContext
public abstract class JSessionContext
This class implements javax.ejb.SessionContext interface. it should be implemented by JStatefulContext and JStatelessContext depending if the beans is stateful or stateless.
Field Summary | |
---|---|
protected JSessionSwitch |
bs
|
protected boolean |
ismarkedremoved
|
Fields inherited from class org.ow2.jonas.lib.ejb21.JContext |
---|
bf, CTX_STATE_ACTIVE, CTX_STATE_COMMITTING, CTX_STATE_FINDING, CTX_STATE_INITIAL, CTX_STATE_PASSIVE, myinstance, tm |
Constructor Summary | |
---|---|
JSessionContext(JSessionFactory bf,
SessionBean eb)
Constructs a SessionContext |
Method Summary | ||
---|---|---|
|
getBusinessObject(Class<T> businessInterface)
Obtain an object that can be used to invoke the current bean through the given business interface. |
|
EJBLocalObject |
getEJBLocalObject()
Obtain a reference to the EJB local object that is currently associated with the instance. |
|
EJBObject |
getEJBObject()
Obtains a reference to the EJB object that is currently associated with the instance. |
|
SessionBean |
getInstance()
Returns the bean instance of this context Used in the generated classes to retrieve the instance |
|
Class |
getInvokedBusinessInterface()
Obtain the business interface through which the current business method invocation was made. |
|
abstract MessageContext |
getMessageContext()
Obtain a reference to the JAX-RPC MessageContext. |
|
boolean |
getRollbackOnly()
Tests if the transaction has been marked for rollback only. |
|
void |
initSessionContext(JSessionSwitch bs)
Reinit Context for reuse |
|
boolean |
isMarkedRemoved()
|
|
abstract void |
setConnectionList(List conlist)
|
|
abstract void |
setRemoved()
|
Methods inherited from class org.ow2.jonas.lib.ejb21.JContext |
---|
getCallerIdentity, getCallerPrincipal, getEJBHome, getEJBLocalHome, getEnvironment, getState, getTimerService, getUserTransaction, getWorkManager, isCallerInRole, isCallerInRole, lookup, setActive, setCommitting, setFinding, setPassive, setRollbackOnly, setState |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.ejb.EJBContext |
---|
getCallerIdentity, getCallerPrincipal, getEJBHome, getEJBLocalHome, getEnvironment, getTimerService, getUserTransaction, isCallerInRole, isCallerInRole, lookup, setRollbackOnly |
Field Detail |
---|
protected JSessionSwitch bs
protected boolean ismarkedremoved
Constructor Detail |
---|
public JSessionContext(JSessionFactory bf, SessionBean eb)
bf
- The Session Factoryeb
- The Session bean instanceMethod Detail |
---|
public EJBObject getEJBObject() throws IllegalStateException
getEJBObject
in interface SessionContext
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.public EJBLocalObject getEJBLocalObject() throws IllegalStateException
getEJBLocalObject
in interface SessionContext
IllegalStateException
- - 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 abstract MessageContext getMessageContext() throws IllegalStateException
getMessageContext
in interface SessionContext
IllegalStateException
- - the instance is in a state that
does not allow access to this method.public boolean getRollbackOnly() throws IllegalStateException
getRollbackOnly
in interface EJBContext
getRollbackOnly
in class JContext
IllegalStateException
- if state is 0public void initSessionContext(JSessionSwitch bs)
bs
- The SessionSwitch to reuse.public SessionBean getInstance() throws RemoteException
RemoteException
- if no instancepublic boolean isMarkedRemoved()
public <T> T getBusinessObject(Class<T> businessInterface) throws 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.
IllegalStateException
- - Thrown if this method is invoked with an
invalid business interface for the current bean.public Class getInvokedBusinessInterface() throws IllegalStateException
getInvokedBusinessInterface
in interface SessionContext
IllegalStateException
- - Thrown if this method is called and the
bean has not been invoked through a business interface.public abstract void setRemoved() throws RemoteException, RemoveException
RemoteException
RemoveException
public abstract void setConnectionList(List conlist)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |