What steps will reproduce the problem? 1. Use some transient fields in JSF view scope bean. 2. Call another bean method using pram with that object from JSF. 3. The object instant is null as parameter.
What is the expected output? What do you see instead? sticky is working fine so I am thinking non-sticky will also work but getting null object.
What version of the product are you using? On what operating system?
Please provide any additional information below.
Comment #1
Posted on Nov 23, 2014 by Grumpy BearI don't fully understand the issue (too little information), but I'd say that it's expected that transient fields are not initialized after deserialization. If you want that field to be (de)serialized then make it not transient.
Comment #2
Posted on Nov 23, 2014 by Happy LionThanks for your response!
The scenario is, I have some transient properties in my controller which are bind with JSF page . My target is reduce CPU and IO usages. The things are working fine on following cases 1. If I don't configure "memcached-session-manager" with that application. 2. If I configure "memcached-session-manager" with sticky="true"
But when I am changing configurations from sticky="true" to sticky="false" then I am getting all of the transient variable / properties null in reference functions which is calling from JSF page.
Could you please advise me in details, I am expecting similar behavior for sticky and non-sticky about transient variable.
Comment #3
Posted on Nov 23, 2014 by Grumpy BearOn deserialization you need to initialize your transient variables. So it depends on the serialization strategy how to achieve this.
Comment #4
Posted on Nov 23, 2014 by Happy Lionfor your information I am initialize all of the transient variable in @PostConstruct otherwise sticky session was not work perfectly.
Comment #5
Posted on Nov 23, 2014 by Grumpy BearAs already said, you want to initialize your transient fields on deserialization. Assuming that you're using java serialization read the docs: https://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html
Status: New
Labels:
Type-Defect
Priority-Medium