/management/wls/{version}/datasources/id/{data-source-name}/clearStatementCache

This resource clears the statement cache for each connection in the data source. If statement caching is enabled for a data source, WebLogic Server caches prepared and callable statements that are used in each connection in the data source. Each connection has its own cache, but the caches for each connection are configured and managed as a group. When you clear the statement cache for a data source, you clear the statement cache for all connections in the instance of the data source you select.

When you clear a statement that is currently in use by an application, WebLogic Server removes the statement from the cache, but does not close it. When you clear a statement that is not currently in use, WebLogic Server removes the statement from the cache and closes it.

The resource supports the following methods:

POST Method

The POST method on this resource clears the statement cache for each connection in the data source.

Roles

Administrator, Deployer, Operator

Response Body

A success response body includes status messages returned by this operation.

Response Codes

This method returns one of the Standard HTTP Status Codes.

Example

Example 1   Clearing a Data Source's Statement Caches

This example uses the POST method to clear the statement caches for a specific data source.

Example Request

curl -v \
--user username:password \
-H X-Requested-By:MyClient \
-H Accept:application/json \
-X POST http://localhost:7001/management/wls/latest/datasources/id/TestDataSource/clearStatementCache

Example Response

HTTP/1.1 200 OK

Response Body:
{"messages": [{
    "message": "Data Source 'TestDataSource' was successfully cleared.",
    "severity": "SUCCESS"
}]}