# JDBCDataSourceRuntimeMBean

Overview | Related MBeans | Attributes | Operations

## Overview

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

Since | 9.0.0.0
Fully Qualified Interface Name | If you use the `getMBeanInfo` operation in MBeanTypeServiceMBean, supply the following value as this MBean's fully qualified interface name: `weblogic.management.runtime.JDBCDataSourceRuntimeMBean`
Factory Methods | No factory methods. Instances of this MBean are created automatically.
Access Points | You can access this MBean from the following MBean attributes:
JDBCServiceRuntimeMBean.JDBCDataSourceRuntimeMBeans |
Access Points Inherited from ComponentRuntimeMBean | Because this MBean extends or implements ComponentRuntimeMBean, you can also access this MBean by retrieving ComponentRuntimeMBeans. The following attributes contain ComponentRuntimeMBeans and its subtypes:
ApplicationRuntimeMBean.ComponentRuntimes |

## Related MBeans

This section describes attributes that provide access to other MBeans. For more information about the MBean hierarchy, refer to WebLogic Server MBean Data Model.

JDBCDriverRuntime LastTask | WorkManagerRuntimes

### JDBCDriverRuntime

Gets the JDBCDriverRuntimeMBean associated with this data source.

Privileges | Read/Write
Type | JDBCDriverRuntimeMBean
Relationship type: | Reference.
Redeploy or Restart required | Changes take effect after you redeploy the module or restart the server.

### LastTask

Factory Methods | No explicit creator method. The child shares the lifecycle of its parent.
Privileges | Read only
Type | JDBCDataSourceTaskRuntimeMBean
Relationship type: | Containment.

### WorkManagerRuntimes

Get the runtime mbeans for all work managers defined in this component

Privileges | Read only
Type | WorkManagerRuntimeMBean[]
Relationship type: | Reference.

## Attributes

This section describes the following attributes:

ActiveConnectionsAverageCount ActiveConnectionsCurrentCount ActiveConnectionsHighCount ConnectionDelayTime ConnectionsTotalCount CurrCapacity CurrCapacityHighCount DeploymentState Enabled FailedReserveRequestCount FailuresToReconnectCount HighestNumAvailable HighestNumUnavailable LeakedConnectionCount ModuleId Name NumAvailable NumUnavailable Parent | PrepStmtCacheAccessCount PrepStmtCacheAddCount PrepStmtCacheCurrentSize PrepStmtCacheDeleteCount PrepStmtCacheHitCount PrepStmtCacheMissCount Properties ReserveRequestCount State Type VersionJDBCDriver WaitingForConnectionCurrentCount WaitingForConnectionFailureTotal WaitingForConnectionHighCount WaitingForConnectionSuccessTotal WaitingForConnectionTotal WaitSecondsHighCount

### ActiveConnectionsAverageCount

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

Active connections are connections in use by an application.

Privileges | Read only
Type | int

### ActiveConnectionsCurrentCount

The number of connections currently in use by applications.

Privileges | Read only
Type | int

### ActiveConnectionsHighCount

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.

Privileges | Read only
Type | int

### ConnectionDelayTime

The average 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.

Privileges | Read only
Type | int

### ConnectionsTotalCount

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

Privileges | Read only
Type | int

### CurrCapacity

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

Privileges | Read only
Type | int

### CurrCapacityHighCount

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

Privileges | Read only
Type | int

### DeploymentState

The current deployment state of the module.

Privileges | Read only
Type | int

### Enabled

Indicates whether the data source is enabled or disabled:

- `true`

  if the data source is enabled.

- `false`

  if the data source is disabled.

Privileges | Read only
Type | boolean

### FailedReserveRequestCount

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

Privileges | Read only
Type | long

### FailuresToReconnectCount

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.

Privileges | Read only
Type | int

### HighestNumAvailable

Highest number of database connections that were available at any time in this instance of the data source since the data source was deployed.

Privileges | Read only
Type | int

### HighestNumUnavailable

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

Privileges | Read only
Type | int

### LeakedConnectionCount

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()`.

Privileges | Read only
Type | int

### ModuleId

Returns the identifier for this Component. The identifier is unique within the application.

Typical modules will use the URI for their id. Web Modules will return their context-root since the web-uri may not be unique within an EAR.

Privileges | Read only
Type | java.lang.String

### Name

The name of this configuration. WebLogic Server uses an MBean to implement and persist the configuration.

Privileges | Read only
Type | java.lang.String

### NumAvailable

The number of database connections currently available (not in use) in this data source.

Privileges | Read only
Type | int

### NumUnavailable

The number of database connections that are currently unavailable (in use or being tested by the system) in this instance of the data source.

Privileges | Read only
Type | int

### Parent

Return the immediate parent for this MBean

Privileges | Read/Write
Type |

### PrepStmtCacheAccessCount

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

Privileges | Read only
Type | long

### PrepStmtCacheAddCount

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.

Privileges | Read only
Type | long

### PrepStmtCacheCurrentSize

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.

Privileges | Read only
Type | int

### PrepStmtCacheDeleteCount

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.

Privileges | Read only
Type | long

### PrepStmtCacheHitCount

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

Privileges | Read only
Type | int

### PrepStmtCacheMissCount

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

Privileges | Read only
Type | int

### Properties

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 a an authorized user.

Privileges | Read only
Type | java.util.Properties

### ReserveRequestCount

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

Privileges | Read only
Type | long

### State

The current state of the data source.

Possible states are:

- `Running`

  - the data source is enabled (deployed and not SUSPENDED). This is the normal state of the data source.

- `Suspended`

  - the data source has been manually disabled.

- `Shutdown`

  - the data source is shutdown and all database connections have been closed.

- `Unhealthy`

  - all connections are unavailable (not because they are in use). This state occurs if the database server is unavailable when the data source is created (creation retry must be enabled) or if all connections have failed connection tests (on creation, on reserve, or periodic testing).

- `Unknown`

  - the data source state is unknown.

Privileges | Read only
Type | java.lang.String

### Type

Returns the type of the MBean.

Privileges | Read only
Type | java.lang.String

### VersionJDBCDriver

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

The value returned the driver class named concatenated with 'major: XX, minor: YY' version information.

Privileges | Read only
Type | java.lang.String

### WaitingForConnectionCurrentCount

The number of connection requests waiting for a database connection.

Privileges | Read only
Type | int

### WaitingForConnectionFailureTotal

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.

For more information, see:

- ConnectionReserveTimeoutSeconds()

Privileges | Read only
Type | long

### WaitingForConnectionHighCount

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

Privileges | Read only
Type | int

### WaitingForConnectionSuccessTotal

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.

Privileges | Read only
Type | long

### WaitingForConnectionTotal

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.

Privileges | Read only
Type | long

### WaitSecondsHighCount

The longest connection reserve wait time in seconds.

Privileges | Read only
Type | int

## Operations

This section describes the following operations:

clearStatementCache dumpPool dumpPoolProfile forceShutdown forceSuspend poolExists reset | resume shrink shutdown suspend testPool

### clearStatementCache

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

Operation Name | `"clearStatementCache"`
Parameters | `null`
Signature | `null`
Returns | `void`
Exceptions | `java.lang.Exception`

### dumpPool

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

Operation Name | `"dumpPool"`
Parameters | `null`
Signature | `null`
Returns | `void`
Exceptions | `java.lang.Exception`

### dumpPoolProfile

Prints out profile information about the data source.

Operation Name | `"dumpPoolProfile"`
Parameters | `null`
Signature | `null`
Returns | `void`
Exceptions | `java.lang.Exception`

### forceShutdown

Forcibly shuts down the data source. All current connection users are forcibly disconnected.

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

Operation Name | `"forceShutdown"`
Parameters | `null`
Signature | `null`
Returns | `void`
Exceptions | `java.lang.Exception`

### forceSuspend

Forcibly disables the data source, suspending all operations on connections from the data source until the data source is re-enabled. All current connection users are forcibly disconnected. All connections currently in use are closed and recreated.

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

Operation Name | `"forceSuspend"`
Parameters | `null`
Signature | `null`
Returns | `void`
Exceptions | `java.lang.Exception`

### poolExists

Specifies whether a data source with the given name exists.

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

Operation Name | `"poolExists"`
Parameters | `Object [] { name }` where: `name` is an object of type `java.lang.String` that specifies: Name of the pool being looked for
Signature | `String [] { "java.lang.String" }`
Returns | `boolean`
Exceptions | `java.lang.Exception`

### reset

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

This method should be used when the data source is in a bad state and needs to be reinitialized.

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

Operation Name | `"reset"`
Parameters | `null`
Signature | `null`
Returns | `void`
Exceptions | `java.lang.Exception`

### resume

Restores all access to and operations on a data source that has been suspended (marked as disabled).

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

Operation Name | `"resume"`
Parameters | `null`
Signature | `null`
Returns | `void`
Exceptions | `java.lang.Exception`

### shrink

Shrinks the database connection pool in the data source to the higher of the current number of reserved connections or the initial size of the connection pool.

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

Operation Name | `"shrink"`
Parameters | `null`
Signature | `null`
Returns | `void`
Exceptions | `java.lang.Exception`

### shutdown

Shuts down the data source. If any connections from the data source are currently in use, the operation will fail.

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

Operation Name | `"shutdown"`
Parameters | `null`
Signature | `null`
Returns | `void`
Exceptions | `java.lang.Exception`

### suspend

Disables the data source, suspending all operations on connections from the data source until the data source is re-enabled.

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

Operation Name | `"suspend"`
Parameters | `null`
Signature | `null`
Returns | `void`
Exceptions | `java.lang.Exception`

### 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.

For more information, see:

- JDBCConnectionPoolMBean

Operation Name | `"testPool"`
Parameters | `null`
Signature | `null`
Returns | `String`