commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Hammant <Paul_Hamm...@yahoo.com>
Subject AltRMI - serialization issue.
Date Wed, 16 Jan 2002 12:00:11 GMT
Folks,

For the following class ...

  Person {
    private String name;
    public void setName(String name) { this.name = name; }
    public String getName() { return name; }
  }

... If it is sent over an ObjectStream to a client from a server, then 
has it's name changed on the server with setName() and sent again, the 
client cannot see the name change.  The reason is that the ObjectStream 
makes an 'optimization' and decides that the person object does not need 
to be deserialized a second time because it already has it.  The issue 
is fixed by hitting reset() after each write of Object, but this halves 
performance, probably I guess because the reset() has to be communicated 
to the client at that time.  A resetDelay() might be nice.

To solve the issue I'm going to have to write a cut-down equivalent to 
ObjectStream that makes no such optimzations.  It would be implemented 
as yet another transport (the transports themselves are as invisible as 
possible to the user).

If anyone has time and interest, it would be nice to get some help for this.

I'm also looking to make adaptors for AltRMI so that it can be used in 
JNDI.  For those that are interesed -> 
http://java.sun.com/products/jndi/tutorial/objects/storing/remote.html 
is a good starting point.

Regards,

- Paul H


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message