On 19/05/2010 16:48, Adriano dos Santos Fernandes wrote:
On 19/05/2010 16:36, James Carman wrote:
What itch are we trying to scratch, here, anyway?  When do folks need
access to the Application object outside of a request thread?  What is
the usecase?
I have a piece of code that runs in a timer, and renders a page to a string to be sent via email. So I do need the app object to make a session. I do catch it from a static field.

The code (that is probably inspired in something in the wiki) is not very clear, needing mock objects. I do think Wicket could have a way to simplify it, but not introducing leaks that's know to happen with Java system classes way of work, as I shown.

To clarify this, I use Application.set and Application.unset there. Although public, they're "not part of Wicket public API". So IMO, the initial issue would be better done making these methods part of the public API.


Adriano

Reply via email to