Wicket, page stack, and memory usage

前端 未结 2 1636
南旧
南旧 2021-02-06 16:20

A Wicket application serializes and caches all pages to support stateful components, as well as for supporting the back button, among other possible reasons. I have an applicati

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-06 16:52

    http://apache-wicket.1842946.n4.nabble.com/Wicket-Session-grows-too-big-real-fast-td1875816.html

    If you use loads of domain objects on your page, which are eventually tightly coupled to other domain objects, be sure to avoid serialization for these!

    Have a look at LoadableDetachableModel for wrapping domaing objects DataView and IDataProvider for displaying list of domain objects

    Thou shalt not stuff domain objects into instance variables of components. Thou shalt not make domain object references final in order to use them in anonymous subclasses. Thou shalt not pass a mere List of domain objects to a ListView.

    Perhaps, when subclassing WbeRequestCycle in your Application class, you might gain control of a page's lifetime in the pagemap... haven't tried it, though

提交回复
热议问题