2

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?

Community
  • 1
  • 1
Thor
  • 6,607
  • 13
  • 62
  • 96

2 Answers2

10

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?

sumitsu
  • 1,481
  • 1
  • 16
  • 33
0

Did you try

jboss-annotations-ejb3

It should work with this one

Petr Mensik
  • 26,874
  • 17
  • 90
  • 115
  • I'm nur sure if this is correct class (`org.jboss.annotation.ejb.TransactionTimeout`) in `jboss:jboss-annotations-ejb3:4.2.3.GA`. `@TransactionTimeout(value=1)` does not have any effect (still timeout 5min), also the described parameter _unit_ is not available. – Thor Jan 23 '13 at 08:13
  • 1
    http://stackoverflow.com/questions/2184844/jboss-transaction-timeout-setting - try this settings in `transaction-jboss-beans.xml` and see if its working. – Petr Mensik Jan 23 '13 at 09:00