Hi, i have searched the web, tried for days to get this to work, but it doesn't. So i really hope someone can help a newbie. 1. A client on a remote machine creates a Person object. 2. The Server needs a reference or something to this object so that it can call methods on it. How can i implement this? I am a newbie so i hope someone can explain this to me. The thing is that when I run the server and client on the same machine it works just fine, but when i put the client on a different machine it doesn't work. Also, the client sucseeds in getting the reference from the server an calling a method wich returns a String.
john smith
Ranch Hand
Joined: Mar 04, 2004
Posts: 75
posted
0
You can't make a reference directly to an object instance in another JVM. To use a remote object you have to serialize the object, send it to the client, marshall it and do whatever you need to do with it. Have a look at Sun's RMI and J2EE tutorials to see the common ways this can be done.
Terje Ro
Greenhorn
Joined: Mar 11, 2004
Posts: 2
posted
0
Ok, i have discovered that i need to use rmi callback to do what i want. The server needs to know where the client is to send a message to it. Does anyone know of a good simple tutorial on this?