EJB usually creates timer within a transaction so if any transaction is rolled back, the timer creation is also rolled back immediately. Similarly if a bean cancels a timer within a transaction that gets rolled back, the timer cancellation is rolled back. In this case, the timer's duration is reset as if the cancellation has never occurred.
If Bean uses container-managed transactions then ejbTimeout method usually has the RequiresNew transaction attribute so as to preserve integrity of transactions with this attribute, EJB container begins the new transaction before calling ejbTimeout. If the transaction is rolled back, the container tries to call ejbTimeout at least one more time.