Re: upgrading from 1.4.3 to 1.4.4 onwards: using @springbean in servlets (non wicket) broken

2010-05-29 Thread Igor Vaynberg
look at spring's dispatch servlet -igor On Fri, May 28, 2010 at 6:16 PM, Sam Zilverberg wrote: > Good idea. > Using: >   ApplicationContext context = > WebApplicationContextUtils.getWebApplicationContext(getServletContext()); >   someDao = (IDAO) context.getBean("someDao"); > > Works. > > Howeve

Re: upgrading from 1.4.3 to 1.4.4 onwards: using @springbean in servlets (non wicket) broken

2010-05-29 Thread James Carman
On Sat, May 29, 2010 at 9:31 AM, Sam Zilverberg wrote: > I looked at "Controller" but it seems that if i use it i have to respond > with some ModelAndView object to requests... > If you take care of the request yourself, by spitting back what you're supposed to on the response, then you just retu

Re: upgrading from 1.4.3 to 1.4.4 onwards: using @springbean in servlets (non wicket) broken

2010-05-29 Thread Sam Zilverberg
The servlet receives POST requests containing xml documents that describe operations like "add-something-to-db" / "retrieve-something-from-db" / "sync-time-with-server". The servlet parses these xmls, fullfills the requests and responds with an xml document containing either error codes or some inf

Re: upgrading from 1.4.3 to 1.4.4 onwards: using @springbean in servlets (non wicket) broken

2010-05-29 Thread James Carman
What are these other servlets doing? Perhaps you could implement the functionality using Spring-WebMVC and just implement a "controller"? Then, Spring manages the "servlets" (they're actually beans that act like servlets and Spring dispatches to them) and you can have all your cool dependency inje

Re: upgrading from 1.4.3 to 1.4.4 onwards: using @springbean in servlets (non wicket) broken

2010-05-29 Thread Sam Zilverberg
I can't reach my daos in any other way but using ApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(getServletContext()); I've tried using some spring annotations and to autowire these daos into the servlet. When not using @Qualifier spring would fail at startup tell

Re: upgrading from 1.4.3 to 1.4.4 onwards: using @springbean in servlets (non wicket) broken

2010-05-28 Thread James Carman
You don't need @SpringBean for that. Use Spring's support for that. On Fri, May 28, 2010 at 8:22 PM, Sam Zilverberg wrote: > Hi, > My application uses wicket 1.4.3, spring & hibernate. > In the past I've got @SpringBean working in servlets by using > 'InjectorHolder.getInjector().inject(this);'

Re: upgrading from 1.4.3 to 1.4.4 onwards: using @springbean in servlets (non wicket) broken

2010-05-28 Thread Sam Zilverberg
Good idea. Using: ApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(getServletContext()); someDao = (IDAO) context.getBean("someDao"); Works. However I was hoping to continue using @SpringBean somehow... -Sam

Re: upgrading from 1.4.3 to 1.4.4 onwards: using @springbean in servlets (non wicket) broken

2010-05-28 Thread Igor Vaynberg
you can use spring's servlet support... -igor On Fri, May 28, 2010 at 5:22 PM, Sam Zilverberg wrote: > Hi, > My application uses wicket 1.4.3, spring & hibernate. > In the past I've got @SpringBean working in servlets by using > 'InjectorHolder.getInjector().inject(this);' in their init method.

upgrading from 1.4.3 to 1.4.4 onwards: using @springbean in servlets (non wicket) broken

2010-05-28 Thread Sam Zilverberg
Hi, My application uses wicket 1.4.3, spring & hibernate. In the past I've got @SpringBean working in servlets by using 'InjectorHolder.getInjector().inject(this);' in their init method. I've updated my wicket version to 1.4.4 (or any other newer version) and fixed a compilation error in wicket ap