Guys, I've uploaded some changes related to the "AccessTimeout" and "ConcurrentAccessTimeoutException"...
(Stateful) https://issues.apache.org/jira/browse/OPENEJB-1144 (Singleton) https://issues.apache.org/jira/browse/OPENEJB-1151 ... But I still have a questionabout the exception thrown by the server. Check the test code below... ************************************************* [StatefulConcurrencyTest] public void testConcurrentMethodCall() throws Exception { InitialContext ctx = new InitialContext(); MyLocalBean bean = (MyLocalBean) ctx.lookup("MyLocalBeanImplLocal"); MyLocalBean bean2 = (MyLocalBean) ctx.lookup("MyLocalBeanImplLocal"); Thread runThread = new Thread(new CallRentrantThread(bean, 3000)); runThread.start(); try { bean2.callRentrant(bean, 0); assertTrue(false); } catch (Exception e) { assertTrue(e.getCause() instanceof ConcurrentAccessTimeoutException); } } ************************************************* [SingletonConcurrencyTest] public void testConcurrentMethodCall() throws Exception { InitialContext ctx = new InitialContext(); final MyLocalBean bean = (MyLocalBean) ctx.lookup("MyLocalBeanImplLocal"); bean.callRentrantRead(ctx, 1000); bean.callRentrantWrite(ctx, 1000); Thread startRun = new Thread(new CallRentrantWriteThread(ctx, 5000)); startRun.start(); try { bean.doNothingRead(0); assertTrue(false); } catch (ConcurrentAccessTimeoutException e) { assertTrue(true); } } ************************************************* The ConcurrentAccessTimeoutException thrown by the StatefulContainer is wrapped by another Exception, while the same ConcurrentAccessTimeoutException is thrown directly by the SingletonContainer. Question: Which one is thrown correctly? []s, Thiago.
