Strange "cache" effect between client and server
Posted
by
mark
on Stack Overflow
See other posts from Stack Overflow
or by mark
Published on 2012-10-13T21:31:08Z
Indexed on
2012/10/13
21:36 UTC
Read the original article
Hit count: 174
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?
© Stack Overflow or respective owner