Are you sure they are stashed in the HttpSession? The original implementation I wrote took great care to make sure that they weren't. That MIGHT have changed due to a bug fix, but I just took a look at SessionMonitor and WikiSession, and I could not find when WikiSession was actually stashed. A quick reference-skim for HttpSession.setAttribute() didn't turn up anything either.
Well, okay, not really stashed into HttpSession, but SessionManager stores them by using the HttpSession as a key. So they will be called from multiple threads, though not at the same time. Regardless, it's not an optimal solution.
required ActionBean method getContext()). The WikiActionBeanContext itself contains only four references: for WikiEngine, WikiSession, HttpServletRequest and HttpServletResponse. That's it -- no other references to Stripes objects, and no long chains of object references pulling in lots of heavyweight stuff.
Well, that looks good - except for the HttpServletRequest/Response. Those are dependent on this all being a HTTP application (which may not be true if you embed the rendering engine in some app). But on the other hand, we can of course state that those *can* be null in certain cases, or substitute dummy values (which in turn make these again Stripes-dependent).
I'm NOT actually trying to argue that WikiActionBeanContext is the right place to put the JCR code (or a reference to a class that contains it) -- just pointing out that it's not as heavyweight as you might think. It will always be available, which makes it a decent place to put stuff. And a new one is created, fresh, for every HTTP request.
I'm not worried about HTTP requests, I'm worried about cases *outside* HTTP (still trying to think separation of rendering and the rest).
What is the real relationship between WikiContext and WikiActionBeanContext? For rendering, I think we need a separate RenderingContext interface, which encapsulates everything that the rendering engine needs into one interface. But I am currently unsure as to how all these should relate to each other.
/Janne
