]
RH Bugzilla Integration commented on WFLY-8459:
-----------------------------------------------
Radovan STANCEL <rstancel(a)redhat.com> changed the Status of [bug
@TransactionAttribute should not be inherited per EJB 3.2 spec
---------------------------------------------------------------
Key: WFLY-8459
URL:
https://issues.jboss.org/browse/WFLY-8459
Project: WildFly
Issue Type: Bug
Components: EJB
Environment: JBoss EA P7.0.x
Reporter: Stuart Douglas
Assignee: Stuart Douglas
Fix For: 11.0.0.Beta1
It appears that JBoss EAP behaves as the *@TransactionAttribute* attribute was
inherited.
For example if I have a bean A that
{noformat}
@Stateless
@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
public class ABean extends Base{
public void foo(){ . . .}
}
{noformat}
and a supper class
{noformat}
@TransactionAttribute(TransactionAttributeType.SUPPORTS)
public class Base {
@TransactionAttribute(TransactionAttributeType.NEVER)
public void foo(){ . . }
public void bar(){ . . .}
}
{noformat}
and if I call each method
{noformat}
beanA.bar();
beanA.foo();
{noformat}
I would expect to see *bar()* without an active transaction and *foo()* with an active
transaction
but what I see is that both method have no active transaction. This seems like spec
violation since the *@TransactionAttribute* are not supposed to be inherited.