[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[equinox-dev] jetty-http / jsp / problem with session-scoped beans after bundle update
- From: Yuriy Malchenko <jmalchenko@xxxxxxxxx>
- Date: Wed, 3 Mar 2010 02:51:35 +0200
- Delivered-to: firstname.lastname@example.org
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=GnWxibXhmetEEZD6ldITgHLt4wMGLBFP0OVTBQrXjtknBGYo9efmBbI3KDbAdYqSV4 I1IFGtK6gwzFSRRmkKaoEyuxk+DOEUOJtKdqbFdycs1JL5f6EZxphk3jeolDgWlWQFrT P/W1MFx9rSZIL/PtWxBM7NZJtt4cK3waRk4eg=
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
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!