tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject Re: 5.0.16: Deploying to common/lib from WAR
Date Fri, 02 Jan 2004 14:46:59 GMT
First, this would be non-standard behavior if Tomcat supported it.  Counting on 
it means being married to Tomcat.  Besides that, even if Tomcat did this, it 
wouldn't help.  The libraries in Tomcat's global lib directories are loaded 
upon server startup.  Any new library wouldn't be noticed until a server 
restart.

I assume the reason you need the driver in common/lib is to be able to use 
Tomcat's DBCP connection pooling.  Otherwise, if you use your own connection 
pooling that is not driven by Tomcat (and doesn't require two-way communication 
with libraries in common/lib), then you should be able to put it in your WEB-
INF/lib directory.  I think you are just going to have to deal with manually 
placing your jar in common/lib before application deployment.

I guess this is where the JBoss unified class loader might be advantagous, 
although it does cause its own problems, but that's another issue altogether.

Jake

Quoting Vegard Skjefstad <vegard.skjefstad@nrk.no>:

> Hi,
> 
> Is it possible to have a file copied to the $TOMCAT_HOME/common/lib when a
> WAR-file is automatically deployed on a running instance of the Tomcat 5.0
> server? I need to have jdbc.jar in this directory to get connection pooling
> to work. Or maybe someone can tell me how to get pooling to work without
> having to dump jdbc.jar in the common/lib directory. Without the file in
> that location I get this exception:
> 
> org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class
> 'com.mysql.jdbc.Driver', cause: com.mysql.jdbc.Driver
> 
> Thanks a lot in advance.
> 
> Best regards,
> Vegard Skjefstad
> 
> --- -- -
> Vegard Skjefstad, c0d3 /\/\0nk3y
> Norwegian Broadcasting Corporation
> Office:      +47 23 04 78 37
> Cellular:    +47 92 48 17 12
> For further contact information, please visit
> http://www.vegard.net/about/#contact
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message