Ole Husgaard wrote:
OH> jBoss CVS Development wrote:
>> 
>>   User: oleg
>>   Date: 00/10/02 08:42:09
>> 
>>   Modified:    src/main/org/jboss/tm TxCapsule.java
>>   Log:
>>   BugFix: on rollback beforeCompletion() was not invoked for registered 
>Synchronizations

OH> As I read the JTA specification, this is by design and not a bug.

OH> From JTA 1.0.1 specification section 3.3.2:
OH> "The Synchronization.beforeCompletion method is called prior to
OH> the start of the two-phase transaction commit process. This call
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OH> is executed with the transaction context of the transaction that
OH> is being committed."

OH> Have I misunderstood something?
Maybe it was I who misunderstood something.
In my view the underlined phrase above shouldn't be treated as
"Transaction.commit() call".
The method is called "beforeCompletion", not "beforeCommit", right?
Let's read section 5, subsection "Interface Synchronization",
method beforeCompletion:
"The beforeCompletion method is called by the transaction manager
prior to the start of the transaction completion process. This call is
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
executed with the transaction context of the transaction that is being
committed."

Now in section 3.3.3 we read:
"3.3.3 Transaction Completion
The Transaction.commit and Transaction.rollback methods allow the
target object to be committed or rolled back."

Thus, this way of reading the specification lead us to the conclusion
that beforeCompletion() should be called before rollback().
As for me, it is more natural interpretation.
Other opinions?

Best regards,
 Oleg 



Reply via email to