Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.3)

Part Number E41849-02

weblogic.management.runtime
Interface JDBCDataSourceRuntimeMBean

All Superinterfaces:
ComponentRuntimeMBean, DynamicMBean, MBeanRegistration, NotificationBroadcaster, RuntimeMBean, WebLogicMBean
All Known Subinterfaces:
JDBCOracleDataSourceRuntimeMBean

public interface JDBCDataSourceRuntimeMBean
extends ComponentRuntimeMBean

This class is used for monitoring a WebLogic JDBC Data Source and its associated connection pool.


Field Summary
 
Fields inherited from interface weblogic.management.runtime.ComponentRuntimeMBean
ACTIVATED, NEW, PREPARED, UNPREPARED
 
Method Summary
 void clearStatementCache()
          For each connection in the connection pool, clears the statement cache of Prepared and Callable Statements.
 void dumpPool()
          Prints out information about all the connections in the connection pool in the data source.
 void dumpPoolProfile()
          Prints out profile information about the data source.
 void forceShutdown()
          Shuts down a data source that has a health state of Running, including forcing the disconnection of all current connection users.
 void forceSuspend()
          Suspends a data source that has the health state of Running, including disconnecting all current connection users.
 int getActiveConnectionsAverageCount()
          Average number of active connections in this instance of the data source.
 int getActiveConnectionsCurrentCount()
          The number of connections currently in use by applications.
 int getActiveConnectionsHighCount()
          Highest number of active database connections in this instance of the data source since the data source was instantiated.
 int getConnectionDelayTime()
          The average amount of time, in milliseconds, that it takes to create a physical connection to the database.
 int getConnectionsTotalCount()
          The cumulative total number of database connections created in this data source since the data source was deployed.
 int getCurrCapacity()
          The current count of JDBC connections in the connection pool in the data source.
 int getCurrCapacityHighCount()
          Highest number of database connections available or in use (current capacity) in this instance of the data source since the data source was deployed.
 String getDatabaseProductName()
           The product name of the database that this data source is connected to.
 String getDatabaseProductVersion()
           The product version of the database that this data source is connected to.
 String getDriverName()
           The product name of the JDBC driver that this data source is configured to use.
 String getDriverVersion()
           The version of the JDBC driver that this data source is configured to use.
 long getFailedReserveRequestCount()
          The cumulative, running count of requests for a connection from this data source that could not be fulfilled.
 int getFailuresToReconnectCount()
          The number of times that the data source attempted to refresh a database connection and failed.
 int getHighestNumAvailable()
          Highest number of database connections that were idle and available to be used by an application at any time in this instance of the data source since the data source was deployed.
 int getHighestNumUnavailable()
          Highest number of database connections that were in use by applications or being tested by the system in this instance of the data source since the data source was deployed.
 JDBCDriverRuntimeMBean getJDBCDriverRuntime()
          Gets the JDBCDriverRuntimeMBean associated with this data source.
 JDBCDataSourceTaskRuntimeMBean getLastTask()
           
 int getLeakedConnectionCount()
          The number of leaked connections.
 int getNumAvailable()
          The number of database connections that are currently idle and available to be used by applications in this instance of the data source.
 int getNumUnavailable()
          The number of connections currently in use by applications or being tested in this instance of the data source.
 long getPrepStmtCacheAccessCount()
          The cumulative, running count of the number of times that the statement cache was accessed.
 long getPrepStmtCacheAddCount()
          The cumulative, running count of the number of statements added to the statement cache.
 int getPrepStmtCacheCurrentSize()
          The number of prepared and callable statements currently cached in the statement cache.
 long getPrepStmtCacheDeleteCount()
          The cumulative, running count of statements discarded from the cache.
 int getPrepStmtCacheHitCount()
          The cumulative, running count of the number of times that statements from the cache were used.
 int getPrepStmtCacheMissCount()
          The number of times that a statement request could not be satisfied with a statement from the cache.
 Properties getProperties()
          The list of properties for a data source that are passed to the JDBC driver when creating database connections.
 long getReserveRequestCount()
          The cumulative, running count of requests for a connection from this data source.
 String getState()
          The current state of the data source.
 String getVersionJDBCDriver()
          The driver class name of the JDBC driver used to create database connections.
 int getWaitingForConnectionCurrentCount()
          The number of connection requests waiting for a database connection.
 long getWaitingForConnectionFailureTotal()
          The cumulative, running count of requests for a connection from this data source that had to wait before getting a connection and eventually failed to get a connection.
 int getWaitingForConnectionHighCount()
          Highest number of application requests concurrently waiting for a connection from this instance of the data source.
 long getWaitingForConnectionSuccessTotal()
          The cumulative, running count of requests for a connection from this data source that had to wait before getting a connection and eventually succeeded in getting a connection.
 long getWaitingForConnectionTotal()
          The cumulative, running count of requests for a connection from this data source that had to wait before getting a connection, including those that eventually got a connection and those that did not get a connection.
 int getWaitSecondsHighCount()
          The highest number of seconds that an application waited for a connection (the longest connection reserve wait time) from this instance of the connection pool since the connection pool was instantiated.
 boolean isEnabled()
          Indicates whether the data source is enabled or disabled: true if the data source is enabled. false if the data source is disabled.
 boolean poolExists(String poolName)
          Specifies whether a data source with the given name exists.
 void reset()
          Resets the connection pool in the data source by shutting down and recreating all available database connections in the pool.
 void resume()
          Restores all access to and operations on a data source that has a health state of Suspended.
 void setJDBCDriverRuntime(JDBCDriverRuntimeMBean mbean)
          Sets the JDBCDriverRuntimeMBean associated with this data source.
 void shrink()
          Shrinks the database connection pool in the data source to either the current number of reserved connections or the initial size of the connection pool, which ever is greater.
 void shutdown()
          Shuts down a data source that has a health state of Running.
 void start()
          Starts a data source that has a health state of Shutdown.
 void suspend()
          Suspends a data source has the health state of Running and disables existing connections.
 String testPool()
          Tests the connection pool in the data source by reserving and releasing a connection from it.
 
Methods inherited from interface weblogic.management.runtime.ComponentRuntimeMBean
getDeploymentState, getModuleId, getWorkManagerRuntimes
 
Methods inherited from interface weblogic.management.WebLogicMBean
getMBeanInfo, getName, getObjectName, getParent, getType, isCachingDisabled, isRegistered, 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

testPool

String testPool()

Tests the connection pool in the data source by reserving and releasing a connection from it.

If the pool configuration attribute TestConnectionsOnReserve is enabled, the acquired connection is also tested as part of the reserve operation.

Returns:
Null upon success, else returns stacktrace.
See Also:
JDBCConnectionPoolMBean
All security roles can access this item.

getLeakedConnectionCount

int getLeakedConnectionCount()

The number of leaked connections. A leaked connection is a connection that was reserved from the data source but was not returned to the data source by calling close().

Returns:
The number of leaked connections.

isEnabled

boolean isEnabled()
Indicates whether the data source is enabled or disabled:

Returns:
Boolean indicating whether the data source is enabled or disabled.

getState

String getState()

The current state of the data source.

Possible states are:

Returns:
Current state of the connection pool.

getFailuresToReconnectCount

int getFailuresToReconnectCount()

The number of times that the data source attempted to refresh a database connection and failed.

Failures may occur when the database is unavailable or when the network connection to the database is interrupted.

Returns:
Number of failed attempts to refresh a database connection.

getConnectionDelayTime

int getConnectionDelayTime()

The average amount of time, in milliseconds, that it takes to create a physical connection to the database.

The value is calculated as summary of all times to connect divided by the total number of connections.

Returns:
Average amount of time to get a physical database connection.

getPrepStmtCacheAccessCount

long getPrepStmtCacheAccessCount()

The cumulative, running count of the number of times that the statement cache was accessed.

Returns:
Count of the number of times that the statement cache was accessed.

getPrepStmtCacheAddCount

long getPrepStmtCacheAddCount()

The cumulative, running count of the number of statements added to the statement cache.

Each connection in the connection pool has its own cache of statements. This number is the sum of the number of statements added to the caches for all connections in the connection pool.

Returns:
Count of the number of statements added to the statement cache.

getPrepStmtCacheDeleteCount

long getPrepStmtCacheDeleteCount()

The cumulative, running count of statements discarded from the cache.

Each connection in the connection pool has its own cache of statements. This number is the sum of the number of statements that were discarded from the caches for all connections in the connection pool.

Returns:
Count of statements discarded from the statement cache.

getPrepStmtCacheCurrentSize

int getPrepStmtCacheCurrentSize()

The number of prepared and callable statements currently cached in the statement cache.

Each connection in the connection pool has its own cache of statements. This number is the sum of the number of statements in the caches for all connections in the connection pool.

Returns:
Number of prepared and callable statements currently cached the statement cache.

getPrepStmtCacheHitCount

int getPrepStmtCacheHitCount()

The cumulative, running count of the number of times that statements from the cache were used.

Returns:
Frequency of use of prepared statements in the cache.

getPrepStmtCacheMissCount

int getPrepStmtCacheMissCount()

The number of times that a statement request could not be satisfied with a statement from the cache.

Returns:
Number of cases the cache does not satisfy the statement request.

getActiveConnectionsCurrentCount

int getActiveConnectionsCurrentCount()

The number of connections currently in use by applications.

Returns:
Current total number of active connections.

getWaitingForConnectionCurrentCount

int getWaitingForConnectionCurrentCount()

The number of connection requests waiting for a database connection.

Returns:
Current total number of requests waiting for a connection.

getVersionJDBCDriver

String getVersionJDBCDriver()

The driver class name of the JDBC driver used to create database connections.

Returns:
JDBC driver class name

getActiveConnectionsHighCount

int getActiveConnectionsHighCount()

Highest number of active database connections in this instance of the data source since the data source was instantiated.

Active connections are connections in use by an application.

Returns:
Highest number of active database connections.

getActiveConnectionsAverageCount

int getActiveConnectionsAverageCount()

Average number of active connections in this instance of the data source.

Active connections are connections in use by an application. This value is only valid if the resource is configured to allow shrinking.

Returns:
The running average of active connections.

getReserveRequestCount

long getReserveRequestCount()

The cumulative, running count of requests for a connection from this data source.

Returns:
The cumulative count of requests for connections from this data source.

getFailedReserveRequestCount

long getFailedReserveRequestCount()

The cumulative, running count of requests for a connection from this data source that could not be fulfilled.

Returns:
The cumulative count of failed requests for a connection from this data source.

getWaitingForConnectionHighCount

int getWaitingForConnectionHighCount()

Highest number of application requests concurrently waiting for a connection from this instance of the data source.

Returns:
The high water mark of waiters for a connection. from this pool.

getWaitingForConnectionTotal

long getWaitingForConnectionTotal()

The cumulative, running count of requests for a connection from this data source that had to wait before getting a connection, including those that eventually got a connection and those that did not get a connection.

Returns:
Cumulative count of waiters for connections.

getWaitingForConnectionSuccessTotal

long getWaitingForConnectionSuccessTotal()

The cumulative, running count of requests for a connection from this data source that had to wait before getting a connection and eventually succeeded in getting a connection.

Returns:
Cumulative count of waiters that successfully obtained a connection.

getWaitingForConnectionFailureTotal

long getWaitingForConnectionFailureTotal()

The cumulative, running count of requests for a connection from this data source that had to wait before getting a connection and eventually failed to get a connection.

Waiting connection requests can fail for a variety of reasons, including waiting for longer than the ConnectionReserveTimeoutSeconds.

Returns:
Cumulative count of waiters that were unable to obtain a connection.

getWaitSecondsHighCount

int getWaitSecondsHighCount()

The highest number of seconds that an application waited for a connection (the longest connection reserve wait time) from this instance of the connection pool since the connection pool was instantiated.

This value is updated when a completed getConnection request takes longer to return a connection than any previous request.

Returns:
The number of seconds of the longest wait time.

getConnectionsTotalCount

int getConnectionsTotalCount()

The cumulative total number of database connections created in this data source since the data source was deployed.

Returns:
The cumulative total number of JDBC connections created in this data source.

getCurrCapacity

int getCurrCapacity()

The current count of JDBC connections in the connection pool in the data source.

Returns:
The current capacity of this pool.

getCurrCapacityHighCount

int getCurrCapacityHighCount()

Highest number of database connections available or in use (current capacity) in this instance of the data source since the data source was deployed.

Returns:
The high watermark of current capacity of this data source.

getNumAvailable

int getNumAvailable()

The number of database connections that are currently idle and available to be used by applications in this instance of the data source.

Returns:
The number of available connections in this data source.

getHighestNumAvailable

int getHighestNumAvailable()

Highest number of database connections that were idle and available to be used by an application at any time in this instance of the data source since the data source was deployed.

Returns:
The highest number of available connections in this pool.

getNumUnavailable

int getNumUnavailable()

The number of connections currently in use by applications or being tested in this instance of the data source.

Returns:
The number of connections currently in use for this pool.

getHighestNumUnavailable

int getHighestNumUnavailable()

Highest number of database connections that were in use by applications or being tested by the system in this instance of the data source since the data source was deployed.

Returns:
The highest number of connections used in this pool.

shrink

void shrink()
            throws Exception

Shrinks the database connection pool in the data source to either the current number of reserved connections or the initial size of the connection pool, which ever is greater.

This is a privileged operation that can only be invoked by an authorized user.

Throws:
Exception - if there is an error
All security roles can access this item.

reset

void reset()
           throws Exception

Resets the connection pool in the data source by shutting down and recreating all available database connections in the pool.

Use when a data source is in the health state of Unhealthy and needs to be reinitialized.

This is a privileged operation that can only be invoked by an authorized user.

Throws:
Exception - if there is an error
All security roles can access this item.

suspend

void suspend()
             throws Exception

Suspends a data source has the health state of Running and disables existing connections. If any connections from the data source are currently in use, the operation fails and the health state remains Running.

If successful, the health state is set to Suspended.

This is a privileged operation that can only be invoked by an authorized user.

Throws:
Exception - if there is an error
All security roles can access this item.

forceSuspend

void forceSuspend()
                  throws Exception

Suspends a data source that has the health state of Running, including disconnecting all current connection users. All current connections are closed and recreated.

If successful, the health state is set to Suspended.

This is a privileged operation that can only be invoked by an authorized user.

Throws:
Exception - if there is an error
All security roles can access this item.

shutdown

void shutdown()
              throws Exception

Shuts down a data source that has a health state of Running. If any connections from the data source are currently in use, the operation fails and the health state remains Running.

If successful, the health state is set to Shutdown.

This is a privileged operation that can only be invoked by an authorized user.

Throws:
Exception - if there is an error
All security roles can access this item.

forceShutdown

void forceShutdown()
                   throws Exception

Shuts down a data source that has a health state of Running, including forcing the disconnection of all current connection users.

If successful, the health state is set to Shutdown.

This is a privileged operation that can only be invoked by an authorized user.

Throws:
Exception - if there is an error

resume

void resume()
            throws Exception

Restores all access to and operations on a data source that has a health state of Suspended.

If successful, the health state is set to Running.

This is a privileged operation that can only be invoked by an authorized user.

Throws:
Exception - if there is an error
All security roles can access this item.

start

void start()
           throws Exception

Starts a data source that has a health state of Shutdown.

If successful, the health state is set to Running.

This is a privileged operation that can only be invoked by an authorized user.

Throws:
Exception - if there is an error

getProperties

Properties getProperties()
                         throws Exception

The list of properties for a data source that are passed to the JDBC driver when creating database connections.

This is a privileged operation that can only be invoked by an authorized user.

Returns:
The properties for a data source.
Throws:
Exception - if there is an error

poolExists

boolean poolExists(String poolName)
                   throws Exception

Specifies whether a data source with the given name exists.

This is a privileged operation that can only be invoked by an authorized user.

Parameters:
poolName - Name of the pool being looked for
Throws:
Exception - if there is an error

clearStatementCache

void clearStatementCache()
                         throws Exception

For each connection in the connection pool, clears the statement cache of Prepared and Callable Statements.

Throws:
Exception - if there is an error
All security roles can access this item.

dumpPool

void dumpPool()
              throws Exception

Prints out information about all the connections in the connection pool in the data source.

Throws:
Exception

dumpPoolProfile

void dumpPoolProfile()
                     throws Exception

Prints out profile information about the data source.

Throws:
Exception

setJDBCDriverRuntime

void setJDBCDriverRuntime(JDBCDriverRuntimeMBean mbean)

Sets the JDBCDriverRuntimeMBean associated with this data source.


getJDBCDriverRuntime

JDBCDriverRuntimeMBean getJDBCDriverRuntime()

Gets the JDBCDriverRuntimeMBean associated with this data source.


getLastTask

JDBCDataSourceTaskRuntimeMBean getLastTask()

getDatabaseProductName

String getDatabaseProductName()
                              throws RemoteException

The product name of the database that this data source is connected to.

Returns:
The product name of the connected database
Throws:
RemoteException - Thrown when the operation is unable to obtain the attribute from the JDBC meta data.

getDatabaseProductVersion

String getDatabaseProductVersion()
                                 throws RemoteException

The product version of the database that this data source is connected to.

Returns:
The product version of the connected database
Throws:
RemoteException - Thrown when the operation is unable to obtain the attribute from the JDBC meta data.

getDriverName

String getDriverName()
                     throws RemoteException

The product name of the JDBC driver that this data source is configured to use.

Returns:
The product name of the JDBC driver
Throws:
RemoteException - Thrown when the operation is unable to obtain the attribute from the JDBC meta data.

getDriverVersion

String getDriverVersion()
                        throws RemoteException

The version of the JDBC driver that this data source is configured to use.

Returns:
The version of the JDBC driver
Throws:
RemoteException - Thrown when the operation is unable to obtain the attribute from the JDBC meta data.

Copyright 1996, 2014, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.3)

Part Number E41849-02