« Return to Thread: @SpringBean vs @Configurable

Re: @SpringBean vs @Configurable

by jwcarman :: Rate this Message:

Reply to Author | View in Thread

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 <matthew@...> wrote:

>
> 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 {
>>   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 <matthew@...> 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: users-unsubscribe@...
>>> For additional commands, e-mail: users-help@...
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@...
>> For additional commands, e-mail: users-help@...
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/%40SpringBean-vs-%40Configurable-tp18572291p18579719.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

 « Return to Thread: @SpringBean vs @Configurable

LightInTheBox - Buy quality products at wholesale price!