[
https://jira.jboss.org/jira/browse/JBSEAM-3807?page=com.atlassian.jira.pl...
]
Clint Popetz commented on JBSEAM-3807:
--------------------------------------
Man, too much coffee.
"breaks the use case of applying @Transactional to a method in order to override the
behavior at the class level: "
should read
"breaks the use case of applying @Transactional to a method in order to override the
behavior <i>specified</i> at the class level: "
and that method should be titled "shouldntTryToStartANewTransaction"
Also, I can commit this if you're ok with it.
Transactional Attribute doesn't allow override at method level
--------------------------------------------------------------
Key: JBSEAM-3807
URL:
https://jira.jboss.org/jira/browse/JBSEAM-3807
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.1.1.CR1
Reporter: Clint Popetz
Assignee: Shane Bryzak
Priority: Critical
Attachments: tx-annotation.patch
Shane, the fix to
http://jira.jboss.org/jira/browse/JBSEAM-3519, and in particular part
of this change:
http://fisheye.jboss.com/browse/Seam/trunk/src/main/org/jboss/seam/transa...
private boolean isNewTransactionRequired(Method method, Class beanClass, boolean
transactionActive)
50 105 {
- return isTransactionAnnotationPresent(method) ?
52 - isNewTransactionRequired(method, transactionActive) :
53 - isTransactionAnnotationPresent(beanClass) &&
isNewTransactionRequired(beanClass, transactionActive);
106 + TransactionMetadata metadata = lookupTransactionMetadata(method);
107 + if (metadata.isNewTransactionRequired(transactionActive))
108 + {
109 + return true;
110 + }
111 + else
112 + {
113 + metadata = lookupTransactionMetadata(beanClass);
114 + return metadata.isNewTransactionRequired(transactionActive);
115 + }
54 116
breaks the use case of applying @Transactional to a method in order to override the
behavior at the class level:
@Transactional public class foo {
@Transactional(SUPPORTS) public method shouldntTryToStartANewMethod() { }
}
I''ll attach a patch.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira