© 2002 BEA Systems, Inc.


com.bea.p13n.content.document
Class DataSourceHelper

java.lang.Object
  |
  +--com.bea.p13n.content.document.DataSourceHelper

Deprecated. No longer needed -- just use a DataSource with JdbcHelper.

public class DataSourceHelper
extends java.lang.Object

A class to help getting a connection to a document jdbc connections.

Since:
3.1.0
See Also:
JdbcHelper

Field Summary
static java.util.Properties jdbcProperties
          Deprecated. The properties to give to the driver manager when getting a conection via a JDBC driver.
 
Constructor Summary
DataSourceHelper()
          Deprecated.  
 
Method Summary
static java.sql.Driver getDriver(java.lang.String driverCl)
          Deprecated. Get a JDBC driver for the specified driver class name.
static java.sql.Driver getDriver(java.lang.String url, java.lang.String driverCl)
          Deprecated. Gets the driver for the specified url and driver class.
static java.lang.String getDriverClass(java.lang.String url)
          Deprecated. Try to determine the driver class for the specified url.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jdbcProperties

public static final java.util.Properties jdbcProperties
Deprecated. 
The properties to give to the driver manager when getting a conection via a JDBC driver.
Constructor Detail

DataSourceHelper

public DataSourceHelper()
Deprecated. 
Method Detail

getDriver

public static java.sql.Driver getDriver(java.lang.String url,
                                        java.lang.String driverCl)
                                 throws java.sql.SQLException
Deprecated. 
Gets the driver for the specified url and driver class.

This does not use DriverManager at all.

Parameters:
url - the jdbc url.
driverCl - the preferred driver class name (will use getDriverClass if null).
Returns:
an instance of the driver or null on no driver for url.
Throws:
java.sql.SQLException - thrown on an error loading the driver.

getDriverClass

public static java.lang.String getDriverClass(java.lang.String url)
Deprecated. 
Try to determine the driver class for the specified url.

This does a best guess based upon some common JDBC drivers and their URL formats. It is generally better to specify the JDBC driver class name instead.

Parameters:
url - the JDBC url.
Returns:
the driver to try or null on unknown url.

getDriver

public static java.sql.Driver getDriver(java.lang.String driverCl)
                                 throws java.sql.SQLException
Deprecated. 
Get a JDBC driver for the specified driver class name.

This is simply wrapper around Class.forName() that throws SQLExceptions on error.

Parameters:
driverCl - the driver class name.
Returns:
a driver instance.
Throws:
java.sql.SQLException - thrown on an error loading a driver.

© 2002 BEA Systems, Inc.

Copyright © 2002 BEA Systems, Inc. All Rights Reserved