If had to actually to thread.sleep (). We are using J2EE, and in some instances BMP. So what happens when you come to write the contents of the bean to the storage system, and you find the bean locked.
We have implemented a locking strategy that tries the write several times, waiting inbetween. Now this could have been done either with a loop ( bad ), JMX Time ( difficult to implement and not always supported ), or with a Thread.currentThread().sleep (); -----Original Message----- From: Jay Wright [mailto:[EMAIL PROTECTED]] Sent: 24 April 2002 05:26 To: [EMAIL PROTECTED] Subject: Thread.sleep() So, can you use Thread.sleep() in an EJB container or even a servlet container? I realize that it's unwise to do threaded programming in these environments, but I'm unclear on whether or not Thread.sleep() is safe or not. More specifically, I wanted to throw it in a Message Driven Bean for some performance testing (simulating long method calls). Jay =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help". =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
