Hide Forgot
Describe the issue: JBoss-specific extensions to the EJB 3.1 specification should be documented. There is for example the possibility to assign an EJB a particular transaction timeout. Suggestions for improvement: Add instructions how to assign a transaction timeout. It is done through the @org.jboss.ejb3.annotation.TransactionTimeout annotation, which can be added either to an EJB class (then it applies to all its methods), or a method (then it applies to this method only and overrides the effect of a @TransactionTimeout added to a class). Also, this only works for EJBs which use Container-managed transactions. Example: @Stateless @TransactionTimeout(value = 5, unit = TimeUnit.SECONDS) @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) public class HelloBean implements HelloBeanRemote { @TransactionTimeout(value = 1, unit = TimeUnit.SECONDS) public String method1() { return "This method must not take more than 1 second"; } public String method1() { return "This method must not take more than 5 seconds"; } } Also please mention that the @TransactionTimeout annotation is part of the JBoss EJB3 external API and must be added as a dependency, with Maven you can do it this way: <dependency> <groupId>org.jboss.ejb3</groupId> <artifactId>jboss-ejb3-ext-api</artifactId> <version>2.1.0</version> </dependency>
*** This bug has been marked as a duplicate of bug 1139905 ***