com.caucho.sql
Class DatabaseManager

java.lang.Object
  extended by com.caucho.sql.DatabaseManager

public class DatabaseManager
extends java.lang.Object

Manages databases in a local environment, e.g. for PHP dynamic database lookup.


Field Summary
protected static java.util.logging.Logger log
           
 
Method Summary
static void closeDatabase(javax.sql.DataSource ds)
           
static javax.sql.DataSource findDatabase(java.lang.String url)
          Returns a matching dbpool.
static javax.sql.DataSource findDatabase(java.lang.String url, java.lang.String driver)
          Returns a matching dbpool.
static java.lang.String findDriverByUrl(java.lang.String url)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final java.util.logging.Logger log
Method Detail

findDatabase

public static javax.sql.DataSource findDatabase(java.lang.String url)
                                         throws java.sql.SQLException
Returns a matching dbpool.

Throws:
java.sql.SQLException

findDatabase

public static javax.sql.DataSource findDatabase(java.lang.String url,
                                                java.lang.String driver)
                                         throws java.sql.SQLException
Returns a matching dbpool.

Throws:
java.sql.SQLException

closeDatabase

public static void closeDatabase(javax.sql.DataSource ds)

findDriverByUrl

public static java.lang.String findDriverByUrl(java.lang.String url)