Hi, Looks like with the Jacc API there is no easy way to set multiple types of handler data objects on the same thread at the same time (see PolicyContext.setHandlerData()). That is, if for example, if a servlet makes a ejb call, from within the ejb we won't be able to retrieve the HttpServletRequest object using the PolicyContext API since the HttpServletRequest object will be replaced with the ejb call info object on the thread.
So what's the best way to deal with this problem? One way to solve it, it would to set the handler data object to some a Map and set the handler data objects on the map. That would work as long as nothing else calls PolicyContext.setHandlerData() and replaces the map with some other object. Another way to solve it, it would be to create a GeronimoPolicyContext class (or something like that) which would support setting multiple types of handler data objects on the same thread at the same time (e.g GeronimoPolicyContext.setHandlerData(key, data)) AND modify Geronimo's PolicyContextHandlers to use GeronimoPolicyContext to get the right object for the handler. But with this solution we might be ignoring what's set using PolicyContext.setHandlerData(). Thoughts? Jarek
