September 2010
Intermediate to advanced
766 pages
18h 35m
English
When a bean calls createTimer(), the operation is performed in the
scope of the current transaction. If the transaction rolls back, the timer
is undone and it’s not created (or, more precisely, it’s
uncreated).
In most cases, the timeout callback method on beans should have a
transaction attribute of RequiresNew.
This ensures that the work performed by the callback method is in the
scope of container-initiated transactions. Transactions are covered in
more detail in Chapter 17.