I did some quick tests and have the same behaviour that you described.

The only solution I can think of is to use a custom build of log4j.
Just take the source and rename the package. Use the custom log4j in commons/lib and the normal log4j in the webapp.


-- Dirk

Philipp von dem Bussche wrote:

Hi Dirk,
it's 4.1.29.
Thanks for your reply.
Phil.

Dirk Verbeeck wrote:

Hi Phil,

What version of tomcat are you using?

-- Dirk

[EMAIL PROTECTED] wrote:

Hi,
to get noticed about the number of connections, which are handed out by the data source, we extended BasicDataSource. getConnection() was overwritten so that everytime a connection is released a log file entry is written. At first we used log4J for Logging, but we had to recognize, that placing our new jar and a jar for log4j into common/lib under the tomcat tree, results in an error of another webapp, which was supposed to use its own log4j but now acts on the one, which is placed in common/lib (<-- this seems to be a mistake in class loading because it is describe just the other way around on tomcat homepage).
Anyway, we are looking for a new way to do the monitoring. One solution could be using a tomcat FileLogger. But the problem will be the classloader again. Since our data source has to be placed under common/lib, the FileLogger is part of catalina.jar, which is actually under server/lib, we won't be able to make an instance from catalina FileLogger in our extended data source.
So my question is, has anybody ever faced a similiar problem or does anybody know of a solution to this ?? Monitoring of data sources is a very important task here at the moment.


Thanks,
Phil.




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to