-
Sep 24th, 2007, 03:44 PM
#1
Spring RMI - How to pass client proxy to server?
Hi
I was not able to find a solution to the following problem within this forum, even though it had been mentioned in one or another way. Assume this simple example:
SERVER:
interface IServer {
public void connect(IClient client);
}
class Server implements IServer {
public void connect(IClient client) {
client.update(anyValue);
}
}
CLIENT:
interface IClient {
public void update(Object newValue);
}
class Client implements IClient {
public void init(IServer server) {
server.connect(???); // what to put here
}
public void update(Object newValue) {
value = newValue;
}
}
I export the server as seen in many examples with RmiServiceExporter. On the client side I get the proxy for the server using RmiProxyFactoryBean. So far no problems. But what do I replace '???' with? How to get a proxy for the client to pass over to the server?
Thank's for any hint!
paedu
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules