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

## com.novell.nds.dirxml.driver.jdbc.db
Interface DBConnectionTester

public interface DBConnectionTester

Database-independent interface used to determine connection state.
All subclasses MUST have a public constructor with no parameters.

Method Summary
`boolean` | `isAuthFailure(Connection connection, SQLException sql, com.novell.nds.dirxml.driver.Trace trace)` Returns whether an authentication error has been encountered.
`boolean` | `isBad(Connection connection, SQLException sql, com.novell.nds.dirxml.driver.Trace trace)` Returns the state of `connection`.
`boolean` | `isBad(Connection connection, com.novell.nds.dirxml.driver.Trace trace)` Deprecated.
`boolean` | `isFatal(Connection connection, SQLException sql, com.novell.nds.dirxml.driver.Trace trace)` Returns whether a fatal error has been encountered.
`boolean` | `isRetry(Connection connection, SQLException sql, com.novell.nds.dirxml.driver.Trace trace)` Returns whether a timeout or retry condition has been encountered.

Method Detail

### isBad

    public boolean isBad(Connection connection,
                         com.novell.nds.dirxml.driver.Trace trace)

  Deprecated.

  Returns the state of `connection`.
  This method MUST NOT close or change the state of the passed connection. It is recommended that at most one `Statement` object be allocated. All operations MUST be read-only. This method MUST close any allocated `Statement` or `ResultSet` objects. A finally block is recommended for this purpose. Disregarding these constraints will likely cause the driver to malfunction.

  Parameters:
    `connection` - the connection being tested; will not be `null`
    `trace` - allows messages to be output to DSTrace; will not be `null`
  Returns:
    `true` if `connection` is bad; `false` if `connection` is good
  Since:
    version 1

### isBad

    public boolean isBad(Connection connection,
                         SQLException sql,
                         com.novell.nds.dirxml.driver.Trace trace)

  Returns the state of `connection`.
  This method MUST NOT close of change the state of the passed connection. It is recommended that at most one `Statement` object be allocated. All operations MUST be read-only. This method MUST close any allocated `Statement` or `ResultSet` objects. A finally block is recommended for this purpose. Disregarding these constraints will likely cause the driver to malfunction.

  Parameters:
    `connection` - the connection being tested; will not be `null`
    `sql` - contains database-specific error code info; will not be `null`
    `trace` - allows messages to be output to DSTrace; will not be `null`
  Returns:
    `true` if `connection` is bad; `false` if `connection` is good
  Since:
    version 2

### isRetry

    public boolean isRetry(Connection connection,
                           SQLException sql,
                           com.novell.nds.dirxml.driver.Trace trace)

  Returns whether a timeout or retry condition has been encountered.
  This method MUST NOT close of change the state of the passed connection. It is recommended that at most one `Statement` object be allocated. All operations MUST be read-only. This method MUST close any allocated `Statement` or `ResultSet` objects. A finally block is recommended for this purpose. Disregarding these constraints will likely cause the driver to malfunction.

  Parameters:
    `connection` - the connection object that generated `sql`; will not be `null`
    `sql` - contains database-specific error code info; will not be `null`
    `trace` - allows messages to be output to DSTrace; will not be `null`
  Returns:
    `true` if a retry condition has been detected; `false` otherwise
  Since:
    version 3

### isAuthFailure

    public boolean isAuthFailure(Connection connection,
                                 SQLException sql,
                                 com.novell.nds.dirxml.driver.Trace trace)

  Returns whether an authentication error has been encountered.
  This method MUST NOT close of change the state of the passed connection. It is recommended that at most one `Statement` object be allocated. All operations MUST be read-only. This method MUST close any allocated `Statement` or `ResultSet` objects. A finally block is recommended for this purpose. Disregarding these constraints will likely cause the driver to malfunction.

  Parameters:
    `connection` - the connection object that generated `sql`; will not be `null`
    `sql` - contains database-specific error code info; will not be `null`
    `trace` - allows messages to be output to DSTrace; will not be `null`
  Returns:
    `true` if an authentication error has been detected; `false` otherwise
  Since:
    version 3

### isFatal

    public boolean isFatal(Connection connection,
                           SQLException sql,
                           com.novell.nds.dirxml.driver.Trace trace)

  Returns whether a fatal error has been encountered.
  This method MUST NOT close of change the state of the passed connection. It is recommended that at most one `Statement` object be allocated. All operations MUST be read-only. This method MUST close any allocated `Statement` or `ResultSet` objects. A finally block is recommended for this purpose. Disregarding these constraints will likely cause the driver to malfunction.

  Parameters:
    `connection` - the connection object that generated `sql`; will not be `null`
    `sql` - contains database-specific error code info; will not be `null`
    `trace` - allows messages to be output to DSTrace; will not be `null`
  Returns:
    `true` if a fatal error has been detected; `false` otherwise
  Since:
    version 3

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