[
http://jira.jboss.com/jira/browse/JBSEAM-1821?page=comments#action_12372990 ]
Chris Rudd commented on JBSEAM-1821:
------------------------------------
What about it isnt good practice? Its not eating the error, its just makeing sure that the
transaction is properly ended when one occurs. This is essential when running suites of
tests, as you dont want one failed test to cause all subsequent tests to also fail because
it didnt properly clean up after itself.
At the verly least the BaseSeamTest should handle making sure there arent any open
transactions as part of its afterMethod processing.
I thought the whole point of CMT was to delegate the management of the transactions off to
the contianer, this class is emulating CMT for Pojo seam components, so i would assume
that it would follow the same constructs.
util.Work class does not properly handle java.lang.Errors when they
are thrown
------------------------------------------------------------------------------
Key: JBSEAM-1821
URL:
http://jira.jboss.com/jira/browse/JBSEAM-1821
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.0.0.BETA1
Reporter: Chris Rudd
The util.Work class that manages transactions does not properly handle the case where a
java.lang.Error is thrown.
When a java.lang.Error is thrown the transaction is not properly cleaned up, due to the
catch block only catching Exceptions. Please add the following additional catch block :
Work.javal line 55
catch( Error e )
{
if( begin )
{
log.debug("rolling back transaction");
userTransaction.rollback();
}
throw e;
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira