Note that there are some explanatory texts on larger screens.

plurals
  1. POFlex blazeds/lcds AMF serialization for transient variables
    primarykey
    data
    text
    <p>I am using LCDS and Flex. When I am sending an object from java to Flex, I donot want to send all the properties. As far as I know, if you do not want to serialize make a variable transient. </p> <p>eg. </p> <pre><code> private transient Date birthDate; public Date getBirthDate(){ return birthDate; } public void setBirthDate(Date val){ birthDate = val; //Some code here. } </code></pre> <p>Now the serialized object should not have birthDate in it. But When I see the AMF logs , the object has the birthDate with value in it.<br> Does serialization looks into code and checks the private variable is transient.( I don't understand how it has access to private property. I am little confused.)<br> Should I mark variable as public. Then getters and setters make no sense and moreover I write some code in setter method. So I need setter. </p> <p>Questions:</p> <ol> <li><p>I read in a book(Enterprise flex with blazeds by Brain Telintelo, Chapter 15) that out of box Blazeds only serializes fileds that have matching getters and setters. If this is the case, will blazeds even bothers to check private property as transient.</p></li> <li><p>Can some body please explain how normal serializtion( not amf serializtion ) takes place and keeps track of private transient variables even though they have public getters and setters.</p></li> <li><p>How do I make a java variable not serialize in Flex/LCDS/BlazeDS environment. </p></li> </ol> <p>I have 50-60 variables in objects and 4 or 5 varibales should not be seriablezed. So writing custion Serializer in such a large objects is a big pain. And another disadvantage I see is hibernate will not be able to use this object if I write my own serializer.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload