Java singleton VO class implementing serializable, having default values using getter methods
- by user309281
Hi All
I have a J2SE application having user threads running in a separate JVM outside JBOSS server.
During startup, J2SE invokes a EJB inside jboss, by passing a new object(singleton) of simple JAVA VO class having getter/setter methods. {The VO class is a singleton and implements serialiable(as mandated by EJB)}.
EJB receives the object, reads all db configuration and uses the setter methods of new object to set all the values. It then returns back this updated object back to J2SE in the same remote call.
After J2SE receives the object(singleton/serializable), if i invoke getter methods, I could see only default values set during object creation before EJB call, and not the values set by the EJB.
Kindly throw some light on, why the received object from EJB does not see any updated values and how to rectify this.
I believe it got to do with object initialization during deserialization. And i tried overriding readResolve() in the VO class, but of no help.
With Regards,
Krishna