You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by DonatasCiuksys <do...@mitsoft.lt> on 2013/12/01 14:40:53 UTC

Is re-injection happening after de-serialization?

I'm trying to find an answer in CDI 1.0 spec but cannot. If I have:

@SessionScoped (or other pasivating scope)
public class BeanA implements Serializable {

  @Inject
  private transient BeanB beanb;
}

what will happen after de-serialization (activation)? will beanb be
re-injected, or will it be left null?





--
View this message in context: http://openejb.979440.n4.nabble.com/Is-re-injection-happening-after-de-serialization-tp4666473.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: Is re-injection happening after de-serialization?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Dont make them transient but replace injected value by a serializable one
(even is serilization is done writing n id in an in mem map)
Le 1 déc. 2013 16:40, "DonatasCiuksys" <do...@mitsoft.lt> a
écrit :

> Are there any means to "enhance" de-serialized instance, that is, to
> request
> cdi container to perform injection?
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Is-re-injection-happening-after-de-serialization-tp4666473p4666475.html
> Sent from the OpenEJB Dev mailing list archive at Nabble.com.
>

Re: Is re-injection happening after de-serialization?

Posted by DonatasCiuksys <do...@mitsoft.lt>.
Are there any means to "enhance" de-serialized instance, that is, to request
cdi container to perform injection?



--
View this message in context: http://openejb.979440.n4.nabble.com/Is-re-injection-happening-after-de-serialization-tp4666473p4666475.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: Is re-injection happening after de-serialization?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

Null normally.
Le 1 déc. 2013 14:42, "DonatasCiuksys" <do...@mitsoft.lt> a
écrit :

> I'm trying to find an answer in CDI 1.0 spec but cannot. If I have:
>
> @SessionScoped (or other pasivating scope)
> public class BeanA implements Serializable {
>
>   @Inject
>   private transient BeanB beanb;
> }
>
> what will happen after de-serialization (activation)? will beanb be
> re-injected, or will it be left null?
>
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Is-re-injection-happening-after-de-serialization-tp4666473.html
> Sent from the OpenEJB Dev mailing list archive at Nabble.com.
>