org.castor.cpa.persistence.sql.connection
Class JNDIConnectionFactory
java.lang.Object
org.castor.cpa.persistence.sql.connection.JNDIConnectionFactory
- All Implemented Interfaces:
- ConnectionFactory
public final class JNDIConnectionFactory
- extends Object
- implements ConnectionFactory
- Since:
- 0.9.9
- Version:
- $Revision: 8111 $ $Date: 2006-04-12 15:13:08 -0600 (Wed, 12 Apr 2006) $
- Author:
- Werner Guttmann, Ralf Joachim
|
Constructor Summary |
JNDIConnectionFactory(Jndi jndi,
boolean useProxies)
Constructs a new JNDIConnectionFactory with given database and mapping. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JNDIConnectionFactory
public JNDIConnectionFactory(Jndi jndi,
boolean useProxies)
- Constructs a new JNDIConnectionFactory with given database and mapping.
- Parameters:
jndi - JNDI configuration.useProxies - Wrap JDBC connections by proxies?
initializeFactory
public void initializeFactory()
throws MappingException
- Initialize the concrete factory.
- Specified by:
initializeFactory in interface ConnectionFactory
- Throws:
MappingException - If concrete factory could not be initialized.
createConnection
public Connection createConnection()
throws SQLException
- Creates a new JDBC Connection instance.
- Specified by:
createConnection in interface ConnectionFactory
- Returns:
- A JDBC Connection.
- Throws:
SQLException - If the JDBC connection cannot be created.
Copyright © 2010. All Rights Reserved.