[jboss-jira] [JBoss JIRA] (WFLY-8459) @TransactionAttribute should not be inherited per EJB 3.2 spec

Stuart Douglas (JIRA) issues at jboss.org
Tue Mar 28 18:45:00 EDT 2017


     [ https://issues.jboss.org/browse/WFLY-8459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stuart Douglas moved JBEAP-9965 to WFLY-8459:
---------------------------------------------

              Project: WildFly  (was: JBoss Enterprise Application Platform)
                  Key: WFLY-8459  (was: JBEAP-9965)
             Workflow: GIT Pull Request workflow   (was: CDW with loose statuses v1)
          Component/s: EJB
                           (was: EJB)
    Affects Version/s:     (was: 7.0.4.GA)


> @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
>
> 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.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list