[jboss-dev-forums] [Design of EJB 3.0] - JBAS-4489 - Suspending Incomplete BMT transactions
adrian@jboss.org
do-not-reply at jboss.com
Tue Jun 19 08:52:27 EDT 2007
http://jira.jboss.com/jira/browse/JBAS-4489
I see you were already suspending incomplete transactions,
which means you had already seen and resolved the problem.
I think there is still an issue that you should be throwing an exception
for the incomplete transaction, otherwise the caller isn't going to know it failed!
The real problem is that my test is broken, it doesn't assert that it actually
got the expected exception. It should be something like:
| public void testTxTimeout()
| {
| + boolean gotException = true;
| BMTCleanUp remote = (BMTCleanUp) sessionCtx.getEJBObject();
| try
| {
| remote.doTimeout();
| }
| catch (EJBException expected)
| {
| // expected
| expected.printStackTrace();
| + gotException = true;
| }
| + if (gotException == false)
| + throw new EJBException("Did not get expected exception for incomplete transaction");
| checkTransaction();
| remote.doNormal();
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055598#4055598
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055598
More information about the jboss-dev-forums
mailing list