On Thursday 27 May 2010 12:41:10 James Carman wrote:
> On Thu, May 27, 2010 at 2:34 AM, Emond Papegaaij
> 
> <[email protected]> wrote:
> > In our application we use quartz for long running jobs. These threads
> > have access to the application context, which contains the wicket
> > application. In the execute method, we locate the application and use
> > Application.set and Application.unset to set and remove the application.
> > This is, however, not a 'public API' and could easily be replaced by
> > wrapping the main body in a Runnable and calling Application.wrap. I'm
> > in favor of this wrap method. It allows you to set the application on a
> > thread, without having to use non- public API, and without the
> > try/finally hassle.
> 
> What happens if you have multiple applications running in the same webapp?

Well, the answer is pretty simple: we only have one application per webapp. :)

If we wanted to supported multiple applications, we probably would pass the 
application in some way to the jobs (we already pass other information, such 
as the user starting the job).

> > I do not care how this method is implemented (that's the beauty of a good
> > API, isn't it?). It could store the application in the runnable, or look
> > it up in a map, as long as it works reliably, I'm fine with it :)
> 
> Right, we can figure out how to implement it later, but I think making
> this method available would be a huge step in the right direction.
> 

Agreed.

Emond

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to