info.aduna.gee.publication.servlets.jdbc
Class ConnectionManager

java.lang.Object
  extended by info.aduna.gee.publication.servlets.jdbc.ConnectionManager

public class ConnectionManager
extends Object

Class ConnectionManager takes care of shared connections to a JDBC enabled database


Field Summary
protected static Hashtable _pools
           
static String INPROCESS_DRIVER
           
static String INPROCESS_PARAMS
           
static String INPROCESS_PORT
           
static String INPROCESS_PROTOCOL
           
protected static boolean useInProcessDatabase
           
 
Constructor Summary
ConnectionManager()
           
 
Method Summary
static Connection getConnection(String host)
           
static String getURL(String server, String catalog)
           
static void init()
           
static boolean isValidHost(String host)
           
static void returnConnection(Connection connection, String host)
          Return a database connection to host to the pool of available connections.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INPROCESS_PROTOCOL

public static String INPROCESS_PROTOCOL

INPROCESS_PORT

public static String INPROCESS_PORT

INPROCESS_PARAMS

public static String INPROCESS_PARAMS

INPROCESS_DRIVER

public static String INPROCESS_DRIVER

_pools

protected static Hashtable _pools

useInProcessDatabase

protected static boolean useInProcessDatabase
Constructor Detail

ConnectionManager

public ConnectionManager()
Method Detail

init

public static void init()

getURL

public static String getURL(String server,
                            String catalog)

getConnection

public static Connection getConnection(String host)
Returns:
a database connection to the database for host or null when no database

returnConnection

public static void returnConnection(Connection connection,
                                    String host)
Return a database connection to host to the pool of available connections.


isValidHost

public static boolean isValidHost(String host)
Returns:
true if host has a valid database, false otherwise


Copyright © 1997-2008 Aduna. All Rights Reserved.