Hi Richard, On 11/4/05, Richard S. Hall <[EMAIL PROTECTED]> wrote:
[snip] > > The approach I use to route incoming handler requests is to use the > security class context, which gives me the call stack of classes. I then > search backwards to find the first class loaded from a bundle and then > route to the framework that owns that bundle. As an optimization, if > there is only one framework instance, then I just assume that every > request should be routed to it. > I assume you're referring to SecurityManager.getClassContext()? I am also using this method to support my Apache Jakarta Commons Logging implementation which provides the ability to log events per bundle. JCL is provides the LogFactory class with static methods getLog(String) and getLog(Class). This made it rather tricky at first to find out which bundle issued the call to getLog(). The only problem I foresee is if a SecurityManager is installed that disallows creation of new SecurityManagers (there is a check for this in the SecurityManager constructor). If you do indeed use SecurityManager.getClassContext(), I assume you had to extend the SecurityManager class as well since the method is protected. Jeremy

