Re: need Help in reflect an RMI object




EJP 写道:

fAnSKyer wrote:

I want to reflect an RMI object. and save the values of each variable
using field.

However I can only get the interface of the RMI object.

If I reflect the interface, I can't get the what I need. But I don't
know how to reflect the RMI object.

You can only do that from inside the JVM where the remote object was
exported from, because that's where the variables are, and you need a
reference to the actual object, not to the stub.
Actually how can I get a reference to a actual object?
When I using RMI naming.lookup and I only get a interface..

If you're in another JVM and all you have is the stub, all you can
usefully do is call remote methods on the stub, and you don't need
reflection for that.
I can call remote methods, but what I need is the values for the
variables? Can you tell me how to write a remote methods to get these
Variables? I doubt in this situation I have to use reflect?


Thanks a lot, FanS

.



Relevant Pages

  • Re: need Help in reflect an RMI object
    ... However I can only get the interface of the RMI object. ... If I reflect the interface, I can't get the what I need. ... You can only do that from inside the JVM where the remote object was exported from, because that's where the variables are, and you need a reference to the actual object, not to the stub. ...
    (comp.lang.java.programmer)
  • Send event to specific client
    ... is there a way to send event from the server to specific client? ... remote methods using interface. ...
    (microsoft.public.dotnet.framework.remoting)