I am trying to set up a JNDI resource of an Oracle database connection. I
have set the connection details in my application's context file in
$CATALINA_BASE/webapps/<myapp>/META-INF/context.xml

I put the jdbc driver in $CATALINA_BASE/common/lib and everything works
fine. The problem is i dont want to put the jdbc driver in that directory. I
would like to put it in $CATALINA_BASE/webapps/<myapp>/WEB-INF/lib

I have read about this a bit and i think that all JNDI resources must be in
$CATALINA_HOME/common/lib which explains why If i put the driver in the
application's lib folder it cant access it because the common class loader
wouldnt konw of the libraries in the applicatoins lib folders..

The tomcat installation only runs this one application. I  would like to be
able to move the application's war file (which will include all libraries in
the WEB-INF/lib folder) around to other tomcat instances if i need to
without having to worry about moving libraries as well.

Its a bit weird that i configure the JNDI resource in the application's
context file but the library that the context file is refering to is to be
kept outside of the application.
is there a way i can use the JNDI resource but have the jdbc driver in the
application's WEB-INF/lib directory?


Thanks in advance.

Reply via email to