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
the dao yourself. my two cents.

-igor


On 12/23/06, Jaime De La Jara <[EMAIL PROTECTED]> wrote:

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 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 De La Jara <[EMAIL PROTECTED]> wrote:
>
> Ok, ckecking the API I found this other method :
>
> public static  Application 
<http://wicket.sourceforge.net/apidocs/wicket/Application.html> 
*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 cluster?
>
>
> Jaime.
>
>
>
>
> *Igor Vaynberg < [EMAIL PROTECTED]>* wrote:
>
> 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 application attached to current thread Thread-20
> >     at wicket.Application.get(Application.java:163)
> >     at wicket.spring.SpringWebApplication$1.getSpringContext(
> > SpringWebApplication.java:52)
> >     at wicket.spring.SpringBeanLocator.locateProxyTarget(
> > SpringBeanLocator.java :117)
> >     at wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(
> > LazyInitProxyFactory.java:373)
> >     at wicket.proxy.$Proxy0.cargarProveedores(Unknown Source)
> >     at cl.eclac.sipc.web.administracion.paginas.VendorsLoadProcess.run(
> > LoadVendors.java:145)
> >     at java.lang.Thread.run(Thread.java:595)
> >
> >
> > To the new thread I'm passing a dao to do the data load :
> >
> >  new Thread(new VendorsLoadProcess(LoadVendors.this.getVendorDao(),
> >                                                          ajaxBar,
> > msgSuccess, msgError)).start();
> >
> > How can I fix this error? I checked tha API and it says that :
> >
> > 
*set<http://wicket.sourceforge.net/apidocs/wicket/Application.html#set%28wicket.Application%29>
> > *( 
Application<http://wicket.sourceforge.net/apidocs/wicket/Application.html>
> >  application)
> >           THIS METHOD IS NOT PART OF THE WICKET PUBLIC API.
> >
> > Any help would be greatly appreciated, thanks.
> >
> > Jaime.
> >
> >
> >
> >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> >
> >
> > -------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to
> > share your
> > opinions on IT & business topics through brief surveys - and earn cash
> >
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> >
> > _______________________________________________
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
> >
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys - and earn cash
> 
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV_______________________________________________
>
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys - and earn cash
>
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash

http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to