Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2006

Tip: Looking for answers? Try searching our database.

Tomcat ODBC via DB2

Thread view: 
spinel - 09 Nov 2006 00:11 GMT
Anyone know what driver Tomcat needs to call an DB2 ODBC connection?

I'm not sure if that was said properly but basically, we need to
connect to a DB2 database via an ODBC connection. The DB2 client is
installed on the same tomcat server and we've also created an ODBC
connection. This connection has been verified and we're able to connect
to DB2 via command line or even see the tables via MS Access. We now
want to call on this ODBC from a tomcat application. I understand the
format in modifying the server.conf file when adding a new application
but i'm not sure how to do the same for DB2 via an ODBC connection. Can
anyone help? Thanks!
Rhino - 09 Nov 2006 00:33 GMT
> Anyone know what driver Tomcat needs to call an DB2 ODBC connection?
>
[quoted text clipped - 7 lines]
> but i'm not sure how to do the same for DB2 via an ODBC connection. Can
> anyone help? Thanks!

Try asking on a DB2 newsgroup, like comp.databases.ibm-db2, or a Tomcat
mailing list, or maybe comp.lang.java.databases. Any of those three would be
more appropriate than comp.lang.java.programmer.

You should also think about using JDBC rather than ODBC.

--
Rhino
Arne Vajhøj - 09 Nov 2006 01:51 GMT
> Anyone know what driver Tomcat needs to call an DB2 ODBC connection?
>
[quoted text clipped - 6 lines]
> format in modifying the server.conf file when adding a new application
> but i'm not sure how to do the same for DB2 via an ODBC connection.

JDBC - ODBC bridge and DSN:

driver = sun.jdbc.odbc.JdbcOdbcDriver
connection url = jdbc:odbc:yourdsn

JDBC - ODBC bridge and DSNless:

driver = sun.jdbc.odbc.JdbcOdbcDriver
connection url = jdbc:odbc:;Driver={IBM DB2 ODBC
DRIVER};DBAlias=yourdb;Uid=xxxx;Pwd=xxxx;

Real JDBC driver:

driver = com.ibm.db2.jcc.DB2Driver
connection URL = jdbc:db2://localhost:50000/yourdb

I can strongly recommend you to use the real JDBC driver.

The JDBC ODBC bridge in a multithreaded context like
Tomcat is a disaster !

Arne

Arne
Simon Brooke - 09 Nov 2006 13:03 GMT
> Anyone know what driver Tomcat needs to call an DB2 ODBC connection?
>
> I'm not sure if that was said properly but basically, we need to
> connect to a DB2 database via an ODBC connection.

Why?

> The DB2 client is
> installed on the same tomcat server and we've also created an ODBC
[quoted text clipped - 4 lines]
> but i'm not sure how to do the same for DB2 via an ODBC connection. Can
> anyone help? Thanks!

The JDBC-ODBC bridge driver should do it, but I wouldn't recommend it.

Signature

simon@jasmine.org.uk (Simon Brooke) http://www.jasmine.org.uk/~simon/
       Wannabe a Web designer?
       <URL:http://userfriendly.org/cartoons/archives/97dec/19971206.html>

gryphon_smg - 11 Nov 2006 00:04 GMT
As the others wrote, you don't want to be using ODBC with Tomcat, you
want to use JDBC. The other thing to think about is that the IBM JDBC
driver for DB2400 is somewhat broken. It does not fully support the
JDBC 3.0 spec and does not work with some popular open source database
related software, rendering it very difficult to use effectively. IBM
does not seem to think it is a very big issue and has not given a time
frame for fixing it. We are migrating as much of our data to better
supported databases as fast as we can.

scott
> Anyone know what driver Tomcat needs to call an DB2 ODBC connection?
>
[quoted text clipped - 7 lines]
> but i'm not sure how to do the same for DB2 via an ODBC connection. Can
> anyone help? Thanks!


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.