Re: XADataSource interface
От | Heikki Linnakangas |
---|---|
Тема | Re: XADataSource interface |
Дата | |
Msg-id | Pine.OSF.4.61.0510302111470.179385@kosh.hut.fi обсуждение исходный текст |
Ответ на | Re: XADataSource interface (Kris Jurka <books@ejurka.com>) |
Ответы |
Re: XADataSource interface
|
Список | pgsql-jdbc |
On Sat, 29 Oct 2005, Kris Jurka wrote: > On Tue, 25 Oct 2005, Heikki Linnakangas wrote: > >> I posted an updated version of the XADataSource implementation few weeks >> ago, but haven't received any comments: >> > > Dave has committed this and I've made some further integration fixes to it, > but some of the tests you've provided fail with the attached errors. I don't > know much about XA, so I wanted to run some potential fixes by you guys > first. Thoughts? It seems I forgot to run the tests myself before submitting, sorry about that... The test failure at testOnePhase was caused by the inverted equals test you already noticed and fixed in your patch. The failures at testRecover and testRollback were because PGXAConnection.rollback method called Xid.equals with null argument. I added a null-check for that, see attached patch. I didn't understand this part of your patch: -------------------------------------------------------------------------- diff -c -r1.2 PGXAConnection.java *** org/postgresql/xa/PGXAConnection.java 29 Oct 2005 18:59:39 -0000 1.2 --- org/postgresql/xa/PGXAConnection.java 29 Oct 2005 19:05:09 -0000 *************** *** 172,178 **** throw new PGXAException(GT.tr("Prepare called before end"), XAException.XAER_INVAL); state = STATE_IDLE; ! currentXid = null; if (!conn.haveMinimumServerVersion("8.1")) throw new PGXAException(GT.tr("Server versions prior to 8.1 do not support two-phase commit."), XAException.XAER_RMERR); --- 172,178 ---- throw new PGXAException(GT.tr("Prepare called before end"), XAException.XAER_INVAL); state = STATE_IDLE; ! // currentXid = null; if (!conn.haveMinimumServerVersion("8.1")) throw new PGXAException(GT.tr("Server versions prior to 8.1 do not support two-phase commit."), XAException.XAER_RMERR); -------------------------------------------------------------------------- Why is that? It looks wrong to me. - Heikki
Вложения
В списке pgsql-jdbc по дате отправления: