Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | 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.

Author:
  Copyright (c) 2004 by BEA Systems, Inc. All Rights Reserved.
See Also:
  `JDBCMultiPoolMBean.getConnectionPoolFailoverCallbackHandler()`

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 application in the allowPoolFailover method.
`static int` | `OPCODE_CURR_POOL_DEAD` A parameter passed to the callback application in the `allowPoolFailover()` method.
`static int` | `OPCODE_REENABLE_CURR_POOL` A parameter passed to the callback application in the allowPoolFailover method.
`static int` | `RETRY_CURRENT` A return code from the allowPoolFailover method.

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

Field Detail

### OPCODE_CURR_POOL_DEAD

    public static final int OPCODE_CURR_POOL_DEAD

  A parameter passed to the callback application 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.

### OPCODE_CURR_POOL_BUSY

    public static final int OPCODE_CURR_POOL_BUSY

  A parameter passed to the callback application 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.

### OPCODE_REENABLE_CURR_POOL

    public static final int OPCODE_REENABLE_CURR_POOL

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

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

### OK

    public static final int OK

  A return code from the allowPoolFailover method.

  Indicates that the MultiPool should proceed with the current operation.

### RETRY_CURRENT

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

### DONOT_FAILOVER

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

Method Detail

### allowPoolFailover

    public int allowPoolFailover(java.lang.String currPool,
                                 java.lang.String nextPool,
                                 int opcode)

  The WebLogic Server MultiPool invokes this method under various failover or failback conditions. The application 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://e-docs.bea.com/wls/docs70
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 BEA Systems, Inc. All Rights Reserved.
WebLogic Server 7.0 API Reference