Re: [Wicket-user] exception when accesing application instance from a new Thread

2006-12-23 Thread Jaime De La Jara
Ok, I tried Application.get(servletName) and it worked !, basically I needed to access a Dao object that is defined in Spring and whose getter is in my Application instance, I think I'll go this way. Thanks Igor :) Jaime. Igor Vaynberg [EMAIL PROTECTED] wrote: that shouldnt be a problem, each

Re: [Wicket-user] exception when accesing application instance from a new Thread

2006-12-23 Thread Igor Vaynberg
hrm, why not use the webcontextutils (or whatever it is called in spring) class that has a static getrequiredapplicactioncontext(servletcontext) method. i would imagine this code has nothing to do with wicket, so why even use wicket to get to the dao, just get the application context and lookup

[Wicket-user] exception when accesing application instance from a new Thread

2006-12-22 Thread Jaime De La Jara
Hi, I need to start a new thread that loads some data while displaying a progress bar, however I'm getting the following exception : Exception in thread Thread-20 wicket.WicketRuntimeException: There is no application attached to current thread Thread-20 at

Re: [Wicket-user] exception when accesing application instance from a new Thread

2006-12-22 Thread Igor Vaynberg
call it anyway :) -igor On 12/22/06, Jaime De La Jara [EMAIL PROTECTED] wrote: Hi, I need to start a new thread that loads some data while displaying a progress bar, however I'm getting the following exception : Exception in thread Thread-20 wicket.WicketRuntimeException: There is no

Re: [Wicket-user] exception when accesing application instance from a new Thread

2006-12-22 Thread Jaime De La Jara
Ok, ckecking the API I found this other method : public static Application get(java.lang.String applicationKey) that allows me to obtain the reference of my application, thought its use is not recommended. Is there any side effect of using this method? Maybe it should be used with care in a

Re: [Wicket-user] exception when accesing application instance from a new Thread

2006-12-22 Thread Igor Vaynberg
that shouldnt be a problem, each node has its own application object and each node will register it under the same servlet context key. i dont know what you are doing exactly, but you might still have to set the threadlocal if you are using part of api that needs it. -igor On 12/22/06, Jaime