I have a question about worker threads that I am a bit perplexed on. I'm using sockets for my network implementation. Here's my question: have a hashmap in my data's lock method that first checks to make sure the current
thread does not already 1) hold a lock on the called record or 2)already hold a lock on some record. However, if I use worker threads, I don't think it'll work. In my MainUIWindow under the action listener for the book method, I have this:
Everytime the book button is clicked a brand new thread is spawned to perform book and then refresh the JTable. For one, with my GUI, once a row is booked with a customerid, the book button becomes disabled, however I wonder if Sun will
test outside of that. So am I approaching this correctly? Do I need to figure out something else to use for a map value? Here's my current code:
I don't mean to be repetitive, as this goes along with my other
post. Thanks guys. I appreciate it!
[ January 13, 2005: Message edited by: Daniel Simpson ]