Re: Any issues using @SpringBean in WebApplication

2009-10-29 Thread shetc
Is there an impact on performance if Spring beans are injected in a WebApplication and then shared for use in WebSession and WebPages (as opposed to injecting directly in WebSession and WebPages)? -- View this message in context:

Re: Any issues using @SpringBean in WebApplication

2009-10-29 Thread Eelco Hillenius
Is there an impact on performance if Spring beans are injected in a WebApplication and then shared for use in WebSession and WebPages (as opposed to injecting directly in WebSession and WebPages)? Sharing them (just don't keep references in your components) should be slightly more efficient.

Re: Any issues using @SpringBean in WebApplication

2009-10-29 Thread shetc
Hi Eelco -- My colleague and I were thinking that putting them all in the WebApplication would make it easier to mock services for unit testing with WicketTester. Eelco Hillenius wrote: Sharing them (just don't keep references in your components) should be slightly more efficient. Not the

Re: Any issues using @SpringBean in WebApplication

2009-10-29 Thread Eelco Hillenius
Hi Eelco -- My colleague and I were thinking that putting them all in the WebApplication would make it easier to mock services for unit testing with WicketTester. Alternatively, you could use e.g. InjectorHolder.setInjector(new MockSpringInjector()); like is documented in

Re: Any issues using @SpringBean in WebApplication

2009-10-29 Thread shetc
Ok, I get it! I'll give a try and let you know how I get on. Thanks! Eelco Hillenius wrote: Alternatively, you could use e.g. InjectorHolder.setInjector(new MockSpringInjector()); like is documented in org.apache.wicket.injection.web.InjectorHolder (at least it is in Wicket 1.3 which I

Any issues using @SpringBean in WebApplication

2009-10-28 Thread Steve Hiller
Hi All, Are there any issues associated with using the @SpringBean annotation in a class that inherits from WebApplication or AuthenticatedWebApplication? Thanks, Steve

Re: Any issues using @SpringBean in WebApplication

2009-10-28 Thread Igor Vaynberg
no -igor On Wed, Oct 28, 2009 at 1:22 PM, Steve Hiller sh...@bellsouth.net wrote: Hi All, Are there any issues associated with using the @SpringBean annotation in a class that inherits from WebApplication or AuthenticatedWebApplication? Thanks, Steve

Re: Any issues using @SpringBean in WebApplication

2009-10-28 Thread shetc
Thanks Igor! -- View this message in context: http://www.nabble.com/Any-issues-using-%40SpringBean-in-WebApplication-tp26101512p26101590.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe,

Re: Any issues using @SpringBean in WebApplication

2009-10-28 Thread Pieter Degraeuwe
Hmm, I was always thinking that the @SpringBean annotation should be used in Pages and/or components. You should inject your dependencies in your Application directly in your spring.xml. your spring.xml should contain something like this: bean class=foo.bar.MyApplication property

Re: Any issues using @SpringBean in WebApplication

2009-10-28 Thread Igor Vaynberg
ah, woops. i misread in as with you will have to inject the application class manually. after you install the spring component injector. -igor On Wed, Oct 28, 2009 at 1:29 PM, shetc sh...@bellsouth.net wrote: Thanks Igor! -- View this message in context:

Re: Any issues using @SpringBean in WebApplication

2009-10-28 Thread Michael O'Cleirigh
You could use the @Autowired Spring annotation and the autowire=byType attribute to the bean definition to support autowiring to get the same effect as @SpringBean brings in Components. e.g. bean class=foo.bar.MyApplication autowire=byType / Regards, Mike I was always thinking that

Re: Any issues using @SpringBean in WebApplication

2009-10-28 Thread James Carman
On Wed, Oct 28, 2009 at 5:29 PM, Michael O'Cleirigh michael.ocleir...@rivulet.ca wrote: You could use the @Autowired Spring annotation and the  autowire=byType attribute to the bean definition to support autowiring to get the same effect as @SpringBean brings in Components. Not exactly,