Warm regards,<p>Stephen Lim
Warm regards,<p>Stephen Lim
Thank you.<br /> <br />- Jess Sie<br /> <a href="mailto:[email protected]" rel="nofollow">[email protected]</a>
Originally posted by Simon See:
Wait a minute, I think Q2 is D. What do you guys think?
I do agree A cannot be ruled out as well![]()
David Gilbert<br />Cragmont Technoloogies<br />Java Programming, Web Services, and System Integration<br />303.517.1297<br />[email protected]
But I have a question - Why is it not possible for the container to initialize the transient fields?
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Originally posted by Lasse Koskela:
Because the bean developer told him not to by declaring those fields as transient? The transient keyword doesn't prevent reinitialization (serialization/deserialization) technically but it does prevent it logically. It's a bit like the "DON'T WIPE THIS!" text on a whiteboard...
The java serialization does reinitialize the trasient fields as well.
Umm. Now you've lost me Pradeep. This is the reason for what? Well, anyway the container could read the state using reflection and store it -- including transient variables -- into a persistent storage for later.I think the reason is beacause the container can use mechanisms other than the Java serialization.
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]