According to the J2EE specification ver 1.3 section 6.2.1 regarding the use of threads in an EJB:
"If enterprise bean were allowed to manage threads, the J2EE platform could not manage the lifecycle of the enterprise bean and it could not properly manage transactions."
And in J2EE specs version 2.0,
"An enterprise Bean must not use thread synchronization primitives to synchronize execution of multiple instances."
"Synchronization would not work if the EJB Container distrbuted enterprise bean's instances across multiple JVMs."
I wonder whether a harmless invocation Thread.sleep(1000) to simulate a delay could affect the lifecycle of an EJB component. I would think that the above statements means explicit synchronisation of the access of object/resource would not work in a cluster multi-machine environment.
Does that mean Thread.sleep() is ok since it does not entails synchronization to a resource.