net.sourceforge.jdbcimporter.connection
Class JNDIConnectionDef

java.lang.Object
  extended bynet.sourceforge.jdbcimporter.connection.JNDIConnectionDef
All Implemented Interfaces:
ConnectionDef

public class JNDIConnectionDef
extends java.lang.Object
implements ConnectionDef

The JNDIConnectionDef defines attributes to use to retrieve a connection from a data source in a JNDI namespace.

Version:
0.63
Author:
Chris Nagy

Field Summary
protected static org.apache.commons.logging.Log LOG
          The log for debug information.
 
Constructor Summary
JNDIConnectionDef()
          Create a JNDI connection definition.
 
Method Summary
 java.sql.Connection getConnection()
          Returns the connection.
 void releaseConnection(java.sql.Connection con)
          Releases the connection specified.
 void setName(java.lang.String name)
          Sets the name of the data source.
 void setObjectFactories(java.lang.String factories)
          Sets the list of classnames that should be used as object factories.
 void setProviderURL(java.lang.String url)
          Sets the url of the JNDI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static org.apache.commons.logging.Log LOG
The log for debug information.

Constructor Detail

JNDIConnectionDef

public JNDIConnectionDef()
Create a JNDI connection definition.

Method Detail

setName

public void setName(java.lang.String name)
Sets the name of the data source.

Parameters:
name - name of the data source

setProviderURL

public void setProviderURL(java.lang.String url)
Sets the url of the JNDI.

Parameters:
url - the provider url

setObjectFactories

public void setObjectFactories(java.lang.String factories)
Sets the list of classnames that should be used as object factories.

Parameters:
factories - the list of object factories

getConnection

public java.sql.Connection getConnection()
Description copied from interface: ConnectionDef
Returns the connection.

Specified by:
getConnection in interface ConnectionDef
Returns:
the connection.
See Also:
ConnectionDef.getConnection()

releaseConnection

public void releaseConnection(java.sql.Connection con)
Description copied from interface: ConnectionDef
Releases the connection specified. This method is called when the import is complete and the connection is no longer needed.

Specified by:
releaseConnection in interface ConnectionDef
Parameters:
con - the connection.
See Also:
ConnectionDef.releaseConnection(java.sql.Connection)