Strange "cache" effect between client and server
- by mark
I use a Socket-based connection between Client and server with ObjectOutputStream.
The objects serialized and exchanged have this structure:
public class RichiestaSalvataggioArticolo implements Serializable {
private ArticoloDati articolo;
public RichiestaSalvataggioArticolo(ArticoloDati articolo) {
this.articolo = articolo;
}
@Override
public void ricevi(GestoreRichieste gestore) throws Exception {
gestore.interpreta(this);
}
public ArticoloDati getArticolo() {
return articolo;
}
}
the issue is that when I try to exchange messages between C/S with incapsulated content very similar (ArticoloDati whom differ only in 2 fields out of 10), the Client sends an ArticoloDati, but the Server receives the previous one.
Does the ObjectOutputStream implement some kind of cache or memory between the calls, that fails to recognize that my 2 objects are different because they are very similar?