Actually..no, I hadn't thought about that.
Read up on how to kill threads and just finished implementing it. Thanks!



Also be sure to kill your thread in the application's onDestroy() otherwise
old threads will hang around if you do redeploys, but don't bounce the JVM.

You probably already thought of that. My scars are still fresh...

-Clint

On Tue, May 3, 2011 at 3:37 PM, Henrique Boregio <hbor...@gmail.com> wrote:

Thanks Martin...had to do some refactoring but your solution worked great.

On Tue, May 3, 2011 at 5:07 PM, Henrique Boregio <hbor...@gmail.com>
wrote:
Hi, I have a very simple thread that sleeps most of the time. Every
hour, it goes to the database to check what new stuff has been added,
and generates a summary of that.

This thread is started in my WicketApplication.init() method.

The problem is that the run() method of this thread, needs access to
the following method
"WebApplication.get().getServletContext().getContextPath()" but when
it tries to access this method, the following error occurs:

org.apache.wicket.WicketRuntimeException: There is no application
attached to current thread Thread

Any suggestions? Many thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: user...@wicket.apache.org
For additional commands, e-mail: user...@wicket.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to