You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by hu...@tng.iac.es on 2007/11/14 18:20:19 UTC

two different oracle driver version at the same time

Hi All,

I am quite new to tomcat and I have been looking for information about how
to do the following thing, but I have not found the way.

In the company I work, we have a really old oracle db, and a quite new one
with a cluster.

The project which are developing under tomcat 6.0 (linux) needs to access
this to database but the driver I have found in oracle doesn't support the
two database. So I need to use a driver for the old db and another for the
new one.

I thought that I could put the driver in the WEB-INF/lib of the two
applications (no application need to use the two driver at the same time),
but I have seen in the documentation and faqs that you must put the driver
in the $CATALINA_HOME/lib directory.

The problem is that i can not put the two driver (of different versions)
in the lib directory.

It is there a clean way to put the driver in the application directory,
and the application takes care of doing the pooling etc.

I will appreciate any light on that,

Thanks in advanced,

Manuel Huertas.


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


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


Re: two different oracle driver version at the same time

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Manuel,

huertas@tng.iac.es wrote:
> I thought that I could put the driver in the WEB-INF/lib of the two
> applications (no application need to use the two driver at the same time),
> but I have seen in the documentation and faqs that you must put the driver
> in the $CATALINA_HOME/lib directory.

If you are using container-managed database connections (JNDI DateSource
or something similar), then the server needs access to the driver. You
can try to put each driver in the WEB-INF/lib of each application and
declare the datasource within context.xml... not sure if that will work
because it depends on Tomcat's rules for which ClassLoader is used while
setting up the webapp's Context, but before it is actually starting
servlets and stuff like that (which clearly uses the webapp's ClassLoader).

> The problem is that i can not put the two driver (of different versions)
> in the lib directory.

Of course.

> It is there a clean way to put the driver in the application directory,
> and the application takes care of doing the pooling etc.

Try my above suggestion and see if it works -- it shouldn't take too
long to try it.

If that doesn't work, you may need to run two separate instances of
Tomcat. If it turns out that you need to do this, just read the
"Advanced Configuration - Multiple Tomcat Instances" section of the
RUNNING.txt file that ships with Tomcat. It's quite easy to run multiple
instances if necessary.

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

iD8DBQFHOzTQ9CaO5/Lv0PARAvDpAJwNIuwShI1yF7E3X68fStJmJOdSvwCgigjL
57mcuXX4dMcu+35PHj7d1X8=
=p432
-----END PGP SIGNATURE-----

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