Hi
I am trying to get two or more threads waiting to access a singleton method to either:
1. block indefinitely until forward progress can proceed.
It blocks
thread 2, but when Thread 1 is done, thread 2 does not resume(i.e. step 3 below does not resume). why?
2. concurrent access is not permitted.
It throws javax.ejb.ConcurrentAccessTimeoutException but I cannot get Thread 2 to rollback(i.e. step 3 below does not rollback). why?
Can anyone perhaps point to example that will help me achieve at least one of the following?
1. block indefinitely until forward progress can proceed.
It blocks thread 2, but when Thread 1 is done, thread 2 does not resume(i.e. step 3 below does not resume).
2. concurrent access is not permitted.
It throws javax.ejb.ConcurrentAccessTimeoutException but I cannot get Thread 2 to rollback(i.e. step 3 below does not rollback).
Here is some code to give perspective to my problem: