when you construct it using the first example you showed (anonymous class) the ldm is carrying a reference to the page on which it is constructed. so your editblogpage is indirectly holding onto the instance of the previous page, perhaps that is what is causing the problem. please file a jira issue.
-igor On Mon, Mar 2, 2009 at 1:30 PM, Victor Igumnov <[email protected]> wrote: > I have been running on the HttpSessionStore for a good year now. > HttpSessions are clustered and have been working fine for all this time. As > of recently I have switched to SecondLevelCache and DiskPageStore to avoid > HttpSession bloat and still have fail over. > > I have run into an odd issue with serialization which throws a stackoverflow > exception. Here is the cause: > > Passing an LDM model as-is to a page, it will stackoverflow on the receiving > page, if that page is refreshed twice or a form has been submitted. > > Here is an example... > > setResponsePage(new EditBlogPage(new LoadableDetachableModel<Blog>() { > private static final long serialVersionUID = 1L; > �...@override > protected Blog load() { > // just an example.... > return new Blog(); > } > > })); > > However, if I subclass the LDM and pass it like so, it will work just fine. > > public class FakeLDM extends LoadableDetachableModel<Blog> { > private static final long serialVersionUID = 1L; > > �...@override > protected Blog load() { > return new Blog(); > } > } > > setResponsePage(new EditBlogPage(new FakeLDM())); > > One last thing, If I construct the LDM inside the receiving page. It will > work fine as well. > > This seems to only happen with the SecondLevelCache, any ideas? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
