BlazeDS will not serialize a property unless it has both a receiver and a setter. However, many of my Java properties are read-only. So now I have to add setters to support the Unmarshalling process. If any of the users of these domain objects starts calling these setters on their own, it will break the semantics of the value-object of these things and will probably cause all kinds of system problems.
I had to do a lot in the past to support some aspects of JPA and never liked it. This is because we add JPA annotations to properties and not to private fields (to avoid another problem).
Besides using Javadoc to warn yourself and others, what does a programmer do?
Edit: I have to add that these additional setters are NOT part of the open interface that these objects implement .... but they are still there nonetheless.
source
share