So, I have an issue with tomcat's database connection pool.  Namely,
my connections keep getting closed, instead of reused.

I figured that the easiest way to figure out what was going wrong was
to put this in my debugger, so I could follow the close() call which
should release the db connection back to the pool, instead of actually
closing the connection.

Now I just needed the source code, so I could follow it in the
debugger.  Then, after much searching, I discover this nutty sequences
of events:

Tomcat doesn't actually implement the connection pool - it is actually
from the apache-commons-dbcp project.  Great - code reuse - just like
it should be.

Tomcat's build script downloads a version of apache-commons-dbcp as
part of its build script.  It doesn't download a jar file, no, it gets
the source.  Thats kinda strange...
Then, it proceeds to refactor and rename the source code from
apache-commons-dbcp.  WTF?
Then, it compiles that into the naming-factory-dbcp.jar file... Ok....
That gets shipped with tomcat.  What does it do with the source, at
this point, do you ask?  It throws it away!  Great.  Thats really
helpful.
The source for this jar file is not shipped with the tomcat binary
distribution, nor with the source distribution, nor is it in tomcats
source control system, because it is actually "created" by the build
script.

I can't attach the source for apache-commons-dbcp to my debugger,
because the hierarchy is different.  I can't get the source for my
version of tomcat unless I feel like going out and getting ant to
build an entire copy of tomcat locally.  Which, is less than easy
behind the proxy server I have at work, since I'm sure that your ant
build scripts will fail when it attempts to download the source and
can't reach the internet.

So, my real question, is why the heck would anyone do this?  What
possible purpose could all of this obfuscation serve?  All you have
done is make debugging and trouble shooting 10 times more difficult
than it needs to be.

If you insist on refactoring the code for dubious reasons, could you
at least put the source in your source control system and/or the
source download package?

Ok, rant over.  Now I can go back to debugging the real problem....
Most likely by ripping out the code that uses tomcats connection
pooling, and just pointing it directly at dbcp so I can actually debug
it...

Dan

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

Reply via email to