Connection Types

JDBC Connection Def

The JDBC Connection Def creates a connection from the standard DriverManager. It takes the following properties:

Property NameDescription
driverJava classname of the JDBC Driver
urlURL used to connect to the database
usernameUsername used to authenticate with the database
passwordPassword used to authenticate with the database

Example:

<?xml version="1.0"?>
<import log="import.log" bad="import.bad">
	<connection type="jdbc">
		<property name="driver" value="oracle.jdbc.driver.OracleDriver"/>
		<property name="url" value="jdbc:oracle:thin:@localhost:1521:orcl"/>
		<property name="username" value="scott"/>
		<property name="password" value="tiger"/>
	</connection>
...
</import>

JNDI Connection Def

The JNDI Connection Def creates a connection from a DataSource or ConnectionPoolDataSource in JNDI directory. It takes the following properties:

Property NameDescription
namename of the DataSource in the JNDI directory
providerURLURL of the service provider to use(optional)
objectFactoriesComma-separated list of object factories (optional)

Example:

<?xml version="1.0"?>
<import log="import.log" bad="import.bad">
	<connection type="jndi">
		<property name="name" value="java:/comp/env/jdbc/db"/>
	</connection>
...
</import>

Xalan Connection Def

The Xalan Connection Def creates a connection from a Xalan connection pool that can be used in XSL. The Xalan JDBC Connection Def will create the Xalan connection pool if it is not available. It takes the following properties:

Property NameDescription
driverJava classname of the JDBC Driver
urlURL used to connect to the database
usernameUsername used to authenticate with the database
passwordPassword used to authenticate with the database
nameName of the connection pool in Xalan
minMinimum number of connections in the pool (optional, default = 2)
cleanupPoolA flag to indicate whether the Xalan Connection Def will cleanup the pool it created after the import completes (optional, default = true )

Example:

<?xml version="1.0"?>
<import log="import.log" bad="import.bad">
	<connection type="xconn">
		<property name="driver" value="oracle.jdbc.driver.OracleDriver"/>
		<property name="url" value="jdbc:oracle:thin:@localhost:1521:orcl"/>
		<property name="username" value="scott"/>
		<property name="password" value="tiger"/>
		<property name="name"     value="xalan-conn"/>
	</connection>
...
</import>