You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@openwebbeans.apache.org by Thomas Andraschko <to...@yahoo.de> on 2011/10/07 14:21:39 UTC

How does OWB replicate/serialize beans?

Hi,

If i have a @ViewScoped bean (possible with CODI) with injected beans, will this injected beans also be serialized and replicated?
So my services and dao's must all be serializable?
Are the best practices available?

Thanks and best regards
Thomas

Re: How does OWB replicate/serialize beans?

Posted by Thomas Andraschko <to...@yahoo.de>.
Hi Mark!

i see, thanks. Now it's time to start a new project with OWB :)

Best regards,
Thomas



________________________________
Von: Mark Struberg <st...@yahoo.de>
An: "user@openwebbeans.apache.org" <us...@openwebbeans.apache.org>
Gesendet: 15:14 Freitag, 7.Oktober 2011 
Betreff: Re: How does OWB replicate/serialize beans?

Hi Thomas!


NormalScoped beans (@SessionScoped, @RequestScoped, etc. Basically all scopes other than @Dependent) do not directly inject the contextual instances but only the contextual references (the proxies). Thus we only serialize the proxy in that case. 


On deserialisation, the proxy knows the correct contextual instance and will resolve it on the next invocation.

LieGrue,
strub

>________________________________
>From: Thomas Andraschko <to...@yahoo.de>
>To: "user@openwebbeans.apache.org" <us...@openwebbeans.apache.org>
>Sent: Friday, October 7, 2011 2:21 PM
>Subject: How does OWB replicate/serialize beans?
>
>
>Hi,
>
>If i have a @ViewScoped bean (possible with CODI) with injected beans, will this injected beans also be serialized and replicated?
>So my services and dao's must all be serializable?
>Are the best practices available?
>
>Thanks and best regards
>Thomas
>
>

Re: How does OWB replicate/serialize beans?

Posted by Mark Struberg <st...@yahoo.de>.
Hi Thomas!


NormalScoped beans (@SessionScoped, @RequestScoped, etc. Basically all scopes other than @Dependent) do not directly inject the contextual instances but only the contextual references (the proxies). Thus we only serialize the proxy in that case. 


On deserialisation, the proxy knows the correct contextual instance and will resolve it on the next invocation.

LieGrue,
strub

>________________________________
>From: Thomas Andraschko <to...@yahoo.de>
>To: "user@openwebbeans.apache.org" <us...@openwebbeans.apache.org>
>Sent: Friday, October 7, 2011 2:21 PM
>Subject: How does OWB replicate/serialize beans?
>
>
>Hi,
>
>If i have a @ViewScoped bean (possible with CODI) with injected beans, will this injected beans also be serialized and replicated?
>So my services and dao's must all be serializable?
>Are the best practices available?
>
>Thanks and best regards
>Thomas
>
>