BEA Systems, Inc.

WebLogic Server 8.1 API Reference

weblogic.jdbc.pool
Class Driver

java.lang.Object
  |
  +--weblogic.jdbc.pool.Driver

public final class Driver
extends java.lang.Object
implements java.sql.Driver

Provides serverside access to connection pools.

Author:
Copyright © 2004 BEA Systems, Inc. All Rights Reserved.

Constructor Summary
Driver()
           
 
Method Summary
 boolean acceptsURL(java.lang.String url)
          Determines whether the URL is acceptable for use with a Driver.
protected  java.sql.Connection allocateConnection(weblogic.jdbc.common.internal.ConnectionEnv cc)
           
 java.sql.Connection connect(java.lang.String url, java.util.Properties dbprops)
          Makes a JDBC connection with the specified driver and properties.
 int getMajorVersion()
          Returns the current version.
 int getMinorVersion()
          Returns the current minor version.
 java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url, java.util.Properties info)
          Returns info about a Driver as an array of DriverPropertyInfo.
 boolean jdbcCompliant()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Driver

public Driver()
Method Detail

connect

public java.sql.Connection connect(java.lang.String url,
                                   java.util.Properties dbprops)
                            throws java.sql.SQLException
Makes a JDBC connection with the specified driver and properties. The URL of the driver is "jdbc:weblogic:pool" to which you may also add the connection pool ID, as registered in your config.xml file. The connection pool ID may also be set in the Properties object -- in fact, that is the only property that is necessary to set here. If you do not use the Properties object for setting the connection pool ID, set the argument to null.
Specified by:
connect in interface java.sql.Driver

Parameters:
url - URL of the driver, as in "jdbc:weblogic:pool"
dbprops - java.util.Properties for connecting
Returns:
JDBC Connection from a connection pool

getPropertyInfo

public java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url,
                                                     java.util.Properties info)
                                              throws java.sql.SQLException
Returns info about a Driver as an array of DriverPropertyInfo.
Specified by:
getPropertyInfo in interface java.sql.Driver

Parameters:
url - URL of the Driver
info - Properties object
Returns:
Array of DriverPropertyInfo

getMajorVersion

public int getMajorVersion()
Returns the current version.
Specified by:
getMajorVersion in interface java.sql.Driver

Returns:
Version number

getMinorVersion

public int getMinorVersion()
Returns the current minor version.
Specified by:
getMinorVersion in interface java.sql.Driver

Returns:
Minor version number

jdbcCompliant

public boolean jdbcCompliant()
Specified by:
jdbcCompliant in interface java.sql.Driver


allocateConnection

protected java.sql.Connection allocateConnection(weblogic.jdbc.common.internal.ConnectionEnv cc)
                                          throws java.sql.SQLException


acceptsURL

public boolean acceptsURL(java.lang.String url)
Determines whether the URL is acceptable for use with a Driver. The format for the URL of this Driver is jdbc:weblogic:pool[:connectionPoolID]
Specified by:
acceptsURL in interface java.sql.Driver

Parameters:
url - URL of the Driver
Returns:
true if acceptable

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs81