As much as I hate come to the rescue of a dynaTrace employee I need to point out some rather obvious items that seem completely lost here on those fixated with slow database response times (which need not always be the case).
1. Applications today have huge call stack depths. Prior to Spring the typical max was +120 subsequently this has gone from 240 to 360 with no end in sight judging by the approach taken by rapid rails like frameworks.
2. Applications today (other than Spring Pet/Travel Clinic apps) have a very large number of threads running concurrently and yes all probably down with deep call stacks making database queries or some other resource/service interaction.
3. Getting the call stack is terribly, terribly, terribly,....expensive both in terms of cpu and object alloc (which we know what that leads to). This grows with each frame you add and by the way the JVM has to handle inlining issues (JRockit has slipped up on this previously).
4. The default JVM/SDK behavior in constructing an exception is to fill the stack.
5. Exceptions tend to be generated very deep in the call path/stack processing.
6. Some enterprise API's, JNDI, throw exceptions like they were cheap return values (i.e. no object bound here instead of null).
7. The average developer loves to log exceptions with stack traces and then throw another exception which will be logged again further up the stack during unrolling. Logging libraries are notoriously badly designed/developed, under performing and IO intensive.
8. GC is not execution aware in particular it does not know that one of your threads is currently doing a database operation that could potentially lock up the continued processing of other database operations being performed locally or remotely (in other JVM's).
9. Most enterprise applications have some distributed coupling/coordination. More GC and your local problems suddenly spread like a virus across other JVM's. This has been an issue for many first generation data grid products.
10. More (handling) code, potentially more bugs, definitely (relatively) slower, and just a bloody mess to maintain especially with all that pollution caused by your usage of logging which has in general an economic value of 0$.
http://williamlouth.wordpress.com/2008/11/18/an-exceptionally-bad-start/