what should the architecture look like?

hi all,

I am about the build a multi client application using RMI. I am not going to explain all the details but it will be something like:

think about a server which all clients will try to connect in the first place. this will be a class, implementing a remote interface and accepting connections via RMI. after a client connects to the server, how do you think the server should communicate with the client back using RMI?

I thought, if I can generate a stub(object) in the client-side (the client itself will act like a server actually) and pass this stub to the server by invoking a remote method from server and so the server will be able to invoke methods from the clients.

how does it sound? is there better method, do you think.

(note: once I implemented the idea above, and it worked well, unfortunately it is not working now :) but I will make it work soon, I guess.)

thanks in advance.

[940 byte] By [jelaloa] at [2007-11-27 6:54:25]
# 1
So you want the clients to be servers? that process requests from the initial 'server'? because that's the implication of what you're asking. Why do you want to do this?
ejpa at 2007-7-12 18:29:26 > top of Java-index,Core,Core APIs...
# 2
The technique for which you are asking is called "callback", and is mentioned extensively in this forum. However ejp asks a good question: Why you want to do this.
bschauwejavaa at 2007-7-12 18:29:26 > top of Java-index,Core,Core APIs...