Is @TransactionAttribute(TransactionAttributeType.XXXXX) allowed at Interface level?
Issue
- We are migrating our application for JBoss 4.2 to JBoss EAP 7.0, The application code use sessionCtx.isRollbackOnly() which work in 4.2
EAP 7 give the following error:
ERROR java.lang.IllegalStateException: WFLYEJB0174: getRollbackOnly() not allowed without a transaction.
ERROR at org.jboss.as.ejb3.component.EJBComponent.getRollbackOnly(EJBComponent.java:312)
ERROR at org.jboss.as.ejb3.component.session.SessionBeanComponent.getRollbackOnly(SessionBeanComponent.java:100)
ERROR at org.jboss.as.ejb3.context.EJBContextImpl.getRollbackOnly(EJBContextImpl.java:90)
ERROR at org.jboss.as.ejb3.context.SessionContextImpl.getRollbackOnly(SessionContextImpl.java:133)
- TransactionAttribute at Bean class level is overridden if a business interface is used with a different annotation
- Is is allowed and conform to the specificatation to add Transaction annotations at interface level for remote or local interfaces?
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.x
- 7.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
