Use a LoadableDetachableModel that can re-inflate / re-retrieve your serializable object. It may only need to store something like a class name and an integer ID, etc. This keeps session state small as well. Serialization of all models allows for easier clustering when your site becomes the next Twitter.
-- Jeremy Thomerson http://www.wickettraining.com On Tue, Mar 3, 2009 at 10:36 PM, Chris Hansen <[email protected]>wrote: > Hi all, > > First off, I'm new to Wicket and I have to say I'm really liking it so far. > > One concern I have is related to using non-serializable objects. If > I'm not mistaken, some other web frameworks will create dynamic, > serializable proxies for your non-serializable objects automatically, > when possible. I saw that this type of functionality is used in > Wicket's Guice integration, but I am wondering why it isn't a part of > Wicket proper. Using serializable model objects seems like a fine > goal, but what if those model objects are in a library which is not > under our control and they happen to not be serializable? > > There must be downsides to the proxy approach that I'm not aware of, > or an easier way to work with non-serializable model objects. Am I > missing something? > > Thanks, > Chris > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
