Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gretchenfrage opened this issue Jul 28, 2017 · 4 comments

Comments

@gretchenfrage
Copy link

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.)

@crykn
Copy link

crykn commented Aug 11, 2017

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

@gretchenfrage
Copy link
Author

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)

@crykn
Copy link

crykn commented Aug 14, 2017

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

@NathanSweet
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants