I am trying to send the object from one web application to another web application. Current both applications are in same server, future might be in different servers. Data is more than 5000+ fields. It should work with out effecting performance.
1. Object serialization This would require that the object and all "fields" represent Serializable objects or primitives - AND - that both web applications have identical code for the class. Advantage, easy to program, see java.io.ObjectOutputStream.
2. Output as an XML document containing everything needed to rebuild the object. Disadvantage - tedious to program, slower than 1; Advantage - intermediate XML can be read and verified as text.