-
1. Re: EJB3 and Timeout.
marcelkolsteren Aug 7, 2007 5:29 PM (in response to jc7442)The timeout specified in jboss.xml is only used if the EJB3 container needs to create a new transaction when the method in the session bean is called. A new transaction is only created in the following two cases:
- the transaction attribute is Required and there is no transaction running
- the transaction attribute is RequiresNew
The transaction attribute is Required by default, but can be overriden in the ejb-jar.xml (<container-transaction> element) or with the @TransactionAttribute annotation.
In your application, probably a transaction is started with the default timeout when the MDB's onMessage method is invoked, and that same transaction is used by your session bean. -
2. Re: EJB3 and Timeout.
jc7442 Aug 7, 2007 6:03 PM (in response to jc7442)In my case all transaction are required. Tra,saction is open by the container for the MDB but timeout for messagen driven seems not to be used.
I move to bean managed transaction for my MDB and I set the timeout before beginning the transaction. It works fine and it solve another problem that I have, the message was redelivered when the MDB was in progress.