Hi again The question is how can we make sure that everything is working after passivation and activation of a @SessionScoped bean? Some questions we have are:
- When passivating a bean with references to NormalScoped beans how is the underlying context handled? - When passivating a bean with transient references.. what happen to them after activation... .... Do you have any testcases for OWB that I can look at for understanding how I can make my testcases or do I maybe worry to much :)) Regards Lars-Fredrik On Fri, Nov 22, 2013 at 9:48 PM, Lars-Fredrik Smedberg <[email protected]>wrote: > If I would like to somehow force passivation and activation in a unit test > how would that look like? > > We use CDI-Unit (which is tied to Weld) for unit tests at the moment even > though we deploy to WebSphere which uses OWB. We do not use CODI or JSF at > the moment... Is there any other (easy) way? > Den 22 nov 2013 21:43 skrev "Mark Struberg" <[email protected]>: > > >> >> depends what scope those beans have. >> You would need to serialize the underlying context. >> >> The easiest way to force serialization is to use @ViewScoped from CODI or >> DeltaSpike together with Apache MyFaces. Those beans will get serialized >> after each and every request as per the JSF spec ;) >> >> LieGrue, >> strub >> >> >> >> >> >> >________________________________ >> > From: Lars-Fredrik Smedberg <[email protected]> >> >To: [email protected] >> >Sent: Friday, 22 November 2013, 20:06 >> >Subject: Forcing Bean passivation and activation >> > >> > >> > >> >Hi! >> > >> >Is there any way I can force Bean passivation followed by activation (in >> a test case)? >> > >> > >> >Regards >> >Lars-Fredrik Smedberg >> > >> > >> >-- >> >Med vänlig hälsning / Best regards >> > >> >Lars-Fredrik Smedberg >> > >> >STATEMENT OF CONFIDENTIALITY: >> >The information contained in this electronic message and any >> >attachments to this message are intended for the exclusive use of the >> >address(es) and may contain confidential or privileged information. If >> >you are not the intended recipient, please notify Lars-Fredrik Smedberg >> >immediately at [email protected], and destroy all copies of this >> >message and any attachments. >> > >> > >> > -- Med vänlig hälsning / Best regards Lars-Fredrik Smedberg STATEMENT OF CONFIDENTIALITY: The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the address(es) and may contain confidential or privileged information. If you are not the intended recipient, please notify Lars-Fredrik Smedberg immediately at [email protected], and destroy all copies of this message and any attachments.
