NOTE - JAR files like jt400.jar should go in the shared/lib folder and not
the common/lib folder if using Tomcat 5.5 or prior versions. See here for
more info:
http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html

Here is a migration guide if using Tomcat6:
http://tomcat.apache.org/migration.html

Thanks,
Todd Allen
EDPS
Electronic Data Processing Services
tallen@xxxxxxxxxxxx




"Dan Kimmel"
<dkimmel@rjssoftw
are.com> To
Sent by: "Java Programming on and around the
java400-l-bounces iSeries / AS400"
@midrange.com <java400-l@xxxxxxxxxxxx>
cc

2010-01-18 10:28 Subject
RE: setup JNDI in tomcat to access
AS400,
Please respond to
Java Programming
on and around the
iSeries / AS400
<java400-l@midran
ge.com>






Put it in the /common/lib of your tomcat instance.

-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx
] On Behalf Of Ashish Kulkarni
Sent: Sunday, January 17, 2010 2:44 PM
To: Java Programming on and around the iSeries / AS400
Subject: Re: setup JNDI in tomcat to access AS400,

Hi
This works with tomcat, where do i put the jt400.jar file if i am running
tomcat as eclipse plugin



On Thu, Jan 14, 2010 at 5:53 PM, Dan Kimmel <dkimmel@xxxxxxxxxxxxxxx>
wrote:

Here's an example from one of my applications. Note this is an older
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
\WebContent"
path="/WorkflowWebServices" reloadable="true"
source="com.ibm.wtp.web.server:WorkflowWebServices">
<Logger
className="org.apache.catalina.logger.FileLogger"
prefix="WorkflowWebServices_log." suffix=".txt" timestamp="true"
verbosity="4"/>
<Valve
className="org.apache.catalina.valves.AccessLogValve"
fileDateFormat="yyyy-MM-dd" prefix="localhost_access_log."
suffix=".txt"/>
<Resource auth="Application" description=""
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:
Hi
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
eclipse.



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
carefully.

--
Thorbjørn Ravn Andersen "...plus... Tubular Bells!"






This communication and any transmitted documents are intended to be confidential. If there is a problem with this transmission, please contact the sender. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 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.