org.jpox.driver
Class JPOXDriver

java.lang.Object
  extended byorg.jpox.driver.JPOXDriver
All Implemented Interfaces:
java.sql.Driver

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

Driver Adapter to be used by jpox when dealing with datasource connections in a non-managed context. Accepts DataSource URLs starting with "jpox".

Version:
$Revision: 1.3 $

Constructor Summary
JPOXDriver()
           
 
Method Summary
 boolean acceptsURL(java.lang.String url)
           
 java.sql.Connection connect(java.lang.String url, java.util.Properties info)
          This method create a connection
 int getMajorVersion()
           
 int getMinorVersion()
           
 java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url, java.util.Properties info)
           
 boolean jdbcCompliant()
           
 void setContext(javax.naming.Context ctx)
          This method permits you to set the context from within you will obtain the data source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPOXDriver

public JPOXDriver()
Method Detail

acceptsURL

public boolean acceptsURL(java.lang.String url)
Specified by:
acceptsURL in interface java.sql.Driver
Parameters:
url -
Returns:
boolean
See Also:
Driver.acceptsURL(String)

connect

public java.sql.Connection connect(java.lang.String url,
                                   java.util.Properties info)
                            throws java.sql.SQLException
This method create a connection

Specified by:
connect in interface java.sql.Driver
Parameters:
url - The URL to connect to
info - The properties for the connection
Returns:
The Connection
Throws:
java.sql.SQLException
See Also:
Driver.connect(String, Properties)

getMajorVersion

public int getMajorVersion()
Specified by:
getMajorVersion in interface java.sql.Driver
Returns:
The Major version
See Also:
Driver.getMajorVersion()

getMinorVersion

public int getMinorVersion()
Specified by:
getMinorVersion in interface java.sql.Driver
Returns:
The Minor version
See Also:
Driver.getMinorVersion()

getPropertyInfo

public java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url,
                                                     java.util.Properties info)
Specified by:
getPropertyInfo in interface java.sql.Driver
Parameters:
url - The URL
info - The properties
Returns:
DriverPropertyInfo[]
See Also:
Driver.getPropertyInfo(String, Properties)

jdbcCompliant

public boolean jdbcCompliant()
Specified by:
jdbcCompliant in interface java.sql.Driver
Returns:
boolean Whether it is JDBC compliant
See Also:
Driver.jdbcCompliant()

setContext

public void setContext(javax.naming.Context ctx)
This method permits you to set the context from within you will obtain the data source. Normally, this method will be used when you are running in a non managed context (outside the server) If you don't set the context, the InitialContext() will be used to do the lookup for the data source

Parameters:
ctx - The Context


Copyright © -2007 . All Rights Reserved.