Chris

Yes we use connection pooling mechanism

I will try placing these in CATALINA_BASE/common

:-) yes we use Microsoft  SQL Server JDBC 2.0 , let me search for pure java 
drivers, you have any pointers.

Regards
Venkat




________________________________
From: Christopher Schultz <ch...@christopherschultz.net>
To: Tomcat Users List <users@tomcat.apache.org>
Sent: Wed, May 18, 2011 11:18:38 AM
Subject: Re: Tomcat5w GUI application

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Venkat,

On 5/18/2011 5:18 AM, Venky Vasant wrote:
> However another question, i have jdbc drivers in the classpath, i tired 
> copying whole folder under WEB-INF it was not picked up.
> i did not try copying the sqljdbc.jar right under web-inf as i am not very 
> sure 
>
> of how other file like .dll get used.

If you are using Tomcat's connection-pooling mechanism, you'll need to
place your JDBC library any any supporting libraries (such as native
libs) under CATALINA_BASE/common and take care NOT to put them into your
webapp's WEB-INF/lib directory. That's an unfortunate requirement of
Tomcat's connection pooling mechanism.

If you are NOT using Tomcat's connection-pooling, then you should put
all those libraries into your webapp's WEB-INF/lib directory.

Tomcat basically builds all "class paths" (that is, locations where
libraries are located, not to be confused with the actual CLASSPATH
environment variable which you should pretty much never use) in a smart,
safe, and sane way. You should just follow the rules and everything
should be okay. Those rules are, roughly:

1. Don't set the CLASSPATH environment variable and/or
  Don't change the CLASSPATH setting in the service configuration
2. Put all the libraries your webapp needs into the webapp's WEB-INF/lib
  directory

That's basically it. The fact that your webapp uses some particular JDBC
driver is technically irrelevant: the server should provide a JDBC
DataSource to your webapp and the server should configure it. That's why
the server needs to have access to the JDBC library itself instead of it
being stuck in your webapp's WEB-INF/lib directory.

By the way, yuck: whose JDBC library requires a native library these
days? Is that Microsoft SQL Server. I thought they had a pure-Java driver.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3T8V4ACgkQ9CaO5/Lv0PDA9ACdHpzykH2OtnZvAb+DCm46sfLO
z3kAn1PSChTyIdYHoTRzJDB6CTD1rv0k
=tZlT
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to