with Required attribute - means its CMT, context.setRollbackOnly - it can be done only with BMT, so illegalStateException raised, bean instance discareded
But if you used REQUIRED attribute here, and if the transaction is rolledback, the timer will be implicitly canceled with transaction rollback. So, if you used this timer to complete some periodic tasks, further invocations on that will not be done.
An enterprise bean typically creates a timer within the scope of a transaction. If the transaction is then
rolled back, the timer creation is rolled back.
An enterprise bean typically cancels a timer within a transaction. If the transaction is rolled back, the
container rescinds the timer cancellation.
The timeout callback method is typically has transaction attribute REQUIRED or REQUIRES_NEW
(Required or RequiresNew if the deployment descriptor is used to specify the transaction
attribute). If the transaction is rolled back, the container retries the timeout.
Note that the container must start a new transaction if the REQUIRED (Required) transaction
attribute is used. This transaction attribute value is allowed so that specification of a
transaction attribute for the timeout callback method can be defaulted.