Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Where is DB2ConnectionPoolDataSource class ?

2 views
Skip to first unread message

Roger Fortier

unread,
May 27, 2002, 10:48:55 AM5/27/02
to
I am trying to setup the connection pool for DB2 running on As400 using
Websphere 4.0 AES.

In the JDBC Providers setup screen, the default Java implementing class is
COM.ibm.db2.jdbc.DB2ConnectionPoolDataSource which I believe should be in
DB2java.ZIP.

Yet when I look in DB2java.zip I cannot find this class!

Can someone tell me whether there are different versions of DB2java.zip
available from IBM?
The version of DB2java.zip I got is from an installation of IBM DB2 Connect
Version 7.2 in SQLLIB\JAVA directory.


ma...@softlanding.com

unread,
May 28, 2002, 9:41:01 AM5/28/02
to
The correct class to use is:
com.ibm.db2.jdbc.app.DB2StdConnectionPoolDataSource

It is located in /QIBM/ProdData/Java400/ext/db2_classes.jar

Hope ths helps.

Mark

Roger Fortier

unread,
May 28, 2002, 3:56:53 PM5/28/02
to
Actually, I am running WebSphere on NT but accessing a DB2 on AS400.

I did find some information about a different version of DB2JAVA.ZIP as per
these instructions:

http://www.sygel.com/doc/Installation/InstallStep4.html

IBM DB2

After the installation of IBM DB2 the db2 driver can be found in
$(DB2_HOME)/java/db2java.zip.
When using DB2 with WebSphere the Appication Server uses a class called
COM.ibm.db2.jdbc.DB2ConnectionPoolDataSource, but this class can't be found
in db2java.zip.
Therefore the following procedure should be followed to make db2java.zip
complete :
. go to the $(DB2_HOME)\java12 directory
. make sure jdbc20.exe & usejdbc2.bat are in there
. (if they are) stop all db2 services to unlock files that will be
updated
. execute jdbc20.exe (this unpacks jdbc2 support files)
. then execute usejdbc2.bat to copy the files to the appropriate
places
. check that the file 'inuse' contains jdbc2.0
. if so, the db2java.zip file should now conatain the 'Db2Pooled*'
classes

I followed these steps and tested my connection to make sure it was still
working and it was OK.
Now that I found COM.ibm.db2.jdbc.DB2ConnectionPoolDataSource in this
db2java.zip I get a different error when trying to obtain a connection from
the connection pool. In the log file I get this message:

[02.05.28 15:24:21:806 EDT] 5f576bb4 PortabilityLa W CONM7002W: Could not
find the property URL on class COM.ibm.db2.jdbc.DB2ConnectionPoolDataSource

<ma...@softlanding.com> wrote in message
news:ad00sr$1304$1...@news.boulder.ibm.com...

Christo Angelov

unread,
May 28, 2002, 5:15:16 PM5/28/02
to
We are connecting to AS/400 using jt400.jar. I believe this is the correct
way to connect. If your AS400 is V5R1 and you have the right PTFs, the
latest jt400.jar is somewhere in the HTTP server folder, from where you need
to copy it to the Windows box.
If you don't care about the 400 PTFs, then get the open source jtOpen 3.0.
Both have the class you are looking for.
<christo/>

"Roger Fortier" <roger_...@sympatico.ca> wrote in message
news:acthd8$n74$1...@news.boulder.ibm.com...

ma...@softlanding.com

unread,
May 29, 2002, 8:35:29 AM5/29/02
to
Roger,

Sorry, I assumed you were running WAS on the AS/400, since that is what
this forum is about.

You need the AS/400 Java Toolbox or the open source JTOpen version of it.
In either case, you will have a jt400.jar somewhere on the WAS server. The
connection pool class to use is:

com.ibm.as400.access.AS400JDBCConnectionPoolDataSource

You also need to add some custom properties on the data source.
Specifically:

serverName=YOURAS400NAME
prompt=false

I also add the following:

dateFormat=iso
translateBinary=true

Hope this helps.

Mark Phippard


Roger Fortier

unread,
May 29, 2002, 9:25:08 AM5/29/02
to
Mark

I am still confused about which JAR to use (db2java.zip or jt400.jar) and
under which circumstances. I will clarify my situation...

My target production environment will be Websphere 4.0 on AS400 accessing
DB2 on AS400 as well as a remote Oracle database on Unix. My intention is to
set up two connection pools; one for DB2 and one for Oracle. Currently we
are running Websphere 3.5 (AS400) but we will setup both Websphere 3.5 and
4.0 to run simultaneously until all applications running on 3.5 have been
migrated to 4.0. Right now applications on 3.5 use a connection pool for DB2
only.

My development environment is Websphere 4.0 running locally on NT
development machine. The Oracle connection pool works just fine. I use
classes12.jar for the connection pool. However, I am having a hard time
setting up the connection pool for DB2 on AS400 from WAS4.0 on NT. I am
confused about the different JARs.

From what you are saying, I gather that two JARs will be required depending
on where WAS runs; db2java.zip for WAS on NT and jt400.jar for WAS 3.5/4.0
on AS400. Is that correct?

Can I use com.ibm.as400.access.AS400JDBCConnectionPoolDataSource in
jt400.jar for my development environment (i.e. WAS 4 on NT accessing DB2 on
AS400)?

<ma...@softlanding.com> wrote in message
news:ad2hfp$ega$2...@news.boulder.ibm.com...

Steve Johnson-Evers

unread,
May 29, 2002, 12:13:40 PM5/29/02
to
That's backwards. JT400.jar is JTOpen/Toolbox and used for accessing
AS/400 databases from a non-AS/400 JVM. You should also use this driver
when the database resides on a different AS/400. Use the (native) DB2
classes when the database and JVM are on the same AS/400.

You don't need to use the native DB2 classes if you don't want to. They
probably have a performance advantage over JTOpen when run on the same
box.

-Stevers

Roger Fortier wrote:
>
> Mark
>
> I am still confused about which JAR to use (db2java.zip or jt400.jar) and
> under which circumstances. I will clarify my situation...
>

Roger Fortier

unread,
May 29, 2002, 1:25:16 PM5/29/02
to
Steve,

I am not familiar with JTOpen/Toolbox so I will look into it. Just one
question, When using JTOpen/Toolbox is it necessary to install other
software on the client machine such as DB2 Connect? Any setup required on
AS400?


"Steve Johnson-Evers" <sev...@everbrite.rmv.this.com> wrote in message
news:3CF4FE34...@everbrite.rmv.this.com...

ma...@softlanding.com

unread,
May 29, 2002, 1:34:15 PM5/29/02
to
Roger,

Steve answered it pretty well. You should use a different driver
depending on where WAS is running. That is the beauty of using data
sources, just give the pool the same name on each platform and it doesn't
matter too much what driver you are using.

The JT400 driver was specifically developed for accessing the AS/400
database from other platforms. You could use it on both the AS/400 and
NT, but you pretty much have to use it on NT. I think it is possible if
you install DB2/Connect on NT and configure it properly, to use a more
generic DB2 driver, but the bulk of AS/400 users will be using the JT400
or Toolbox driver.

When WAS is running on the same AS/400 as the database you can use the
"native" DB2 driver. As Steve mentioned, it offers performance benefits
over the JT400 driver.

My initial response told you how to setup the "native" DB2 driver, my
second response how to setup the JT400 driver.

This page should have some useful information for you.

http://www-1.ibm.com/servers/eserver/iseries/db2/javadb2.htm

Mark

0 new messages