org.objectweb.jonas.resource
Class JCAConnectionFactory

java.lang.Object
  extended byjavax.management.NotificationBroadcasterSupport
      extended byorg.objectweb.jonas.management.ReconfigDispatcher
          extended byorg.objectweb.jonas.management.j2eemanagement.J2EEManagedObject
              extended byorg.objectweb.jonas.resource.JCAConnectionFactory
All Implemented Interfaces:
javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, ReconfigDispatcherMBean

public class JCAConnectionFactory
extends J2EEManagedObject

MBean class for JCA Connection Factory Management

Author:
Adriana Danes JSR 77 (J2EE Management Standard)

Field Summary
 
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
JCAConnectionFactory(java.lang.String objectName, java.lang.String jndiname, java.lang.String fileName, java.util.Properties prop, java.lang.String description, ConnectionManagerImpl cm)
          Constructor
 
Method Summary
 java.lang.Integer getBusyMax()
           
 java.lang.Integer getBusyMin()
           
 java.lang.Integer getConnectionFailures()
           
 java.lang.Integer getConnectionLeaks()
           
 java.lang.Integer getConnMaxAge()
           
 java.lang.Integer getCurrentBusy()
           
 java.lang.Integer getCurrentInTx()
           
 java.lang.Integer getCurrentOpened()
           
 java.lang.Integer getCurrentWaiters()
           
 java.lang.String getDescription()
          return the description
 java.lang.String getFileName()
           
 java.lang.Integer getInitSize()
           
 java.lang.Integer getJdbcConnCheckLevel()
           
 java.lang.String getJdbcTestStatement()
           
 java.lang.String getJndiName()
          return the jndi name
 java.lang.String getManagedConnectionFactory()
          Return the ManagedConnectionFactory object name
 java.lang.Integer getMaxOpentime()
           
 java.lang.Integer getMaxSize()
           
 java.lang.Integer getMaxWaiters()
           
 java.lang.Integer getMaxWaitTime()
           
 java.lang.Integer getMinSize()
           
 java.lang.Integer getOpenedCount()
           
 java.util.Properties getProperties()
          return the ConnectionFactory Properties
 java.lang.Integer getPstmtMax()
           
 java.lang.Integer getRejectedFull()
           
 java.lang.Integer getRejectedOpen()
           
 java.lang.Integer getRejectedOther()
           
 java.lang.Integer getRejectedTimeout()
           
 java.lang.Integer getSamplingPeriod()
           
protected  long getSequenceNumber()
          Gets the sequence number for reconfiguration opeartions
 java.lang.Integer getServedOpen()
           
 java.lang.Integer getWaiterCount()
           
 java.lang.Integer getWaitersHigh()
           
 java.lang.Integer getWaitersHighRecent()
           
 java.lang.Long getWaitingHigh()
           
 java.lang.Long getWaitingHighRecent()
           
 java.lang.Long getWaitingTime()
           
 void setConnMaxAge(java.lang.Integer mn)
           
 void setJdbcConnCheckLevel(java.lang.Integer level)
          Sets the JDBC connection checking level
 void setJdbcTestStatement(java.lang.String test)
           
 void setManagedConnectionFactory(java.lang.String managedConnectionFactoryObjectName)
          Set the ManagedConnectionFactory object name
 void setMaxOpentime(java.lang.Integer mn)
           
 void setMaxSize(java.lang.Integer max)
           
 void setMaxWaiters(java.lang.Integer max)
           
 void setMaxWaitTime(java.lang.Integer max)
           
 void setMinSize(java.lang.Integer min)
          MBean method allowing to set the minimum size of connection pool
 void setPstmtMax(java.lang.Integer size)
           
 void setSamplingPeriod(java.lang.Integer i)
           
 
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

JCAConnectionFactory

public JCAConnectionFactory(java.lang.String objectName,
                            java.lang.String jndiname,
                            java.lang.String fileName,
                            java.util.Properties prop,
                            java.lang.String description,
                            ConnectionManagerImpl cm)
Constructor

Parameters:
objectName - String of object name
jndiname - String of ConnectionFactory
prop - Properties of the ConnectionFactory
description - String of ConnectionFactory description
Method Detail

getDescription

public java.lang.String getDescription()
return the description

Returns:
String description

getJndiName

public java.lang.String getJndiName()
return the jndi name

Returns:
String jndi name

getManagedConnectionFactory

public java.lang.String getManagedConnectionFactory()
Return the ManagedConnectionFactory object name

Returns:
String of ManagedConnectionFactory name

getProperties

public java.util.Properties getProperties()
return the ConnectionFactory Properties

Returns:
Properties ConnectionFactory properties

setManagedConnectionFactory

public void setManagedConnectionFactory(java.lang.String managedConnectionFactoryObjectName)
Set the ManagedConnectionFactory object name

Parameters:
managedConnectionFactoryObjectName - String to set

getJdbcConnCheckLevel

public java.lang.Integer getJdbcConnCheckLevel()
Returns:
JDBC connection checking level

setJdbcConnCheckLevel

public void setJdbcConnCheckLevel(java.lang.Integer level)
Sets the JDBC connection checking level

Parameters:
level - connection level

getConnMaxAge

public java.lang.Integer getConnMaxAge()
Returns:
Connections maximum age

setConnMaxAge

public void setConnMaxAge(java.lang.Integer mn)
Parameters:
mn - Connections maximum age

getMaxSize

public java.lang.Integer getMaxSize()
Returns:
max maximum size of connection pool

setMaxSize

public void setMaxSize(java.lang.Integer max)
Parameters:
max - maximum size of connection pool

getMaxOpentime

public java.lang.Integer getMaxOpentime()
Returns:
maximum opening time of connections

setMaxOpentime

public void setMaxOpentime(java.lang.Integer mn)
Parameters:
mn - maximum opening time in minutes for connections

getMaxWaiters

public java.lang.Integer getMaxWaiters()
Returns:
maximum nb of waiters allowed

setMaxWaiters

public void setMaxWaiters(java.lang.Integer max)
Parameters:
max - maximum nb of waiters allowed

getMaxWaitTime

public java.lang.Integer getMaxWaitTime()
Returns:
maximum time to wait for a connection, in seconds

setMaxWaitTime

public void setMaxWaitTime(java.lang.Integer max)
Parameters:
max - maximum time to wait for a connection, in seconds

getMinSize

public java.lang.Integer getMinSize()
Returns:
minimum size of connection pool

getInitSize

public java.lang.Integer getInitSize()
Returns:
initial size of connection pool

setMinSize

public void setMinSize(java.lang.Integer min)
MBean method allowing to set the minimum size of connection pool

Parameters:
min - minimum size of connection pool

getSamplingPeriod

public java.lang.Integer getSamplingPeriod()
Returns:
sampling period for refresching pool statistics

setSamplingPeriod

public void setSamplingPeriod(java.lang.Integer i)
Parameters:
i - sampling period for refresching pool statistics

getJdbcTestStatement

public java.lang.String getJdbcTestStatement()
Returns:
SQL query for JDBC connections test

setJdbcTestStatement

public void setJdbcTestStatement(java.lang.String test)
Parameters:
test - SQL query for JDBC connections test

getConnectionFailures

public java.lang.Integer getConnectionFailures()
Returns:
number of connection failures

getConnectionLeaks

public java.lang.Integer getConnectionLeaks()
Returns:
number of connection leaks

getCurrentBusy

public java.lang.Integer getCurrentBusy()
Returns:
number of busy connections

getBusyMax

public java.lang.Integer getBusyMax()
Returns:
number of busy connections

getBusyMin

public java.lang.Integer getBusyMin()
Returns:
number of busy connections

getCurrentInTx

public java.lang.Integer getCurrentInTx()
Returns:
number of connections used in transactions

getCurrentOpened

public java.lang.Integer getCurrentOpened()
Returns:
number of opened connections

getCurrentWaiters

public java.lang.Integer getCurrentWaiters()
Returns:
current number of connection waiters

getOpenedCount

public java.lang.Integer getOpenedCount()
Returns:
number of opened physical JDBC connections

getRejectedFull

public java.lang.Integer getRejectedFull()
Returns:
number of open calls that were rejected because too many waiters

getRejectedOpen

public java.lang.Integer getRejectedOpen()
Returns:
total number of open calls that were rejected

getRejectedOther

public java.lang.Integer getRejectedOther()
Returns:
number of open calls that were rejected by an unknown reason

getRejectedTimeout

public java.lang.Integer getRejectedTimeout()
Returns:
number of open calls that were rejected by timeout

getServedOpen

public java.lang.Integer getServedOpen()
Returns:
number of xa connection served

getWaiterCount

public java.lang.Integer getWaiterCount()
Returns:
total number of waiters since datasource creation.

getWaitersHigh

public java.lang.Integer getWaitersHigh()
Returns:
Maximum number of waiters since datasource creation.

getWaitersHighRecent

public java.lang.Integer getWaitersHighRecent()
Returns:
Maximum nb of waiters in last sampling period

getWaitingHigh

public java.lang.Long getWaitingHigh()
Returns:
Maximum waiting time (millisec) since datasource creation.

getWaitingHighRecent

public java.lang.Long getWaitingHighRecent()
Returns:
Maximum waiting time (millisec) in last sampling period

getWaitingTime

public java.lang.Long getWaitingTime()
Returns:
Total waiting time (millisec) since datasource creation.

getSequenceNumber

protected long getSequenceNumber()
Gets the sequence number for reconfiguration opeartions

Returns:
the sequence number for reconfiguration operations

getFileName

public java.lang.String getFileName()
Returns:
Returns the fileName.

getPstmtMax

public java.lang.Integer getPstmtMax()
Returns:
Returns the PrepareStatement cache max size

setPstmtMax

public void setPstmtMax(java.lang.Integer size)
Parameters:
size - the PrepareStatement cache max size