[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] jetty-http / jsp / problem with session-scoped beans after bundle update

Hi!

I'm playing with Jetty based HTTP Service and Jasper.
And here's the problem: if I declare a session-scoped bean and then
update the bundle which provides its class, I eventually get the JSP
exception with cause saying:
"java.lang.ClassCastException: com.yurique.web.SomeBean cannot be cast
to com.yurique.web.SomeBean".

It occurs whenever some compiled JSP-class tries to access that bean
and finds it in the session's cache. But at that moment the bundle is
updated and has a different instance of class loader, so classes don't
match (although their names do).

So I wonder if there's any way to clean-up sessions' stored beans when
the bundle is updated or work this problem around in any other way?
Or maybe I should take the needed classes (session/application scoped)
to a separate bundle which will not be needed to update frequently?
But anyway sometimes it might, so it's not a good solution.

Thanks in advance for any help!

---
Yurique