> I have a custom session class that inherits from WebSession.  I have
> overridden the newSession method in my Application class.  The session is
> getting used during the request, because I initialize some of its values in
> its constructor, and they show up when I attach a label to them in a page.
> A new session gets created with every request, however, which obviously is
> not the desired behavior.  For instance, I have an Integer, and I initialize
> it to 1 in the constructor, and increment it before each page display.  I
> always get back a 2 on the page.

It sounds like your page is stateless, and the session instances are
temporary. As long as a session is not 'bound', you'll get a separate
instance per request and Wicket won't hold on to heap memory. You can
force the creation of a session by calling Session#bind, which I think
you should be able to call from your constructor as well.

> Related to this, can someone provide me a download link to the 1.3 examples?
> The live examples page does not allow you to view the source for the
> stateless example, which seems like it may have some relevant code in it,
> and I cannot find a download link for the 1.3 examples.  The 1.2 examples do
> not have that particular example, from what I can tell.

Use http://wicketstuff.org/wicket13/ to look at the examples. The
wicket-examples site is stale.

As for downloading the examples for 1.3.0, at this time you can best
get them from SVN directly, or download them from our maven repo at
http://wicketstuff.org/maven/repository/org/apache/wicket/wicket-examples/1.3.0-SNAPSHOT/

Eelco

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to