Hmmm - I'm still not on board.
On Mon, 22 May 2000, Rickard [iso-8859-1] �berg wrote:
> > 1) create
> > 2) start()
> > 3) do work
> > 4) end()
>
> At which point this connection can be returned to the pool.
Okay, let's say the connection is returned to the pool. Didn't
you just lose all your work? After all, you executed a bunch of SQL
statements but never called commit or rollback on the connection, and now
it's available for someone else to use!
> > 5) prepare()
> > 6) commit()
>
> The devil is in the details. Look in XAResource and you will see that
> both prepare commit and rollback is called with the tx Xid. Because of
> this the connection in 1-4 and 5/6 doesn't have to be the same. It can
> be a different one. After end() it is not associated with a tx anymore.
Now I'm REALLY confused. You call commit in step 6 and get a
different connection? So what work are you committing? If all the work
was done on a different connection, there's no work to commit - or worse
yet, you're committing someone else's work!
Do you see why I'm confused?
Aaron