This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Getting MEAN with Mongo, Express, Angular, and Node and have Simon Holmes on-line!
See this thread for details.
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


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
Sheriff

Joined: Oct 14, 2005
Posts: 19528
    
  10

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
Sheriff

Joined: Oct 14, 2005
Posts: 19528
    
  10

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RMI Problem