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
> 
> 2008/7/21 Igor Vaynberg <[EMAIL PROTECTED]>:
> 
>> 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 of injected userservice svc and passes it to
>> the dataprovider. now dataprovider has a hard reference to the service
>> and is no longer serializable.
>>
>> if you use a @springbean generated proxy, this would still work fine.
>>
>> -igor
>>
>> On Mon, Jul 21, 2008 at 1:50 PM, Matt Welch <[EMAIL PROTECTED]> wrote:
>> >
>> >
>> > 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 that mean? The domain object
>> is
>> an
>> > injected bean (if it was annotated with @Configurable) and a reference
>> to
>> it
>> > would presumably be passed to the Wicket component so that the that
>> > component could process it. Are you saying that this should be avoided?
>> >
>> > other objects - Can you maybe give an example of the "other objects"
>> you
>> > have in mind?
>> >
>> > Matt
>> >
>> > --
>> > View this message in context:
>> http://www.nabble.com/%40SpringBean-vs-%40Configurable-tp18572291p18577287.html
>> > Sent from the Wicket - User mailing list archive at Nabble.com.
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/%40SpringBean-vs-%40Configurable-tp18572291p18593788.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to