user manual
Chapter 22: Using JDBC 241
Advanced Topics for Defining JDBC Datasources
<prop-name>connectionType</prop-name>
<prop-type>Enumerated</prop-type>
<prop-value>Direct</prop-value>
</property>
...
//other properties as needed
...
</visitransact-datasource>
...
</jndi-definitions>
We're not done. Now we must perform the other half of the datasource
definition by providing information on the driver. We do this in the <driver-
datasource> element, which includes the following information:
■
jndi-name: This is the JNDI name of the driver class, and its value must be
identical to the <driver-datasource-jndiname> value from the <visitransact-
datasource> element.
■
datasource-class-name: Here is where you provide the name of the
connection factory class supplied from the resource vendor. It must be the
same class you deployed to the Partition as a library.
■
log-writer: This is a boolean element that activates verbose modes for
some vendor connection factory classes. Consult your resource's
documentation for the use of this property.
■
properties: These are properties specific to the JDBC resource, such as
usernames, passwords, and so forth. These properties are passed to the
driver class for processing. Consult your JDBC resource documentation for
property information. Specifying the properties in XML is shown below.
Armed with this information, let's complete our datasource definition for the
Oracle datasource we started above. In order to be thorough, let's first
reproduce the XML we started above:
<jndi-definitions>
<visitransact-datasource>
<jndi-name>serial://datasources/Oracle</jndi-name>
<driver-datasource-jndiname>serial://datasources/OracleDriver</driver-
datasource-jndiname>
<log-writer>False</log-writer>
<property>
<prop-name>connectionType</prop-name>
<prop-type>Enumerated</prop-type>
<prop-value>Direct</prop-value>
</property>
</visitranact-datasource>










