org.objectweb.jonas.container
Class SessionBean

java.lang.Object
  extended byjavax.management.NotificationBroadcasterSupport
      extended byorg.objectweb.jonas.management.ReconfigDispatcher
          extended byorg.objectweb.jonas.management.j2eemanagement.J2EEManagedObject
              extended byorg.objectweb.jonas.container.EJB
                  extended byorg.objectweb.jonas.container.SessionBean
All Implemented Interfaces:
javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, ReconfigDispatcherMBean
Direct Known Subclasses:
StatefulSessionBean, StatelessSessionBean

public class SessionBean
extends EJB

This class implements the SessionBean type specified in JSR77.

Author:
Adriana Danes, S. Ali Tokmen, Malek Chahine: EJB statistics

Field Summary
 
Fields inherited from class org.objectweb.jonas.container.EJB
desc, ejbToManage, fileName
 
Fields inherited from class org.objectweb.jonas.management.j2eemanagement.J2EEManagedObject
J2EE_TYPE_APPLICATION, J2EE_TYPE_SERVER, NAME
 
Fields inherited from class org.objectweb.jonas.management.ReconfigDispatcher
RECONFIG_TYPE, SAVE_RECONFIG_TYPE
 
Constructor Summary
SessionBean(java.lang.String objectName, JSessionFactory factoryToManage)
           
 
Method Summary
 long getAverageBusinessProcessingTime()
           
 long getAverageProcessingTime()
           
 boolean getMonitoringEnabled()
           
 boolean getMonitoringSettingsDefinedInDD()
           
 int getNumberOfCalls()
           
 int getSessionTimeOut()
           
 long getTotalBusinessProcessingTime()
           
 long getTotalProcessingTime()
           
 int getWarningThreshold()
           
 void setMonitoringEnabled(boolean monitoringEnabled)
           
 void setSessionTimeOut(int timeOut)
           
 void setWarningThreshold(int warningThreshold)
           
 
Methods inherited from class org.objectweb.jonas.container.EJB
getAllDataSourceName, getAllJdbcResourceAdapterName, getAllJMSConnectionFactoryName, getAllJMSDestinationName, getAllMailFactoryMName, getAllMailFactorySName, getAllURLs, getCacheSize, getDisplayName, getEjbClass, getFileName, getHomeClass, getJndiName, getLocalClass, getLocalHomeClass, getMaxCacheSize, getMinPoolSize, getName, getPoolSize, getRemoteClass, reduceCacheSize
 
Methods inherited from class org.objectweb.jonas.management.j2eemanagement.J2EEManagedObject
getObjectName, isEventProvider, isStateManageable, isStatisticsProvider
 
Methods inherited from class org.objectweb.jonas.management.ReconfigDispatcher
addNotificationListener, getFilter, getHandback, getListener, getNotificationInfo, initLogger, removeNotificationListener, sendReconfigNotification, sendSaveNotification
 
Methods inherited from class javax.management.NotificationBroadcasterSupport
handleNotification, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionBean

public SessionBean(java.lang.String objectName,
                   JSessionFactory factoryToManage)
Parameters:
objectName - JMX object name
factoryToManage - JSessionFactory factory to manage
Method Detail

getSessionTimeOut

public int getSessionTimeOut()
Returns:
session time out for this session ejb

setSessionTimeOut

public void setSessionTimeOut(int timeOut)
Parameters:
timeOut - new session time out for this session bean

getMonitoringSettingsDefinedInDD

public boolean getMonitoringSettingsDefinedInDD()
Returns:
true if EJB monitoring settings have been defined in the deployment descriptor

getMonitoringEnabled

public boolean getMonitoringEnabled()
Returns:
true if ejb monitoring active

setMonitoringEnabled

public void setMonitoringEnabled(boolean monitoringEnabled)
Parameters:
monitoringEnabled - whether ejb monitoring will be active

getWarningThreshold

public int getWarningThreshold()
Returns:
the method time threshold (in ms)

setWarningThreshold

public void setWarningThreshold(int warningThreshold)
Parameters:
warningThreshold - new method time threshold (in ms)

getNumberOfCalls

public int getNumberOfCalls()
Returns:
the total number of calls on this ejb

getTotalBusinessProcessingTime

public long getTotalBusinessProcessingTime()
Returns:
the total time spent in business execution

getTotalProcessingTime

public long getTotalProcessingTime()
Returns:
the total time spent in container + business execution

getAverageBusinessProcessingTime

public long getAverageBusinessProcessingTime()
Returns:
the average time per request spent in business execution

getAverageProcessingTime

public long getAverageProcessingTime()
Returns:
the average total time per request spent in container + business execution