[JINI] Remote Object State Update

Hi

I know this is not the right forum as I am using JINI technology, but I think my question is related to underlying RMI structure.

I have a service that offers various methods. Once I discovery and get a remote service interface, I can actually use my methods but I have noticed that all the changes to the remote state are not being propagated to remote instance of my objects. I.E. when I use another client to get the reference, I always start with the "initial" state so I think all the methods invocation are local and not remote (or the state doesn't get updated)

Do you know what methods I should use to update state correctly?

[662 byte] By [Taglia81a] at [2007-11-26 18:53:26]
# 1
If the object is an exported remote object and all clients have stubs corresponding to the same instance then all clients will see all state updates.I suggest that one of these conditions isn't true in your case.
ejpa at 2007-7-9 6:27:27 > top of Java-index,Core,Core APIs...
# 2

Thank you for your reply. I've found the error.

I was registering the service object itself and not its stub

_item = new ServiceItem(_serviceID, _service, _info);

Changed to

_item = new ServiceItem(_serviceID, UnicastRemoteObject.toStub(_service), _info);

And now it works :)

Taglia81a at 2007-7-9 6:27:27 > top of Java-index,Core,Core APIs...