Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | Oracle
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weblogic.jdbc.extensions
Interface ConnectionPoolFailoverCallback

    public interface ConnectionPoolFailoverCallback

Controls the failover of WebLogic Server MultiPools.

If an application registers a class with WebLogic Server that implements this interface, WebLogic Server invokes this interface's method "allowPoolFailover()" and take different action depending on the return code from the method invocation.

For failover, applies to MultiPools with the High Availability algorithm only. For failback (when re-enabling an automatically disabled connection pool), applies to all MultiPools.

See Also:
  `JDBCMultiPoolMBean.setConnectionPoolFailoverCallbackHandler(java.lang.String)`

Field Summary
`static int` | `DONOT_FAILOVER` A return code from the allowPoolFailover method.
`static int` | `OK` A return code from the allowPoolFailover method.
`static int` | `OPCODE_CURR_POOL_BUSY` A parameter passed to the callback handler in the allowPoolFailover method.
`static int` | `OPCODE_CURR_POOL_DEAD` A parameter passed to the callback handler in the `allowPoolFailover()` method.
`static int` | `OPCODE_REENABLE_CURR_POOL` A parameter passed to the callback handler in the allowPoolFailover method.
`static int` | `RETRY_CURRENT` A return code from the allowPoolFailover method.

Method Summary
`int` | `allowPoolFailover(String currPool, String nextPool, int opcode)` The WebLogic Server MultiPool invokes this method under various failover or failback conditions.

Field Detail

### OPCODE_CURR_POOL_DEAD

    static final int OPCODE_CURR_POOL_DEAD

  A parameter passed to the callback handler in the `allowPoolFailover()` method.

  Indicates that JDBC connections in the connection pool have failed a connection test. The MultiPool is ready to failover to the `nextPool` connection pool.

  See Also:
    Constant Field Values

### OPCODE_CURR_POOL_BUSY

    static final int OPCODE_CURR_POOL_BUSY

  A parameter passed to the callback handler in the allowPoolFailover method.

  Indicates that all JDBC connections in the current connection pool are in use. The MultiPool is ready to reroute the connection request to the `nextPool` connection pool.

  See Also:
    Constant Field Values

### OPCODE_REENABLE_CURR_POOL

    static final int OPCODE_REENABLE_CURR_POOL

  A parameter passed to the callback handler in the allowPoolFailover method.

  Indicates that the 'currPool' connection pool is now available and the MultiPool can re-enable that connection pool.

  See Also:
    Constant Field Values

### OK

    static final int OK

  A return code from the allowPoolFailover method.

  Indicates that the MultiPool should proceed with the current operation.

  See Also:
    Constant Field Values

### RETRY_CURRENT

    static final int RETRY_CURRENT

  A return code from the allowPoolFailover method.

  Indicates that the MultiPool should retry connection requests with the current connection pool.

  See Also:
    Constant Field Values

### DONOT_FAILOVER

    static final int DONOT_FAILOVER

  A return code from the allowPoolFailover method.

  Indicates that the MultiPool should NOT failover or failback. If the MultiPool is attempting to failover, Weblogic Server will throw a weblogic.jdbc.extensions.PoolUnavailableSQLException. On failback, no exception will be thrown.

  See Also:
    Constant Field Values

Method Detail

### allowPoolFailover

    int allowPoolFailover(String currPool,
                          String nextPool,
                          int opcode)

  The WebLogic Server MultiPool invokes this method under various failover or failback conditions. The callback handler should return one of the following codes from this method, based upon application-specific semantics:
  - OK
  - RETRY_CURRENT
  - DONOT_FAILOVER

  Parameters:
    `currPool` - - name of connection pool currently in use. Will NEVER be null.
    `nextPool` - - name of next available connection pool listed in the MultiPool.
    - Is null if the `currPool` is the last connection pool in the list.
    - Is null for opcode `'OPCODE_REENABLE_CURR_POOL'`.
    `opcode` - - operation being performed:
    - `OPCODE_CURR_POOL_DEAD`
    - `OPCODE_CURR_POOL_BUSY`
    - `OPCODE_REENABLE_CURR_POOL`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://edocs.bea.com/wls/docs103 Copyright 1996,2008, 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.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD