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

## oracle.ifs.admin.sql
Class OracleConnections

    java.lang.Object
      oracle.ifs.admin.sql.OracleConnections

    public class OracleConnections

extends java.lang.Object

The OracleConnections class creates java.sql.Connection instances using the Oracle JDBC driver.

Modified:
  dpitfiel04/16/2001 Changed Properties setProperty to put for Java 1.x compatibility, lsaenz 04/13/2001 Added getOci8ConnectionToOracle8i, etc., lsaenz 03/17/2001 Updated comments., lsaenz 03/19/2000 Added getConnection method., lsaenz 02/06/2000 Decoupled from Settings., lsaenz 12/02/1999 Changed name to OracleConnections, added ability to return specific connections based on Settings., lsaenz 10/11/1999 Created.

Field Summary
`static java.lang.String` | `ORACLE_DEFAULT_DRIVER` Default Oracle JDBC driver class.
`static java.lang.String` | `ORACLE_OCI8_JDBC` Connection String prefix for the Oracle OCI8 (type 2) JDBC driver.
`static java.lang.String` | `ORACLE_THIN_JDBC` Connection String prefix for the Oracle thin (type 4) JDBC driver.

Constructor Summary
`OracleConnections()`

Method Summary
`static java.sql.Connection` | `getConnection(java.lang.String user, java.lang.String password, java.lang.String databaseUrl)` Returns a JDBC Connection to an Oracle database.
`static java.sql.Connection` | `getConnection(java.lang.String user, java.lang.String password, java.lang.String databaseUrl, java.lang.String connectAsRole)` Returns a JDBC Connection to an Oracle database.
`static java.sql.Connection` | `getOci8Connection(java.lang.String user, java.lang.String password, java.lang.String connectString)` Returns an OCI8 JDBC Connection to an Oracle database.
`static java.sql.Connection` | `getOci8Connection(java.lang.String user, java.lang.String password, java.lang.String connectString, java.lang.String connectAsRole)` Returns an OCI8 JDBC Connection to an Oracle database.
`static java.sql.Connection` | `getThinConnection(java.lang.String user, java.lang.String password, java.lang.String connectString)` Returns a thin JDBC Connection to an Oracle database.
`static java.sql.Connection` | `getThinConnection(java.lang.String user, java.lang.String password, java.lang.String connectString, java.lang.String connectAsRole)` Returns a thin JDBC Connection to an Oracle database.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ORACLE_DEFAULT_DRIVER

    public static final java.lang.String ORACLE_DEFAULT_DRIVER

  Description copied from class: `OracleConnections`
  Default Oracle JDBC driver class.

  See Also:
    Constant Field Values

### ORACLE_THIN_JDBC

    public static final java.lang.String ORACLE_THIN_JDBC

  Description copied from class: `OracleConnections`
  Connection String prefix for the Oracle thin (type 4) JDBC driver.

  See Also:
    Constant Field Values

### ORACLE_OCI8_JDBC

    public static final java.lang.String ORACLE_OCI8_JDBC

  Description copied from class: `OracleConnections`
  Connection String prefix for the Oracle OCI8 (type 2) JDBC driver.

  See Also:
    Constant Field Values

Constructor Detail

### OracleConnections

    public OracleConnections()

Method Detail

### getConnection

    public static java.sql.Connection getConnection(java.lang.String user,
                                                    java.lang.String password,
                                                    java.lang.String databaseUrl)
                                             throws java.lang.ClassNotFoundException,
                                                    java.sql.SQLException

  Description copied from class: `OracleConnections`
  Returns a JDBC Connection to an Oracle database.

  Note: this method attempts to load (dynamically) the class `oracle.jdbc.driver.OracleDriver` using the method `Class.forName()`.

  Parameters:
    `user` - the Oracle database user to authenticate as.
    `password` - the user's password.
    `databaseUrl` - the database URL, which must include the connection type (OCI8 or thin) and either a TNS connect string (for OCI8 connections) or host:port:sid (for thin connections).
  Returns:
    a JDBC Connection to an Oracle database.
  Throws:
    `java.lang.LinkageError` - if the native part of the driver can't be loaded.
    `java.lang.ExceptionInInitializerError` - if the initialization of the OracleDriver class fails.
    `java.lang.ClassNotFoundException` - if class OracleDriver can't be found.
    `java.sql.SQLException`

### getConnection

    public static java.sql.Connection getConnection(java.lang.String user,
                                                    java.lang.String password,
                                                    java.lang.String databaseUrl,
                                                    java.lang.String connectAsRole)
                                             throws java.lang.ClassNotFoundException,
                                                    java.sql.SQLException

  Description copied from class: `OracleConnections`
  Returns a JDBC Connection to an Oracle database.

  Note: this method attempts to load (dynamically) the class `oracle.jdbc.driver.OracleDriver` using the method `Class.forName()`.

  Parameters:
    `user` - the Oracle database user to authenticate as.
    `password` - the user's password.
    `databaseUrl` - the database URL, which must include the connection type (OCI8 or thin) and either a TNS connect string (for OCI8 connections) or host:port:sid (for thin connections).
    `connectAsRole` - The role used to connect this user. e.g. SYSDBA
  Returns:
    a JDBC Connection to an Oracle database.
  Throws:
    `java.lang.LinkageError` - if the native part of the driver can't be loaded.
    `java.lang.ExceptionInInitializerError` - if the initialization of the OracleDriver class fails.
    `java.lang.ClassNotFoundException` - if class OracleDriver can't be found.
    `java.sql.SQLException`

### getOci8Connection

    public static java.sql.Connection getOci8Connection(java.lang.String user,
                                                        java.lang.String password,
                                                        java.lang.String connectString)
                                                 throws java.lang.ClassNotFoundException,
                                                        java.sql.SQLException

  Description copied from class: `OracleConnections`
  Returns an OCI8 JDBC Connection to an Oracle database. This type of connection requires the Oracle OCI8 native libraries.

  Note: this method attempts to load (dynamically) the class `oracle.jdbc.driver.OracleDriver` using the method `Class.forName()`.

  Parameters:
    `user` - the Oracle database user to authenticate as.
    `password` - the user's password.
    `connectString` - the TNS connect string, or TNS alias (use "" to specify a local database).
  Returns:
    an OCI8 JDBC Connection to an Oracle database.
  Throws:
    `java.lang.LinkageError` - if the native part of the driver can't be loaded.
    `java.lang.ExceptionInInitializerError` - if the initialization of the OracleDriver class fails.
    `java.lang.ClassNotFoundException` - if class OracleDriver can't be found.
    `java.sql.SQLException`

### getOci8Connection

    public static java.sql.Connection getOci8Connection(java.lang.String user,
                                                        java.lang.String password,
                                                        java.lang.String connectString,
                                                        java.lang.String connectAsRole)
                                                 throws java.lang.ClassNotFoundException,
                                                        java.sql.SQLException

  Description copied from class: `OracleConnections`
  Returns an OCI8 JDBC Connection to an Oracle database. This type of connection requires the Oracle OCI8 native libraries.

  Note: this method attempts to load (dynamically) the class `oracle.jdbc.driver.OracleDriver` using the method `Class.forName()`.

  Parameters:
    `user` - the Oracle database user to authenticate as.
    `password` - the user's password.
    `connectString` - the TNS connect string, or TNS alias (use "" to specify a local database).
    `connectAsRole` - The role used to connect this user. e.g. SYSDBA
  Returns:
    an OCI8 JDBC Connection to an Oracle database.
  Throws:
    `java.lang.LinkageError` - if the native part of the driver can't be loaded.
    `java.lang.ExceptionInInitializerError` - if the initialization of the OracleDriver class fails.
    `java.lang.ClassNotFoundException` - if class OracleDriver can't be found.
    `java.sql.SQLException`

### getThinConnection

    public static java.sql.Connection getThinConnection(java.lang.String user,
                                                        java.lang.String password,
                                                        java.lang.String connectString)
                                                 throws java.lang.ClassNotFoundException,
                                                        java.sql.SQLException

  Description copied from class: `OracleConnections`
  Returns a thin JDBC Connection to an Oracle database.

  Note: this method attempts to load (dynamically) the class `oracle.jdbc.driver.OracleDriver` using the method `Class.forName()`.

  Parameters:
    `user` - the Oracle database user to authenticate as.
    `password` - the user's password.
    `connectString` - a String of the form: "host:port:sid", specifying a database to connect to.
  Returns:
    an thin JDBC Connection to an Oracle database.
  Throws:
    `java.lang.ExceptionInInitializerError` - if the initialization of the OracleDriver class fails.
    `java.lang.ClassNotFoundException` - if class OracleDriver can't be found.
    `java.sql.SQLException`

### getThinConnection

    public static java.sql.Connection getThinConnection(java.lang.String user,
                                                        java.lang.String password,
                                                        java.lang.String connectString,
                                                        java.lang.String connectAsRole)
                                                 throws java.lang.ClassNotFoundException,
                                                        java.sql.SQLException

  Description copied from class: `OracleConnections`
  Returns a thin JDBC Connection to an Oracle database.

  Note: this method attempts to load (dynamically) the class `oracle.jdbc.driver.OracleDriver` using the method `Class.forName()`.

  Parameters:
    `user` - the Oracle database user to authenticate as.
    `password` - the user's password.
    `connectString` - a String of the form: "host:port:sid", specifying a database to connect to.
    `connectAsRole` - The role used to connect this user. e.g. SYSDBA
  Returns:
    an thin JDBC Connection to an Oracle database.
  Throws:
    `java.lang.ExceptionInInitializerError` - if the initialization of the OracleDriver class fails.
    `java.lang.ClassNotFoundException` - if class OracleDriver can't be found.
    `java.sql.SQLException`

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