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

Part Number E27170-01

oracle.ucp.jdbc
Interface HarvestableConnection

All Known Subinterfaces:
WLConnection

public interface HarvestableConnection

Interface supporting Connection Harvesting for JDBC java.sql.Connections.

Connection Harvesting allows the Universal Connection Pool to actively return borrowed connections to the pool when a user-specified threshold for harvesting is met or when the pool has reached its max capacity yet all connections in the pool are borrowed.

Users have the option for specifying whether a borrowed connection is harvestable, as well as providing customized cleanup actions on harvestable connections.

Applications use this interface along with the harvesting properties and callbacks for complete connection harvesting functions.

See Also:
PoolDataSource, ConnectionHarvestingCallback

Method Summary
 boolean isConnectionHarvestable()
          Specifies whether this connection is harvestable.
 void registerConnectionHarvestingCallback(ConnectionHarvestingCallback cbk)
          Registers a ConnectionHarvestingCallback with the this connection.
 void removeConnectionHarvestingCallback()
          Removes the ConnectionHarvestingCallback object registered with this connection, if any.
 void setConnectionHarvestable(boolean isConnectionHarvestable)
          Specifies whether this connection is harvestable.
 

Method Detail

setConnectionHarvestable

void setConnectionHarvestable(boolean isConnectionHarvestable)
                              throws SQLException
Specifies whether this connection is harvestable.

Parameters:
isConnectionHarvestable - Whether this connection is harvestable.
Throws:
SQLException - If this connection was closed.

isConnectionHarvestable

boolean isConnectionHarvestable()
                                throws SQLException
Specifies whether this connection is harvestable.

Returns:
A boolean indicating whether this connection is harvestable. True if so and false otherwise.
Throws:
SQLException - If an error occurs.

registerConnectionHarvestingCallback

void registerConnectionHarvestingCallback(ConnectionHarvestingCallback cbk)
                                          throws SQLException
Registers a ConnectionHarvestingCallback with the this connection.

Parameters:
cbk - The ConnectionHarvestingCallback object to be registered.
Throws:
SQLException - If there is a callback already registered with the connection.

removeConnectionHarvestingCallback

void removeConnectionHarvestingCallback()
                                        throws SQLException
Removes the ConnectionHarvestingCallback object registered with this connection, if any.

Throws:
SQLException - If callback removal fails.

Copyright 1996, 2013, 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.2)

Part Number E27170-01