jetweb is hosted by Hepforge, IPPP Durham

cedar.jetweb.db
Class DBConnectionManager

java.lang.Object
  extended by cedar.jetweb.db.DBConnectionManager

public class DBConnectionManager
extends java.lang.Object

Manager for database connection

Author:
J. Monk from J. Butterworth

Constructor Summary
DBConnectionManager()
           
 
Method Summary
 java.sql.Connection getConnection()
          Gets a connection to the default jetweb DB
 java.sql.Connection getConnection(java.lang.String arg)
          Does exactly what it says on the tin!
 DBConnectionManager init()
          default initialisation to the jetweb DB.
 DBConnectionManager init(java.lang.String arg)
          initialise just the single named DB
 DBConnectionManager init(java.lang.String[] args)
          Initialises the known databases.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBConnectionManager

public DBConnectionManager()
Method Detail

init

public DBConnectionManager init(java.lang.String[] args)
Initialises the known databases. Database names are based on those given in the jetweb.properties file, e.g. jetweb=jdbc:mysql://127.0.0.1/jetweb can add more databases later by re-calling

Parameters:
String[] - the array of database names we will initialise


init

public DBConnectionManager init(java.lang.String arg)
initialise just the single named DB


init

public DBConnectionManager init()
default initialisation to the jetweb DB.


getConnection

public java.sql.Connection getConnection(java.lang.String arg)
Does exactly what it says on the tin!

Parameters:
arg - the name of the database to get the connection from


getConnection

public java.sql.Connection getConnection()
Gets a connection to the default jetweb DB