BEA Systems, Inc.


weblogic.management.runtime
Interface JDBCConnectionPoolRuntimeMBean


public interface JDBCConnectionPoolRuntimeMBean
extends weblogic.management.runtime.RuntimeMBean

This class is used for monitoring a WebLogic JDBC component

Author:
Copyright (c) 2000, 2001 by BEA Systems, Inc. All Rights Reserved.

Method Summary
 void disableDroppingUsers()
          Disable the pool, immediately disconnecting all users.
 void disableFreezingUsers()
          Disable the pool, suspending all operations on pool connections until the pool is re-enabled.
 void enable()
          Enable a pool.
 int getActiveConnectionsCurrentCount()
           
 int getActiveConnectionsHighCount()
           
 int getConnectionDelayTime()
           
 int getConnectionLeakProfileCount()
          Connection leak is a situation when connection from the pool was not closed explicitely by calling close() and was garbage collected.
 JDBCConnectionLeakProfile[] getConnectionLeakProfiles(int index, int count)
          Connection leak profiling stores stack trace at the time when connection was created in case of connection leak.
 int getConnectionsTotalCount()
          Returns the total number of JDBC connections in this JDBCConnectionPoolRuntimeMBean since the pool is instantiated.
 int getFailuresToReconnectCount()
           
 int getLeakedConnectionCount()
           
 int getMaxCapacity()
          Returns the maximum capacity of this connection pool.
 boolean getPoolState()
           
 java.util.Properties getProperties()
          Return the properties for a pool.
 int getStatementProfileCount()
          SQL roundtrip profiling stores SQL statement text, execution time and other metrics.
 JDBCStatementProfile[] getStatementProfiles(int index, int count)
          SQL roundtrip profiling stores SQL statement text, execution time and other metrics.
 java.lang.String getVersionJDBCDriver()
           
 int getWaitingForConnectionCurrentCount()
           
 int getWaitingForConnectionHighCount()
           
 int getWaitSecondsHighCount()
           
 boolean poolExists(java.lang.String poolName)
          Does a pool with the given name exist?
 java.lang.Object reserve()
          Reserves a resource for an authorized user.
 java.lang.Object reserveNoWait()
          Reserves a resource for use by an ACL user.
 java.lang.Object reserveWaitSecs(int waitSecs)
          Reserves a resource for use by an ACL user.
 void reset()
          Resets the named database ConnectionPool by shutting down and reestablishing all the allocated connections.
 void resetConnectionLeakProfile()
          Resets connection leak profile.
 void resetStatementProfile()
          Resets SQL statement profile.
 void shrink()
          Shrinks the named database ConnectionPool to the max of the currently reserved connections or the initial size.
 void shutdownHard()
          Destroys the pool with the name specified, immediately closing all used and unused connections.
 void shutdownSoft()
          Destroys the pool with the name specified, closing unused connections immediately, and in-use connections after they are returned by the applications using them.
 
Methods inherited from interface weblogic.management.WebLogicMBean
getMBeanInfo, getName, getObjectName, getParent, getType, isCachingDisabled, isRegistered, setName, setParent
 
Methods inherited from interface javax.management.DynamicMBean
getAttribute, getAttributes, invoke, setAttribute, setAttributes
 
Methods inherited from interface javax.management.MBeanRegistration
postDeregister, postRegister, preDeregister, preRegister
 
Methods inherited from interface javax.management.NotificationBroadcaster
addNotificationListener, getNotificationInfo, removeNotificationListener
 

Method Detail

getConnectionLeakProfileCount

public int getConnectionLeakProfileCount()
Connection leak is a situation when connection from the pool was not closed explicitely by calling close() and was garbage collected.

This method should be used first before requesting connection leak profiles from the profile storage.

Returns:
Number of the connection leak profiles in profile storage.

getConnectionLeakProfiles

public JDBCConnectionLeakProfile[] getConnectionLeakProfiles(int index,
                                                             int count)
Connection leak profiling stores stack trace at the time when connection was created in case of connection leak. This allows to identify place where leak appeared.

Connection leak is a situation when connection from the pool was not closed explicitely by calling close() and was garbage collected.

Returns:
Connection leak profiles starting from this index. Number of returned profiles depends on factual number of profiles in the profile storage.
See Also:
JDBCConnectionLeakProfile

getStatementProfileCount

public int getStatementProfileCount()
SQL roundtrip profiling stores SQL statement text, execution time and other metrics.

This method should be used first before requesting SQL statement profiles from the profile storage.

Returns:
Number of the SQL statement profiles in profile storage.

getStatementProfiles

public JDBCStatementProfile[] getStatementProfiles(int index,
                                                   int count)
SQL roundtrip profiling stores SQL statement text, execution time and other metrics.

Returns:
Statement profiles starting from this index. Number of returned profiles depends on factual number of profiles in the profile storage.
See Also:
JDBCStatementProfile

getLeakedConnectionCount

public int getLeakedConnectionCount()

Returns:
Number of leaked connections. Leaked connection is a connection that was checked out from the connection pool but was not returned to the pool by calling close ().

getPoolState

public boolean getPoolState()

Returns:
Current state of the connection pool. true if the pool enabled. false if the pool disabled

getFailuresToReconnectCount

public int getFailuresToReconnectCount()

Returns:
Number of cases when a connection pool attempted to refresh a connection to a database and failed. Failure may happen because of database unavailablity or broken connection to the database.

getConnectionDelayTime

public int getConnectionDelayTime()

Returns:
Averaged time necessary to get a connection from the database. This is how long it takes to get physical connection from database. It is calculated as summary time to connect divided by summary number of connections. Return value is milliseconds.

getActiveConnectionsCurrentCount

public int getActiveConnectionsCurrentCount()

Returns:
Current total number of active connections.

getWaitingForConnectionCurrentCount

public int getWaitingForConnectionCurrentCount()

Returns:
Current total number waiting for a connection.

getVersionJDBCDriver

public java.lang.String getVersionJDBCDriver()

Returns:
Version of the JDBC driver, in the format of concatenating the Driver class name with 'major: XX, minor: YY'.

getActiveConnectionsHighCount

public int getActiveConnectionsHighCount()

Returns:
The high water mark of active connections in this JDBCConnectionPoolRuntimeMBean. The count starts at zero each time the JDBCConnectionPoolRuntimeMBean is instantiated.

Note that this is an optimization method for a highly useful statistic that could be implemented less efficiently using change notification.


getWaitingForConnectionHighCount

public int getWaitingForConnectionHighCount()

Returns:
The high water mark of waiters for a connection in this JDBCConnectionPoolRuntimeMBean. The count starts at zero each time the JDBCConnectionPoolRuntimeMBean is instantiated.

Note that this is an optimization method for a highly useful statistic that could be implemented less efficiently using change notification.


getWaitSecondsHighCount

public int getWaitSecondsHighCount()

Returns:
The number of seconds the longest waiter for a connection waited.

getConnectionsTotalCount

public int getConnectionsTotalCount()
Returns the total number of JDBC connections in this JDBCConnectionPoolRuntimeMBean since the pool is instantiated.


getMaxCapacity

public int getMaxCapacity()
Returns the maximum capacity of this connection pool.


resetConnectionLeakProfile

public void resetConnectionLeakProfile()
Resets connection leak profile.


resetStatementProfile

public void resetStatementProfile()
Resets SQL statement profile.


shrink

public void shrink()
            throws java.lang.Exception
Shrinks the named database ConnectionPool to the max of the currently reserved connections or the initial size.

This is a privileged method, and can only be invoked on a client that has specified an authorized Principal.

Throws:
java.lang.Exception - if there is an error

reset

public void reset()
           throws java.lang.Exception
Resets the named database ConnectionPool by shutting down and reestablishing all the allocated connections. This method should only be called when the connection pool is known to be in a bad state, for example when the database has been restarted.

This is a privileged method, and can only be invoked on a client that has specified an authorized Principal.

Throws:
java.lang.Exception - if there is an error

shutdownSoft

public void shutdownSoft()
                  throws java.lang.Exception
Destroys the pool with the name specified, closing unused connections immediately, and in-use connections after they are returned by the applications using them.

This is a privileged method, and can only be invoked on a client that has specified an authorized Principal. Applications with connections from this pool are allowed to continue using their connections until they close them.

Throws:
java.lang.Exception - if there is an error

shutdownHard

public void shutdownHard()
                  throws java.lang.Exception
Destroys the pool with the name specified, immediately closing all used and unused connections. .

This is a privileged method, and can only be invoked on a client that has specified an authorized Principal.

Throws:
java.lang.Exception - if there is an error

disableDroppingUsers

public void disableDroppingUsers()
                          throws java.lang.Exception
Disable the pool, immediately disconnecting all users.

This is a privileged method, and can only be invoked on a client that has specified an authorized Principal.

Throws:
java.lang.Exception - if there is an error

disableFreezingUsers

public void disableFreezingUsers()
                          throws java.lang.Exception
Disable the pool, suspending all operations on pool connections until the pool is re-enabled.

This is a privileged method, and can only be invoked on a client that has specified an authorized Principal.

Throws:
java.lang.Exception - if there is an error

enable

public void enable()
            throws java.lang.Exception
Enable a pool.

This is a privileged method, and can only be invoked on a client that has specified an authorized Principal.

Throws:
java.lang.Exception - if there is an error

getProperties

public java.util.Properties getProperties()
                                   throws java.lang.Exception
Return the properties for a pool.

This is a privileged method, and can only be invoked on a client that has specified an authorized Principal.

Throws:
java.lang.Exception - if there is an error

reserve

public java.lang.Object reserve()
                         throws java.lang.Exception
Reserves a resource for an authorized user. Waits if all resources are currently allocated.

Throws:
java.lang.Exception - if there is an error

reserveNoWait

public java.lang.Object reserveNoWait()
                               throws java.lang.Exception
Reserves a resource for use by an ACL user. Caller specifies that no waiting should occur.

Throws:
java.lang.Exception - if there is an error

reserveWaitSecs

public java.lang.Object reserveWaitSecs(int waitSecs)
                                 throws java.lang.Exception
Reserves a resource for use by an ACL user. Caller specifies that waiting should not exceed given number of seconds.

Throws:
java.lang.Exception - if there is an error

poolExists

public boolean poolExists(java.lang.String poolName)
                   throws java.lang.Exception
Does a pool with the given name exist?

This is a privileged method, and can only be invoked on a client that has specified an authorized Principal.

Parameters:
name - Name of the pool being looked for
Throws:
java.lang.Exception - if there is an error

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs70

Copyright © 2004 BEA Systems, Inc. All Rights Reserved.
WebLogic Server 7.0 API Reference