org.ow2.jonas.resource.internal.mbean
Class JCAConnectionFactory

java.lang.Object
  extended by org.ow2.jonas.lib.management.javaee.ManagedObject
      extended by org.ow2.jonas.lib.management.javaee.J2EEManagedObject
          extended by org.ow2.jonas.resource.internal.mbean.JCAConnectionFactory

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.ow2.jonas.lib.management.javaee.J2EEManagedObject
J2EE_TYPE_APPLICATION, J2EE_TYPE_SERVER, NAME
 
Fields inherited from class org.ow2.jonas.lib.management.javaee.ManagedObject
logger
 
Constructor Summary
JCAConnectionFactory(String objectName, String jndiname, String fileName, Properties prop, String description, ConnectionManagerImpl cm)
          Constructor
 
Method Summary
 void forceCloseConnection(int connectionId)
           
 Integer getBusyMax()
           
 Integer getBusyMin()
           
 Map getConnectionDetails(int connectionId)
           
 Integer getConnectionFailures()
           
 Integer getConnectionLeaks()
           
 Integer getConnMaxAge()
           
 Integer getCurrentBusy()
           
 Integer getCurrentInTx()
           
 Integer getCurrentOpened()
           
 Integer getCurrentWaiters()
           
 String getDescription()
          return the description
 String getFileName()
           
 Integer getInitSize()
           
 Integer getJdbcConnCheckLevel()
           
 String getJdbcTestStatement()
           
 String getJndiName()
          return the jndi name
 String getManagedConnectionFactory()
          Return the ManagedConnectionFactory object name
 Integer getMaxOpentime()
           
 Integer getMaxSize()
           
 Integer getMaxWaiters()
           
 Integer getMaxWaitTime()
           
 Integer getMinSize()
           
 int[] getOpenedConnections()
           
 int[] getOpenedConnections(int seconds)
           
 Integer getOpenedCount()
           
 Properties getProperties()
          return the ConnectionFactory Properties
 Integer getPstmtMax()
           
 Integer getRejectedFull()
           
 Integer getRejectedOpen()
           
 Integer getRejectedOther()
           
 Integer getRejectedTimeout()
           
 Integer getSamplingPeriod()
           
protected  long getSequenceNumber()
          Gets the sequence number for reconfiguration opeartions
 Integer getServedOpen()
           
 Integer getWaiterCount()
           
 Integer getWaitersHigh()
           
 Integer getWaitersHighRecent()
           
 Long getWaitingHigh()
           
 Long getWaitingHighRecent()
           
 Long getWaitingTime()
           
 boolean isJdbcConnSetUp()
           
 boolean isObservable()
           
 void setConnMaxAge(Integer mn)
           
 void setJdbcConnCheckLevel(Integer level)
          Sets the JDBC connection checking level
 void setJdbcTestStatement(String test)
           
 void setManagedConnectionFactory(String managedConnectionFactoryObjectName)
          Set the ManagedConnectionFactory object name
 void setMaxOpentime(Integer mn)
           
 void setMaxSize(Integer max)
           
 void setMaxWaiters(Integer max)
           
 void setMaxWaitTime(Integer max)
           
 void setMinSize(Integer min)
          MBean method allowing to set the minimum size of connection pool
 void setObservable(boolean observable)
           
 void setPstmtMax(Integer size)
           
 void setSamplingPeriod(Integer i)
           
 
Methods inherited from class org.ow2.jonas.lib.management.javaee.J2EEManagedObject
getObjectName, isEventProvider, isStateManageable, isStatisticsProvider, setEventProvider, setObjectName, setStateManageable, setStatisticsProvider
 
Methods inherited from class org.ow2.jonas.lib.management.javaee.ManagedObject
sendNotification, sendReconfigNotification, sendSaveNotification, setModelMBean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JCAConnectionFactory

public JCAConnectionFactory(String objectName,
                            String jndiname,
                            String fileName,
                            Properties prop,
                            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 String getDescription()
return the description

Returns:
String description

getJndiName

public String getJndiName()
return the jndi name

Returns:
String jndi name

getManagedConnectionFactory

public String getManagedConnectionFactory()
Return the ManagedConnectionFactory object name

Returns:
String of ManagedConnectionFactory name

getProperties

public Properties getProperties()
return the ConnectionFactory Properties

Returns:
Properties ConnectionFactory properties

setManagedConnectionFactory

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

Parameters:
managedConnectionFactoryObjectName - String to set

isJdbcConnSetUp

public boolean isJdbcConnSetUp()
Returns:
true if there is a JDBC connection to manage

getJdbcConnCheckLevel

public Integer getJdbcConnCheckLevel()
Returns:
JDBC connection checking level

setJdbcConnCheckLevel

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

Parameters:
level - connection level

getJdbcTestStatement

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

setJdbcTestStatement

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

getPstmtMax

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

setPstmtMax

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

getConnMaxAge

public Integer getConnMaxAge()
Returns:
Connections maximum age

setConnMaxAge

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

getMaxSize

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

setMaxSize

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

getMaxOpentime

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

setMaxOpentime

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

getMaxWaiters

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

setMaxWaiters

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

getMaxWaitTime

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

setMaxWaitTime

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

getMinSize

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

getInitSize

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

setMinSize

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

Parameters:
min - minimum size of connection pool

getSamplingPeriod

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

setSamplingPeriod

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

getConnectionFailures

public Integer getConnectionFailures()
Returns:
number of connection failures

getConnectionLeaks

public Integer getConnectionLeaks()
Returns:
number of connection leaks

getCurrentBusy

public Integer getCurrentBusy()
Returns:
number of busy connections

getBusyMax

public Integer getBusyMax()
Returns:
number of busy connections

getBusyMin

public Integer getBusyMin()
Returns:
number of busy connections

getCurrentInTx

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

getCurrentOpened

public Integer getCurrentOpened()
Returns:
number of opened connections

getCurrentWaiters

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

getOpenedCount

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

getRejectedFull

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

getRejectedOpen

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

getRejectedOther

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

getRejectedTimeout

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

getServedOpen

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

getWaiterCount

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

getWaitersHigh

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

getWaitersHighRecent

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

getWaitingHigh

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

getWaitingHighRecent

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

getWaitingTime

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

getOpenedConnections

public int[] getOpenedConnections(int seconds)

getOpenedConnections

public int[] getOpenedConnections()

getConnectionDetails

public Map getConnectionDetails(int connectionId)

forceCloseConnection

public void forceCloseConnection(int connectionId)

setObservable

public void setObservable(boolean observable)

isObservable

public boolean isObservable()

getSequenceNumber

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

Returns:
the sequence number for reconfiguration operations

getFileName

public String getFileName()
Returns:
Returns the fileName.


Copyright © 2010 OW2 Consortium. All Rights Reserved.