[libpostgresql-jdbc-java] 02/09: Always specify an XA error code when creating an XAException. Otherwise a transaction manager won't know what to do with the error and may have to asssume the worst.

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Mon Jan 9 10:20:47 UTC 2017


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to tag REL8_3_606
in repository libpostgresql-jdbc-java.

commit aa76803520f3ef81cf0c2d7b7ff02aa18e72d511
Author: Kris Jurka <books at ejurka.com>
Date:   Wed Dec 23 20:57:05 2009 +0000

    Always specify an XA error code when creating an XAException.
    Otherwise a transaction manager won't know what to do with the error
    and may have to asssume the worst.
    
    Patch by Heikki Linnakangas, analysis by Justin Bertram.
---
 org/postgresql/xa/PGXAConnection.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/org/postgresql/xa/PGXAConnection.java b/org/postgresql/xa/PGXAConnection.java
index c4b6167..16bc46e 100644
--- a/org/postgresql/xa/PGXAConnection.java
+++ b/org/postgresql/xa/PGXAConnection.java
@@ -441,7 +441,7 @@ public class PGXAConnection extends PGPooledConnection implements XAConnection,
         }
         catch (SQLException ex)
         {
-            throw new XAException(ex.toString());
+            throw new PGXAException(GT.tr("Error committing prepared transaction"), ex, XAException.XAER_RMERR);
         }
     }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/libpostgresql-jdbc-java.git



More information about the pkg-java-commits mailing list