https://bz.apache.org/bugzilla/show_bug.cgi?id=64715

--- Comment #7 from Mark Thomas <ma...@apache.org> ---
Users may wish to use a 3rd party custom CallbackHandler that knows nothing
about Tomcat internals. A no-arg Constructor needs to be supported.

There are multiple class loaders involved and while the default configuration
avoids most of the complexities, the non-default configs need to be handled.

Some users reconfigure the class loaders so they look like this:
http://tomcat.apache.org/tomcat-4.1-doc/class-loader-howto.html

and may want to put the custom CallbackHandler in the Catalina loader. This
boils down to you need to try and load the specified class first with the web
app class loader (TCCL) and then with the class loader that loaded the current
class.

For adding the Context I'm suggesting something like:

if (callbackHandler instanceof Contained) {
    ((Contained) callbackHandler).setContainer(context);
}

Tomcat can then do:
if (callbackHandler instanceof Contained) {
    getContainer().getRealm()...
}

-- 
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