org.objectweb.jonas_ejb.container
Class JStatefulFactory

java.lang.Object
  extended byorg.objectweb.jonas_ejb.container.JFactory
      extended byorg.objectweb.jonas_ejb.container.JSessionFactory
          extended byorg.objectweb.jonas_ejb.container.JStatefulFactory
All Implemented Interfaces:
BeanFactory

public class JStatefulFactory
extends JSessionFactory

This class is a factory for a Session Stateful Bean.

Author:
Philippe Durieux

Field Summary
 
Fields inherited from class org.objectweb.jonas_ejb.container.JSessionFactory
home, isStateful, isSynchro, localhome, sessionList
 
Fields inherited from class org.objectweb.jonas_ejb.container.JFactory
beanclass, cont, dd, ejb10Env, ejbname, JNDICtx, naming, tm, txbeanmanaged
 
Constructor Summary
JStatefulFactory(SessionStatefulDesc dd, JContainer cont, JStatefulPool sfp)
          constructor
 
Method Summary
 JSessionSwitch createNewSession()
          Creates a new Session Stateful called back from createEJB
 JSessionContext getJContext()
          get a new session context must call newInstance (EJB specs) => no pool should be used.
 int getPoolSize()
          Get the size of the instance pool for this bean
 void postInvoke(RequestCtx rctx)
          postinvoke
 RequestCtx preInvoke(int txa, java.lang.String secu)
          preInvoke for Session beans stateful
 void reduceCache()
          Reduce number of instances in memory
 
Methods inherited from class org.objectweb.jonas_ejb.container.JSessionFactory
checkTransaction, createEJB, getHome, getLocalHome, getTimeout, isSessionSynchro, isStateful, removeEJB, setTimeout, stop, sync
 
Methods inherited from class org.objectweb.jonas_ejb.container.JFactory
checkJonasVersion, checkTransactionContainer, getContainer, getDeploymentDescriptor, getEjb10Environment, getEJBName, getEnv, getInitialContext, getTimerService, getTransactionManager, init, isClassAvailable, isTxBeanManaged, myClassLoader, postInvokeRemote, preInvokeRemote, resetComponentContext, setComponentContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JStatefulFactory

public JStatefulFactory(SessionStatefulDesc dd,
                        JContainer cont,
                        JStatefulPool sfp)
constructor

Parameters:
dd - Bean Deployment Descriptor
cont - Container where the bean is defined
sfp - Pool des sessions stateful
Method Detail

getPoolSize

public int getPoolSize()
Description copied from interface: BeanFactory
Get the size of the instance pool for this bean

Specified by:
getPoolSize in interface BeanFactory
Specified by:
getPoolSize in class JFactory
Returns:
the Instance pool size for this Ejb

reduceCache

public void reduceCache()
Reduce number of instances in memory


preInvoke

public RequestCtx preInvoke(int txa,
                            java.lang.String secu)
preInvoke for Session beans stateful

Overrides:
preInvoke in class JFactory
Parameters:
txa - Transaction Attribute (Supports, Required, ...)
secu - Security String that uniquely identifies the method.
Returns:
A RequestCtx object
Throws:
javax.ejb.EJBException

postInvoke

public void postInvoke(RequestCtx rctx)
postinvoke

Overrides:
postInvoke in class JFactory
Parameters:
rctx - The RequestCtx that was returned at preInvoke()
Throws:
javax.ejb.EJBException

createNewSession

public JSessionSwitch createNewSession()
                                throws java.rmi.RemoteException
Creates a new Session Stateful called back from createEJB

Specified by:
createNewSession in class JSessionFactory
Returns:
The Session Switch object
Throws:
java.rmi.RemoteException

getJContext

public JSessionContext getJContext()
get a new session context must call newInstance (EJB specs) => no pool should be used.

Specified by:
getJContext in class JSessionFactory
Returns:
a new Session Context