|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jonas_ejb.container.JFactory
org.objectweb.jonas_ejb.container.JSessionFactory
This class is a factory for a Session Bean. It is responsible for - managing Home and LocalHome. - keeping the JNDI context for this component (java:comp/env)
Field Summary | |
protected JSessionHome |
home
|
protected boolean |
isStateful
|
protected boolean |
isSynchro
|
protected JSessionLocalHome |
localhome
|
protected boolean |
monitoringEnabled
|
protected int |
numberOfCalls
|
protected java.util.ArrayList |
sessionList
Pool of free JSessionSwitch objects Used if singleswitch=false. |
protected boolean |
singleswitch
If no timeout, we can manage only 1 JSessionSwitch for all sessions. |
protected long |
totalBusinessProcessingTime
|
protected long |
totalProcessingTime
|
protected JSessionSwitch |
uniqueSession
Unique JSessionSwitch when singleswitch=true |
protected int |
warningThreshold
|
Fields inherited from class org.objectweb.jonas_ejb.container.JFactory |
beanclass, cont, dd, ejb10Env, ejbname, ejbTimeoutSignature, isClusterReplicated, JNDICtx, maxCacheSize, minPoolSize, myTimerService, naming, passivationDir, stopped, timerTxAttr, tm, txbeanmanaged, wm |
Constructor Summary | |
JSessionFactory(SessionDesc dd,
JContainer cont)
constructor |
Method Summary | |
void |
checkTransaction(RequestCtx rctx)
Session beans can be container managed or bean managed transaction Session home don't check transactional context. |
JSessionSwitch |
createEJB()
Create a new Session Find one in the pool, or create a new object. |
protected abstract JSessionSwitch |
createNewSession()
|
JHome |
getHome()
returns the home if exist or null if not |
abstract JSessionContext |
getJContext(JSessionSwitch ss)
|
JLocalHome |
getLocalHome()
returns the local home if exist or null if not |
boolean |
getMonitoringEnabled()
|
boolean |
getMonitoringSettingsDefinedInDD()
|
int |
getNumberOfCalls()
|
int |
getTimeout()
|
long |
getTotalBusinessProcessingTime()
|
long |
getTotalProcessingTime()
|
int |
getWarningThreshold()
|
boolean |
isSessionSynchro()
|
boolean |
isStateful()
|
void |
removeEJB(JSessionSwitch bs)
remove a Session. |
void |
setMonitoringEnabled(boolean monitoringEnabled)
|
void |
setMonitoringSettingsDefinedInDD(boolean monitoringSettingsDefinedInDD)
|
void |
setNumberOfCalls(int numberOfCalls)
|
void |
setTimeout(int t)
|
void |
setTotalBusinessProcessingTime(long totalBusinessProcessingTime)
|
void |
setTotalProcessingTime(long totalProcessingTime)
|
void |
setWarningThreshold(int warningThreshold)
|
boolean |
singleSwitchOn()
Return true if singleswitch option is on. |
void |
stop()
stop this EJB. |
void |
syncDirty(boolean notused)
synchronize bean instances if needed |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.objectweb.jonas_ejb.container.BeanFactory |
reduceCache, storeInstances |
Field Detail |
protected JSessionHome home
protected JSessionLocalHome localhome
protected boolean isSynchro
protected boolean isStateful
protected boolean monitoringEnabled
protected int warningThreshold
protected int numberOfCalls
protected long totalBusinessProcessingTime
protected long totalProcessingTime
protected java.util.ArrayList sessionList
protected JSessionSwitch uniqueSession
protected boolean singleswitch
Constructor Detail |
public JSessionFactory(SessionDesc dd, JContainer cont)
dd
- The Session Deployment Descriptorcont
- The Container where the bean is defined.Method Detail |
public boolean singleSwitchOn()
public void stop()
public void syncDirty(boolean notused)
notused
- True if store even if passivation timeout not elapsedpublic JHome getHome()
BeanFactory
public JLocalHome getLocalHome()
BeanFactory
public JSessionSwitch createEJB() throws java.rmi.RemoteException
java.rmi.RemoteException
public void removeEJB(JSessionSwitch bs)
bs
- The Bean Session Switch to put back in the pool.public void checkTransaction(RequestCtx rctx)
rctx
- The Request Contextpublic boolean isSessionSynchro()
public int getTimeout()
public void setTimeout(int t)
t
- timeout value for JMX (in seconds)public boolean isStateful()
public boolean getMonitoringSettingsDefinedInDD()
public void setMonitoringSettingsDefinedInDD(boolean monitoringSettingsDefinedInDD)
monitoringSettingsDefinedInDD
- Whether EJB monitoring settings
have been defined in the deployment
descriptorpublic boolean getMonitoringEnabled()
public void setMonitoringEnabled(boolean monitoringEnabled)
monitoringEnabled
- Whether to activate EJB monitoring.public int getWarningThreshold()
public void setWarningThreshold(int warningThreshold)
warningThreshold
- Number of milliseconds after which methods
will start warning.public int getNumberOfCalls()
public void setNumberOfCalls(int numberOfCalls)
numberOfCalls
- Total number of calls on this EJB.public long getTotalBusinessProcessingTime()
public void setTotalBusinessProcessingTime(long totalBusinessProcessingTime)
totalBusinessProcessingTime
- Total time (in millis) spent in
business execution.public long getTotalProcessingTime()
public void setTotalProcessingTime(long totalProcessingTime)
totalProcessingTime
- Total time (in millis) spent in business +
container execution.public abstract JSessionContext getJContext(JSessionSwitch ss)
protected abstract JSessionSwitch createNewSession() throws java.rmi.RemoteException
java.rmi.RemoteException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |