org.objectweb.jonas_ejb.container
Class JStatefulSwitch

java.lang.Object
  |
  +--org.objectweb.jonas_ejb.container.JSessionSwitch
        |
        +--org.objectweb.jonas_ejb.container.JStatefulSwitch
All Implemented Interfaces:
TimerEventListener

public class JStatefulSwitch
extends JSessionSwitch

JStatefulSwitch is the implementation of JSessionSwitch dedicated to the Stateful Session Bean.


Fields inherited from class org.objectweb.jonas_ejb.container.JSessionSwitch
bf, local, mytimer, remote
 
Constructor Summary
JStatefulSwitch(JStatefulFactory bf, JStatefulPool sfp)
          constructor.
 
Method Summary
 void bindICtx(javax.transaction.Transaction tx, JStatefulContext bctx)
          At each create, bind the Context to the transaction
 JSessionContext getICtx(javax.transaction.Transaction tx)
          At each business method, get a BeanContext to run it
 boolean isInTransaction()
          Returns True if bean is participating in a client transaction This is used for remove on stateful session beans only.
 void noLongerUsed()
          This Session is no longer used: - unexport Remote Object - return the Session in the pool
 void releaseICtx(javax.transaction.Transaction tx)
          .
 void setMustCommit(boolean mc)
           
 void timeoutExpired(java.lang.Object arg)
          The session timeout has expired
 void txCompleted()
          End of Transaction
 
Methods inherited from class org.objectweb.jonas_ejb.container.JSessionSwitch
getBeanFactory, getLocal, getRemote, startTimer, stopTimer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JStatefulSwitch

public JStatefulSwitch(JStatefulFactory bf,
                       JStatefulPool sfp)
                throws java.rmi.RemoteException
constructor.
Method Detail

timeoutExpired

public void timeoutExpired(java.lang.Object arg)
The session timeout has expired

getICtx

public JSessionContext getICtx(javax.transaction.Transaction tx)
At each business method, get a BeanContext to run it
Overrides:
getICtx in class JSessionSwitch

bindICtx

public void bindICtx(javax.transaction.Transaction tx,
                     JStatefulContext bctx)
At each create, bind the Context to the transaction

releaseICtx

public void releaseICtx(javax.transaction.Transaction tx)
. * Release the Context after use.
Overrides:
releaseICtx in class JSessionSwitch

noLongerUsed

public void noLongerUsed()
This Session is no longer used: - unexport Remote Object - return the Session in the pool

txCompleted

public void txCompleted()
End of Transaction

isInTransaction

public boolean isInTransaction()
Returns True if bean is participating in a client transaction This is used for remove on stateful session beans only.

setMustCommit

public void setMustCommit(boolean mc)
Overrides:
setMustCommit in class JSessionSwitch