This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Ok so I'm almost done with this thing but I've hit a little bit of a road block. My locking mechanism works great, except during the shutdown process. I've tried several things and still end in dead lock or other errors. I'm using the wait() method to handle client requests and timers to dispose of stale locks. When the server calls lock(-1) and encounters a lock, it of course hits wait(). This causes the server thread to stop(well, they are waiting) the timers, and the locks never die. I've tried doing something like
but this creates odd errors. First of all, when I attempt to shut the DB down with no locks on it, it only locks a seemingly random number of records. Second, whenever it encounters a lock( and a wait() request ), the thread simply dies. Any ideas here? I had another thought about creating a administrator client that would be used to lock the database, but wonder if I'll get docked points for the work around as I would have two programs running for the server. Any thoughts would be helpful Thanks [ April 11, 2002: Message edited by: Adam Roberts ]
Adam Roberts - SCJP2, SCJD<br />insert witty something here