aspose file tools*
The moose likes Distributed Java and the fly likes RMI Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "RMI Problem" Watch "RMI Problem" New topic
Author

RMI Problem

Ramesh Pramuditha Rathnayake
Ranch Hand

Joined: Oct 31, 2012
Posts: 175
    
    1

I have developed a Server software and a Client software using java RMI.
Is there a way to determine whether a client machine has disconnected from the Server machine..??


Ramesh-X
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18657
    
    8

What do you mean by "disconnected"? That concept only means something when the design includes a connection, but normally RMI doesn't require or use one.
Ramesh Pramuditha Rathnayake
Ranch Hand

Joined: Oct 31, 2012
Posts: 175
    
    1

I have send a factory class through server for the clients. Clients can get different objects from that factory and can work with them. If a client shut down the computer without exiting the software(therefore JVM is terminated), how can I recognize that a client has log out..??
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18657
    
    8

I still don't understand the design. You mentioned a factory class, but then you started talking about a client logging out without explaining how the login/logout mechanism worked.
surlac surlacovich
Ranch Hand

Joined: Mar 12, 2013
Posts: 296

Ramesh Pramuditha Rathnayake wrote:I have send a factory class through server for the clients. Clients can get different objects from that factory and can work with them. If a client shut down the computer without exiting the software(therefore JVM is terminated), how can I recognize that a client has log out..??

The explanation is really vague and lacks some details. Anyway, like everywhere in socket communication, you can't be sure if the client still exists until you try to send something to him and get the response back, no response - no client.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: RMI Problem