-
Bug
-
Resolution: Done
-
Major
-
1.0.0-Beta11
-
None
During EJBContainer stop(), the container will wait until all EJB invocation complete before stopping the container. However, the RWLock employed by the EJBContainer does not currently use a fairness policy. This can cause a flurry of new invocations to block shutdown of the container.
Also, the tryLock() used in BlockContainerShutdownInterceptor will not respect the fairness policy of the RWLock.
tryLock(0, TimeUnit.SECONDS), on the other hand, shares the same general behavior as tryLock(), but will respect the fairness policy, i.e. it will immediately return false if some other thread is waiting on the acquisition of a write lock.