2
votes

I'm using JBoss AS 7.1.1.Final "Brontes" and encountering a long running method call in a @Stateless-Bean which is cancelled after 5 Minutes:

[com.arjuna.ats.arjuna] (Transaction Reaper) ARJUNA012117:
                        TransactionReaper::check timeout

Searching for this issue I've found some answers Jboss 7.1 ejb 2.1 custom transaction timeout configuration and wikis JBoss-AS7 reference guide or JBoss Wiki.

The answer seems to be simple: Annotate the method with @TransactionTimeout But: This class is not available in my classpath! I have a Maven project with an EAR structure and the ejb module has the following relevant dependencies which I use in several projects with heavy usage of EJB3:

  • org.jboss.spec.javax.ejb:jboss-ejb-api_3.1_spec (provided)
  • javax.enterprise:cdi-api (provided)
  • org.hibernate.javax.persistence:hibernate-jpa-2.0-api (provided)
  • org.hibernate:hibernate-validator (provided)

Which dependency is missing?

2

2 Answers

10
votes

Try this one; it took some pretty serious searching to unearth it, but it seems like it should work:

<dependency>
    <groupId>org.jboss.ejb3</groupId>
    <artifactId>jboss-ejb3-ext-api</artifactId>
    <version>2.0.0</version>
    <scope>provided</scope>
</dependency>

GitHub:

I think that the one Petr found is the older one (originally for JBoss 4.2.x); as Thor mentioned, it doesn't include the unit parameter, and may not work with AS7.

A humble suggestion for whomever updates the JBAS7 EJB reference guide; maybe the Maven details for @TransactionTimeout could be included?

0
votes

Did you try

jboss-annotations-ejb3

It should work with this one