Hi Andrew,

I've just checked the DB2-JDBC-Drivers:

You'll need two files:

1. db2jcc_license_cu.jar
2. db2jcc.jar

Both files should be somewhere on your copy of DB2 or you should be
able to download them via the IBM-website.
If you're running Db2 on OS390/zOS, you'll need a certain APAR first -
the DB2-docs should give you some information here.

Copy those files to $CATALINA_HOME/common/lib

Then, create your data-pool in your context.xml-file of the application:

<?xml version='1.0' encoding='utf-8'?>
<Context>
  <Resource
    auth="Container"
    description="DB Connection for..."
    name="jdbc/IndexYOUR_DS_NAME"
    type="javax.sql.DataSource"
    factory="org.apache.commons.dbcp.BasicDataSourceFactory"
    driverClassName="com.ibm.db2.jcc.DB2Driver"
    username="YOUR_USER
    password="YOUR_PASSWORD"
    url="jdbc:db2://<host>:<port>/<database>"
    maxIdle="30"
    maxWait="10000"
    maxActive="10"
    validationQuery="SELECT 1"
    testOnBorrow="true"
    testWhileIdle="true"
    timeBetweenEvictionRunsMillis="10000"
    minEvictableIdleTimeMillis="28800"
    poolPreparedStatements="true"
    removeAbandoned="true"
    removeAbandonedTimeout="300"
    logAbandoned="false"/>
</Context>

Don't know if "validationQuery="SELECT 1" works for DB2 - if not,
replace it with a working one.

Cheers

Gregor








On Nov 16, 2007 9:22 AM, Gregor Schneider <[EMAIL PROTECTED]> wrote:
> It's quite some time since my last experience with DB2, however, maybe
> this gives you a start:
>
> There are multiple jdbc-drivers available for DB2.
>
> Obviously, youÄre using a class3-JDBC-driver, meaning that this is not
> a plain java-driver but needs some middleware to connect to DB2
> (DB2-Connect).
>
> However, DB2 also is offering a class4-JDBC-driver that does not make
> use of any such middleware.
>
> We're also using this driver in some client's environments.
>
> When I'm in the office later on, I'll lookup the name and the jdbc-url
> and let you guys know.
>
> Cheers
>
> Gregor
> --
> what's puzzlin' you, is the nature of my game
> gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
> gpgp-key available @ http://pgpkeys.pca.dfn.de:11371
>



-- 
what's puzzlin' you, is the nature of my game
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to