org.objectweb.jonas_ejb.container
Class JSessionSwitch
java.lang.Object
|
+--org.objectweb.jonas_ejb.container.JSessionSwitch
- All Implemented Interfaces:
- TimerEventListener
- Direct Known Subclasses:
- JStatefulSwitch, JStatelessSwitch
- public abstract class JSessionSwitch
- extends java.lang.Object
- implements TimerEventListener
JSessionSwitch holds all the code that is common to EJBObject ans
EJBLocalObject for session beans. It mainly keep a reference on the
SessionContext and is used to manage the timeout for the session.
This class has 2 subclasses, depending if session is stateless or stateful.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
bf
protected JSessionFactory bf
local
protected JSessionLocal local
remote
protected JSessionRemote remote
mytimer
protected TimerEvent mytimer
JSessionSwitch
public JSessionSwitch(JSessionFactory bf)
throws java.rmi.RemoteException
- constructor.
a new object is build when the pool managed by JSessionFactory becomes empty.
getLocal
public JSessionLocal getLocal()
- Return the underlaying EJBLocalObject
getRemote
public JSessionRemote getRemote()
- Return the underlaying EJBObject
getBeanFactory
public JSessionFactory getBeanFactory()
- Return the BeanFactory
startTimer
public void startTimer(int timeout)
stopTimer
public void stopTimer()
getICtx
public abstract JSessionContext getICtx(javax.transaction.Transaction tx)
throws java.rmi.RemoteException
releaseICtx
public abstract void releaseICtx(javax.transaction.Transaction tx)
setMustCommit
public abstract void setMustCommit(boolean mc)