kryonet icon indicating copy to clipboard operation
kryonet copied to clipboard

ObjectSpace warns on remote invocation if multiple object-spaces are registered to a connection.

Open gretchenfrage opened this issue 6 years ago • 4 comments

ObjectSpace will warn: "Ignoring remote invocation request for unknown object ID" every time it receives a remote method invocation for an object on a different object space on the same connection. (I am using multiple object spaces on the same connection because I need them to have different execution contexts.)

gretchenfrage avatar Jul 28 '17 04:07 gretchenfrage

Did you register your object with all of your used object spaces before invoking the objects methods?

crykn avatar Aug 11 '17 18:08 crykn

No, I only register the object on the object space it's intended to be invoked on. If I registered it with all object spaces, how would the invocation be applied on the correct object space? (If I sounds hostile, I'm not trying to)

gretchenfrage avatar Aug 13 '17 23:08 gretchenfrage

The phrase "with all of your used object spaces" was referencing the "on a different object space on the same connection" part in your initial post. You need to register the object, which should get invoked remotely, on its local object space with an unique id: objectSpace.register(id, object). And on the other side you can get an instance of the object via the previously defined ID and the connection to the other endpoint: SomeObject object = ObjectSpace.getRemoteObject(connection, id, SomeObject.class). If you need a more in-depth example you can take a look a this one: chatrmi

crykn avatar Aug 14 '17 16:08 crykn

@gretchenfrage Please provide an executable example that shows the problem. http://sscce.org/

NathanSweet avatar Nov 09 '17 03:11 NathanSweet