|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ow2.jonas.lib.ejb21.JFactory org.ow2.jonas.lib.ejb21.JSessionFactory
public abstract class 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 long |
numberOfCalls
|
protected ArrayList<JSessionSwitch> |
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.ow2.jonas.lib.ejb21.JFactory |
---|
beanclass, cont, dd, dispatcher, 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 | |
---|---|
boolean |
accept(org.ow2.util.event.api.IEvent event)
|
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()
|
long |
getNumberOfCalls()
|
org.ow2.util.event.api.EventPriority |
getPriority()
|
int |
getTimeout()
|
long |
getTotalBusinessProcessingTime()
|
long |
getTotalProcessingTime()
|
int |
getWarningThreshold()
|
void |
handle(org.ow2.util.event.api.IEvent event)
|
boolean |
isSessionSynchro()
|
boolean |
isStateful()
|
void |
removeEJB(JSessionSwitch bs)
remove a Session. |
void |
setMonitoringEnabled(boolean monitoringEnabled)
|
void |
setMonitoringSettingsDefinedInDD(boolean monitoringSettingsDefinedInDD)
|
void |
setNumberOfCalls(long numberOfCalls)
|
void |
setTimeout(int t)
set the current timeout value for Jmx |
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.ow2.jonas.lib.ejb21.BeanFactory |
---|
reduceCache, storeInstances |
Field Detail |
---|
protected JSessionHome home
protected JSessionLocalHome localhome
protected boolean isSynchro
protected boolean isStateful
protected boolean monitoringEnabled
protected int warningThreshold
protected long numberOfCalls
protected long totalBusinessProcessingTime
protected long totalProcessingTime
protected ArrayList<JSessionSwitch> 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()
stop
in interface BeanFactory
public void syncDirty(boolean notused)
syncDirty
in interface BeanFactory
notused
- True if store even if passivation timeout not elapsedpublic JHome getHome()
BeanFactory
getHome
in interface BeanFactory
public JLocalHome getLocalHome()
BeanFactory
getLocalHome
in interface BeanFactory
public JSessionSwitch createEJB() throws RemoteException
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)
timeout
- in secondspublic 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 long getNumberOfCalls()
public void setNumberOfCalls(long 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 boolean isStateful()
public boolean accept(org.ow2.util.event.api.IEvent event)
accept
in interface org.ow2.util.event.api.IEventListener
public org.ow2.util.event.api.EventPriority getPriority()
getPriority
in interface org.ow2.util.event.api.IEventListener
public void handle(org.ow2.util.event.api.IEvent event)
handle
in interface org.ow2.util.event.api.IEventListener
public abstract JSessionContext getJContext(JSessionSwitch ss)
protected abstract JSessionSwitch createNewSession() throws RemoteException
RemoteException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |