File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Threads and Synchronization and the fly likes Thread Object Confusion Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "Thread Object Confusion" Watch "Thread Object Confusion" New topic
Author

Thread Object Confusion

raj varma
Greenhorn

Joined: Jan 05, 2003
Posts: 29
Hello all,
I have developed 1 server application where all client connects.Server keeps record thier login time and logout time.
For each client connection to server, ananymous runnable thread object is created which serve the client indpendently.
When 2 client connects the server at the same time, two different records with same login time is created Here up to all works well, but when these two client logout at the SAME time ,only one record is updated with logout time and not the other.
How do I solve the problem ?
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
Originally posted by raj varma:
How do I solve the problem ?
You don't give enough information by far, unfortunately. Specifically, you say almost nothing about that record which you keep. For all I know you could be using the time as the primary key in a database.
- Peter
 
 
subject: Thread Object Confusion
 
Threads others viewed
what does mean RMI cannot guarantee a client will always use the same thread in consecutive call?
Session Invalidate in WAS
RMI, threads, locking unlocking records
Related to ServerSocket
How to prevent user from login in more than one session at the same time?
IntelliJ Java IDE

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture