|
Here's an example from one of my applications. Note this is an older\WebContent"
Tomcat; in the newer versions the ResourceParams/parameters go in the
Resource tag. Important to note that the user and password must go in
the url string. The JNDI has a place for them in parameters, but
AS400JDBCDriver pays no attention to those.
<Context docBase="C:\Documents and
Settings\Dan\IBM\rationalsdp6.0\RJSWorkflowExperiment\WorkflowWebServices
path="/WorkflowWebServices" reloadable="true"className="org.apache.catalina.logger.FileLogger"
source="com.ibm.wtp.web.server:WorkflowWebServices">
<Logger
prefix="WorkflowWebServices_log." suffix=".txt" timestamp="true"suffix=".txt"/>
verbosity="4"/>
<Valve
className="org.apache.catalina.valves.AccessLogValve"
fileDateFormat="yyyy-MM-dd" prefix="localhost_access_log."
<Resource auth="Application" description=""carefully.
name="jdbc/rjsworkflow" scope="Unshareable" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/rjsworkflow">
<parameter>
<name>driverClassName</name>
<value>com.ibm.as400.access.AS400JDBCDriver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:as400://
10.8.1.53/rjsflow;prompt=no;driver=native;naming=sql;user=DKIMMEL;pass
word=******;servertrace=0;extended
dynamic=true;package=RJSFLOW;package
library=RJSFLOW;package add=false;package
criteria=select;prefetch=true;block size=512;</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>30</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>5</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>10000</value>
</parameter>
<parameter>
<name>removeAbandoned</name>
<value>false</value>
</parameter>
<parameter>
<name>logAbandoned</name>
<value>false</value>
</parameter>
<parameter>
<name>removeAbandonedTimeout</name>
<value>60</value>
</parameter>
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
</ResourceParams>
</Context>
-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:
java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Thorbjoern Ravn Andersen
Sent: Thursday, January 14, 2010 3:37 PM
To: Java Programming on and around the iSeries / AS400
Subject: Re: setup JNDI in tomcat to access AS400,
Ashish Kulkarni skrev:
Hieclipse.
Is there a tutorial or how to configure JNDI in tomcat on windows
to access AS400 DB2, i would like to configure JNDI in tomcat
running in my
A qualified guess: You need jt400.jar added to the Tomcat libraries,
and then set up a database connection pool in JNDI with a JDBC string
starting with jdbc://as400. Note that many properties exist that
modify the way the JDBC driver behaves. Read the Toolbox documentation
--
Thorbjørn Ravn Andersen "...plus... Tubular Bells!"
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.