On Wed, 6 Dec 2000, Oleg Nitz wrote:
> con2 = ds2.getConnection();
> ut = ejbContext.getUserTransaction();
> ut.begin();
>
> don't enlist the resource to the transaction, see XAConnectionFactory:
>
>     public Object prepareObject(Object pooledObject) {
>        ...
>             if(tm.getStatus() != Status.STATUS_NO_TRANSACTION) {
>                 ...
>                 trans.enlistResource(res);

        We've covered this in detail before.  Check the archives.  I can't
remember the exact compelling argument, but I think it was challenging to
determine which resources should be associated with a transaction if you
start a transaction after the resources have been started.  Where in the
spec does it insist that you should be able to start a transaction after
accessing a resource and have the transaction apply to the resource?  And
what does it say should be done with work performed on the resource before
the transaction was started?

Aaron


Reply via email to