jrun.sql
Class JRunDriver

java.lang.Object
  |
  +--jrun.sql.JRunDriver
All Implemented Interfaces:
java.sql.Driver

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

The core Driver implementation, pulled from PoolMan. It can be loaded via the DriverManager, and is also accessed through the JRunManDataSource.

Author:
PS Neville

Field Summary
static java.lang.String PROTOCOL
           
static boolean STARTED
           
 
Constructor Summary
JRunDriver()
           
 
Method Summary
 boolean acceptsURL(java.lang.String url)
           
static java.sql.Connection connect(java.lang.String url)
           
 java.sql.Connection connect(java.lang.String url, java.util.Properties info)
           
static javax.sql.DataSource findDataSource(java.lang.String dbname)
          Convenience method to return a named DataSource
static javax.sql.DataSource getDataSource()
          Without requiring its name, get the default DataSource, which is the first one configured in jrun-resources.xml.
static javax.sql.DataSource getDataSource(java.lang.String dbname)
          Convenience method, merely calls findDataSource(dbname)
 int getMajorVersion()
          TO DO: Update this to use JRun Server Service values
 int getMinorVersion()
          TO DO: Update this to use JRun Server Service values
 java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url, java.util.Properties info)
           
 boolean jdbcCompliant()
           
static boolean nameIsValid(java.lang.String dbname)
          Determine whether the dbname is valid for this Driver instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROTOCOL

public static final java.lang.String PROTOCOL

STARTED

public static boolean STARTED
Constructor Detail

JRunDriver

public JRunDriver()
Method Detail

getDataSource

public static javax.sql.DataSource getDataSource()
                                          throws java.sql.SQLException
Without requiring its name, get the default DataSource, which is the first one configured in jrun-resources.xml.

getDataSource

public static javax.sql.DataSource getDataSource(java.lang.String dbname)
                                          throws java.sql.SQLException
Convenience method, merely calls findDataSource(dbname)

findDataSource

public static javax.sql.DataSource findDataSource(java.lang.String dbname)
                                           throws java.sql.SQLException
Convenience method to return a named DataSource

nameIsValid

public static boolean nameIsValid(java.lang.String dbname)
Determine whether the dbname is valid for this Driver instance.

acceptsURL

public boolean acceptsURL(java.lang.String url)
                   throws java.sql.SQLException
Specified by:
acceptsURL in interface java.sql.Driver

connect

public java.sql.Connection connect(java.lang.String url,
                                   java.util.Properties info)
                            throws java.sql.SQLException
Specified by:
connect in interface java.sql.Driver

connect

public static java.sql.Connection connect(java.lang.String url)
                                   throws java.sql.SQLException

getMajorVersion

public int getMajorVersion()
TO DO: Update this to use JRun Server Service values
Specified by:
getMajorVersion in interface java.sql.Driver

getMinorVersion

public int getMinorVersion()
TO DO: Update this to use JRun Server Service values
Specified by:
getMinorVersion in interface java.sql.Driver

getPropertyInfo

public java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url,
                                                     java.util.Properties info)
                                              throws java.sql.SQLException
Specified by:
getPropertyInfo in interface java.sql.Driver

jdbcCompliant

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


Copyright � 2002 Macromedia Corporation. All Rights Reserved.