• Post Reply Bookmark Topic Watch Topic
  • New Topic

container should throw EJBException during timeout callback method?

 
Himai Minh
Ranch Hand
Posts: 1400
8
  • 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
Posts: 2781
174
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.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!