using a Thread.sleep() in a MDB (inMDB or Stateless bean)
843830Oct 17 2005 — edited Oct 19 2005Hi,
I have seen some of the previous threads about calling the Thread.sleep() within an EJB. They all seem to say that its a bad idea to do so.
But since Sateless Session Beans (and MDBs) are not passivated, I dont see why calling a Thread.sleep() would be harmful ?
I need to make a method in an MDB to keep checking the DB for an event at regular intervals. And to reduce the DB-lookup overhead, I I have to use Thread.sleep() between the DB-lookups.
So, Is calling Thread.sleep() is a bad idea (i.e in a MDB or stateless bean)?
Thanks.