com.basecmp.core.jdbc
Class NamedConnection

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

public class NamedConnection
extends java.lang.Object
implements IConnectionFactory

JDBC-Connection-Factory für benannte JDBC-Connections.

Author:
Wolfgang Schröder

Constructor Summary
NamedConnection()
           
 
Method Summary
 void freeConnection(java.sql.Connection connection)
          Scliesst die übergebene JDBC-Connection.
 void freeConnection(java.lang.String connectionName, java.sql.Connection connection)
          Scliesst die übergebene JDBC-Connection.
 java.sql.Connection getConnection()
          Liefert die Default-JDBC-Connection.
 java.sql.Connection getConnection(java.lang.String connectionName)
          Liefert die benannte JDBC-Connection "connectionName".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamedConnection

public NamedConnection()
Method Detail

freeConnection

public void freeConnection(java.sql.Connection connection)
                    throws java.sql.SQLException
Scliesst die übergebene JDBC-Connection.

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

freeConnection

public void freeConnection(java.lang.String connectionName,
                           java.sql.Connection connection)
                    throws java.sql.SQLException
Scliesst die übergebene JDBC-Connection.

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

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Liefert die Default-JDBC-Connection. Die Default-Connection wird alls benannte Connection im Properties-File basecmp_jdbc.properties, im Klassenpfad unter com.basecmp, konfiguriert und mit dem Key jdbc.namedconnection.defaultname = Name der Default-Connection als Default deklariert.

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

getConnection

public java.sql.Connection getConnection(java.lang.String connectionName)
                                  throws java.sql.SQLException
Liefert die benannte JDBC-Connection "connectionName". Alle benannten Connections werden im Properties-File basecmp_jdbc.properties, im Klassenpfad unter com.basecmp, konfiguriert.

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


Copyright © 2004 by basecmp® - Professional Web Solutions