Hi,
I'm just jumping around RMI classes till I get my programming assignment.
I've a doubt regarding the handling of CallBack or Broadcast mechanisms in RMI client server environment. I can always inform (pass a message) to server from client but when it comes to the server to inform something to client, my thread slows down
e.g. If I want to broadcast a message "server going down" to all the clients connected to it. Basically I'm looking for a mechanism of calling a client's method from server by passing some message object.
I couldn't find a definitive, commonly used approach for this. I finally implemented a thread mechanism in which a client thread is constantly locked into the Server till some message appears in the server Q for broadcasting. And then the method returns to client with the message and then again gets locked with server. But then it was getting complex and risky with all the use-cases coming together.
Instead I'm more interested in knowing if there is any traditional, more sophisticated mechanism already available in Java RMI world?
I browsed though the SCJD topics but couldn't find anything which is classical.
Thanks in advance,
Swapnil
I'm just jumping around RMI classes till I get my programming assignment.
I've a doubt regarding the handling of CallBack or Broadcast mechanisms in RMI client server environment. I can always inform (pass a message) to server from client but when it comes to the server to inform something to client, my thread slows down
e.g. If I want to broadcast a message "server going down" to all the clients connected to it. Basically I'm looking for a mechanism of calling a client's method from server by passing some message object.
I couldn't find a definitive, commonly used approach for this. I finally implemented a thread mechanism in which a client thread is constantly locked into the Server till some message appears in the server Q for broadcasting. And then the method returns to client with the message and then again gets locked with server. But then it was getting complex and risky with all the use-cases coming together.
Instead I'm more interested in knowing if there is any traditional, more sophisticated mechanism already available in Java RMI world?
I browsed though the SCJD topics but couldn't find anything which is classical.
Thanks in advance,
Swapnil