An idea: I belive it has many pitfalls :(, but might be useful an idea, tapestry could for example extend such enum (persist worker might trigger it) and add serialization code to it. Then when reloading it could force serializing enum values, plus if the value gets serialized outside tapestry it could be better handled (if servlet container serializes it).
this might only help enums.. On Tue, Mar 25, 2008 at 10:57 PM, Howard Lewis Ship <[EMAIL PROTECTED]> wrote: > I'm kind of surprised about that; are you storing the enum values > outside of the page instance (i.e. in the session?) > > Inner classes are loaded by the disposable component class loader (the > class loader that handles retry logic and class transformation). When > a class changes, the class loader, plus and objects instantiated from > that class loader, are discarded. > > If you place such an object in the session, it will hang around > (keeping the class loader from being garbage collected) ... AND when > the stored value is assigned to a field of the newly loaded page > instance, it will fail with a ClassCastException because there's a new > class (with the same name) loaded by a new class loader. > > I'd love to patch up these "leaky abstractions" a bit better, but > that's partt of the price of running in your choice of servlet > container; short of Tapestry being an application server, and not an > application framework, it doesn't have sufficient control of things to > make it any more seamless. > > On Tue, Mar 25, 2008 at 2:49 PM, Adam Zimowski <[EMAIL PROTECTED]> > wrote: > > If Page or Component defines Enum internally, Tapestry throws a > > ClassCastException the moment said page or component class (or even > > the template) is "hot" reloaded due to any kind of change. > > > > Can this be fixed/change to allow inner Enums? > > > > -adam > > as of 5.0.11 > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > Howard M. Lewis Ship > > Creator Apache Tapestry and Apache HiveMind > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >