Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

container should throw EJBException during timeout callback method?

 
Himai Minh
Ranch Hand
Posts: 1361
7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In table 23 and 24 on p. 394 of JSR 318,

Container's action when a system exception is thrown from timeout callback:
1. log the exception or error
2. Rollback the transaction
3. discard the bean

In this quote, it does not say the container will throw any EJBException at all when a system exception occurs in timeout callback.

However, on p.396,

In the case where the container fails to start/commit a CMT on behalf of a message driven bean or a timeout callback method, the container
must throw and log EJBException.

In this quote, it says the container will throw EJBException when a system exception(the exception of failure to start/commit the transaction) occurs in timeout callback.

Which quote is true?
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2536
113
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Both are true.

The difference is that the EJBException (in 14.3.10) is thrown from the Containers Transaction Manager when the Transaction Manager has a problem. This has nothing to do with the system exception thrown from timeout callback.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic