https://issues.apache.org/bugzilla/show_bug.cgi?id=55368

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #2 from Mark Thomas <ma...@apache.org> ---
Nick is correct.

The default setting for driverManagerProtection triggers a call to
DriverManager.getDrivers() with the current class loader set to the system
class loader. This is to avoid memory leaks if the call to
DriverManager.getDrivers() is triggered by a web application.

I'd add that you can get all sorts of strange behaviour wihtout this option
enabled depending on what web applciations include which drivers and the order
that the web applications are started and/or accessed.

There is no way to have automatic registration and no memory leaks. The system
class loader (rather than Tomcat's class loader that includes
${CATALINA_HOME}/lib) is used to prevent memory leaks when Tomcat is used in an
embedded scenario.

You are, of course, free to disable this setting if you prefer to have
automatic registration along with the memory leak risks that go along with
that. For more info on the memory leaks see this presentation:
http://people.apache.org/~markt/presentations/2010-11-04-Memory-Leaks-60mins.pdf

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to