org.objectweb.jonas_ejb.container
Class JStatelessSwitch

java.lang.Object
  extended by org.objectweb.jonas_ejb.container.JSessionSwitch
      extended by org.objectweb.jonas_ejb.container.JStatelessSwitch
All Implemented Interfaces:
TimerEventListener

public class JStatelessSwitch
extends JSessionSwitch

JStatelessSwitch is the implementation of JSessionSwitch dedicated to the Stateless Session Bean.

Author:
Philippe Durieux

Field Summary
 
Fields inherited from class org.objectweb.jonas_ejb.container.JSessionSwitch
bf, mylocal, myremote, mytimer
 
Constructor Summary
JStatelessSwitch(JStatelessFactory bf)
          constructor.
 
Method Summary
 void delistConnections(javax.transaction.Transaction tx)
          This is not used for stateless
 void enlistConnections(javax.transaction.Transaction tx)
          This is not used for stateless
 JSessionContext getICtx(javax.transaction.Transaction tx)
          get an initialized Bean Context
 javax.xml.rpc.handler.MessageContext getMsgContext()
           
 JServiceEndpoint getServiceEndpoint()
           
 void noLongerUsed()
          This Session is no longer used.
 void popConnectionList()
          This is not used for stateless
 void pushConnectionList()
          This is not used for stateless
 void releaseICtx(RequestCtx req, boolean discard)
          release the bean context.
 void saveBeanTx()
          This do nothing for stateless
 void setMustCommit(boolean mc)
          This is not used for stateless
 void timeoutExpired(java.lang.Object arg)
          The session timeout has expired, or a Timer on this bean has expired.
 
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

JStatelessSwitch

public JStatelessSwitch(JStatelessFactory bf)
                 throws java.rmi.RemoteException
constructor.

Parameters:
bf - The Bean Factory
Throws:
java.rmi.RemoteException - if the constructor fails
Method Detail

timeoutExpired

public void timeoutExpired(java.lang.Object arg)
The session timeout has expired, or a Timer on this bean has expired.

Parameters:
arg - Not Used.

getServiceEndpoint

public JServiceEndpoint getServiceEndpoint()
Returns:
The ServiceEndpoint

getMsgContext

public javax.xml.rpc.handler.MessageContext getMsgContext()
Returns:
The JAX-RPC MessageContext

getICtx

public JSessionContext getICtx(javax.transaction.Transaction tx)
                        throws java.rmi.RemoteException
get an initialized Bean Context

Specified by:
getICtx in class JSessionSwitch
Parameters:
tx - Current transaction (not used)
Returns:
the Session Context
Throws:
java.rmi.RemoteException - if context cannot be obtained

releaseICtx

public void releaseICtx(RequestCtx req,
                        boolean discard)
release the bean context. Assumes that only 1 Context is managed at a time. Contexts are release at each request, in case of stateless session.

Specified by:
releaseICtx in class JSessionSwitch
Parameters:
tx - Current transaction (not used)

noLongerUsed

public void noLongerUsed()
This Session is no longer used.

Specified by:
noLongerUsed in class JSessionSwitch

setMustCommit

public void setMustCommit(boolean mc)
This is not used for stateless

Specified by:
setMustCommit in class JSessionSwitch
Parameters:
mc - Not Used.

pushConnectionList

public void pushConnectionList()
This is not used for stateless

Specified by:
pushConnectionList in class JSessionSwitch

popConnectionList

public void popConnectionList()
This is not used for stateless

Specified by:
popConnectionList in class JSessionSwitch

enlistConnections

public void enlistConnections(javax.transaction.Transaction tx)
This is not used for stateless

Specified by:
enlistConnections in class JSessionSwitch
Parameters:
tx - the transaction object

delistConnections

public void delistConnections(javax.transaction.Transaction tx)
This is not used for stateless

Specified by:
delistConnections in class JSessionSwitch
Parameters:
tx - the transaction object

saveBeanTx

public void saveBeanTx()
This do nothing for stateless

Specified by:
saveBeanTx in class JSessionSwitch