org.logicalcobwebs.proxool
Class VirtoolDriver
java.lang.Object
org.logicalcobwebs.proxool.VirtoolDriver
- All Implemented Interfaces:
- java.sql.Driver
public class VirtoolDriver
- extends java.lang.Object
- implements java.sql.Driver
This class acts as a virtual pool. When you ask it for a connection it
delegates to one of the designated real pools. Some assumptions:
Getting a connection needs to be very fast.
Switching pools can be relatively slow (but just to get that in perspective,
> 100ms)
We should detect pools that don't respond (timeout), throw certain
SQLExceptions, or are unacceptably slow.
We should also allow simple load balancing between pools that are
up.
- Since:
- Proxool 0.5
- Version:
- $Revision: 1.2 $, $Date: 2003/03/03 11:12:02 $
- Author:
- Bill Horsman (bill@logicalcobwebs.co.uk), $Author: billhorsman $ (current maintainer)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VIRTOOL
private static final java.lang.String VIRTOOL
- See Also:
- Constant Field Values
activePools
private java.lang.String[] activePools
nextPool
private int nextPool
VirtoolDriver
public VirtoolDriver()
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
- Throws:
java.sql.SQLException
acceptsURL
public boolean acceptsURL(java.lang.String url)
throws java.sql.SQLException
- Specified by:
acceptsURL
in interface java.sql.Driver
- Throws:
java.sql.SQLException
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
- Throws:
java.sql.SQLException
getMajorVersion
public int getMajorVersion()
- Specified by:
getMajorVersion
in interface java.sql.Driver
getMinorVersion
public int getMinorVersion()
- Specified by:
getMinorVersion
in interface java.sql.Driver
jdbcCompliant
public boolean jdbcCompliant()
- Specified by:
jdbcCompliant
in interface java.sql.Driver