Re: @SpringBean vs @Configurable

2008-07-22 Thread Rik van der Kleij
Is it right that also userspage is also not serializable because userservice is not serializable (not a proxy)? Regards, Rik 2008/7/21 Igor Vaynberg [EMAIL PROTECTED]: class usersdataprovider implements dataprovider { final userservice svc; public int size() { return svc.size(); } }

Re: @SpringBean vs @Configurable

2008-07-22 Thread Igor Vaynberg
no. @configurable overides serialization and null sout the reference. @springbean injects a proxy that is serializable. -igor On Tue, Jul 22, 2008 at 12:05 AM, Rik van der Kleij [EMAIL PROTECTED] wrote: Is it right that also userspage is also not serializable because userservice is not

Re: @SpringBean vs @Configurable

2008-07-22 Thread jWeekend
Rik, Also see http://jira.springframework.org/browse/SPR-4302 Regards - Cemal http://www.jWeekend.co.uk http://jWeekend.co.uk Rik van der Kleij-2 wrote: Is it right that also userspage is also not serializable because userservice is not serializable (not a proxy)? Regards, Rik

@SpringBean vs @Configurable

2008-07-21 Thread Leon Faltermeyer
Hi, Is there any difference in using Spring framework' s @Configurable annotation or wicket's @SpringBean. I'm already using @Configurable within my domain objects. I just mind, if I could use @Configurable in my UI layer for DI as well. regards, Leon

Re: @SpringBean vs @Configurable

2008-07-21 Thread Igor Vaynberg
you have to be careful not to pass references to injected beans to other objects. other than that i think you should be fine. -igor On Mon, Jul 21, 2008 at 9:22 AM, Leon Faltermeyer [EMAIL PROTECTED] wrote: Hi, Is there any difference in using Spring framework' s @Configurable annotation or

Re: @SpringBean vs @Configurable

2008-07-21 Thread Matt Welch
igor.vaynberg wrote: you have to be careful not to pass references to injected beans to other objects. other than that i think you should be fine. I know I should understand that, but my brain doesn't want to parse that sentence for some reason. references to injected beans - What does

Re: @SpringBean vs @Configurable

2008-07-21 Thread Igor Vaynberg
class usersdataprovider implements dataprovider { final userservice svc; public int size() { return svc.size(); } } @configurable class userspage extends webpage { private userservce svc; public userspage() { add(new dataview(users, new dataprovider(svc))); } this takes a reference

Re: @SpringBean vs @Configurable

2008-07-21 Thread jWeekend
@Configurable is used to enable Spring to inject dependencies into a non-Spring-managed object ie into an object Spring doesn't control the lifecycle of, and in particular, one that Spring does not create for you (eg the developer, and not Spring, uses the new keyword and a constructor, or some

Re: @SpringBean vs @Configurable

2008-07-21 Thread Matt Welch
Thank you. That makes sense to me now. It was a slow brain day day for me I guess. :) Matt igor.vaynberg wrote: class usersdataprovider implements dataprovider { final userservice svc; public int size() { return svc.size(); } } @configurable class userspage extends webpage {

Re: @SpringBean vs @Configurable

2008-07-21 Thread James Carman
There has also been a request made to have @Configurable inject serializable proxies. http://jira.springframework.org/browse/SPR-4777 On Mon, Jul 21, 2008 at 7:34 PM, Matt Welch [EMAIL PROTECTED] wrote: Thank you. That makes sense to me now. It was a slow brain day day for me I guess. :)