com.basecmp.core.jdbc
Class NamedConnectionPool

java.lang.Object
  extended bycom.basecmp.core.jdbc.NamedConnectionPool
All Implemented Interfaces:
IConnectionFactory

public class NamedConnectionPool
extends java.lang.Object
implements IConnectionFactory

JDBC-Connection-Factory für JDBC-Connections aus einen benannten JDBC-Connection-Pool.

Author:
Wolfgang Schröder

Field Summary
static boolean enableProfiling
           
 
Constructor Summary
NamedConnectionPool()
           
 
Method Summary
protected  void finalize()
           
 void freeConnection(java.sql.Connection connection)
          Befreit und schliesst ggf die übergebene, anonyme JDBC-Connection (implmentierungsabhängig).
 void freeConnection(java.lang.String poolName, java.sql.Connection connection)
          Befreit und schliesst ggf die übergebene, benannte JDBC-Connection (implmentierungsabhängig).
 java.sql.Connection getConnection()
          Liefert eine JDBC-Connection aus dem Default-Connection-Pool.
 java.sql.Connection getConnection(java.lang.String poolName)
          Liefert aus dem benannten Pool eine JDBC-Connection.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

enableProfiling

public static boolean enableProfiling
Constructor Detail

NamedConnectionPool

public NamedConnectionPool()
Method Detail

finalize

protected void finalize()
                 throws java.lang.Throwable
Throws:
java.lang.Throwable

freeConnection

public void freeConnection(java.sql.Connection connection)
                    throws java.sql.SQLException
Description copied from interface: IConnectionFactory
Befreit und schliesst ggf die übergebene, anonyme JDBC-Connection (implmentierungsabhängig).

Specified by:
freeConnection in interface IConnectionFactory
Throws:
java.sql.SQLException

freeConnection

public void freeConnection(java.lang.String poolName,
                           java.sql.Connection connection)
                    throws java.sql.SQLException
Description copied from interface: IConnectionFactory
Befreit und schliesst ggf die übergebene, benannte JDBC-Connection (implmentierungsabhängig).

Specified by:
freeConnection in interface IConnectionFactory
Throws:
java.sql.SQLException

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Liefert eine JDBC-Connection aus dem Default-Connection-Pool. Der Default-Connection-Pool sollte Connections mit Lese und Schreibberechtigung liefern.

Specified by:
getConnection in interface IConnectionFactory
Throws:
java.sql.SQLException

getConnection

public java.sql.Connection getConnection(java.lang.String poolName)
                                  throws java.sql.SQLException
Liefert aus dem benannten Pool eine JDBC-Connection.

Specified by:
getConnection in interface IConnectionFactory
Throws:
java.sql.SQLException


Copyright © 2004 by basecmp® - Professional Web Solutions