[libpostgresql-jdbc-java] 02/05: 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:21 UTC 2017


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

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

commit 7ad83298a4ee8689dffd310dcbff5606c0c7ec09
Author: Kris Jurka <books at ejurka.com>
Date:   Wed Dec 23 20:57:42 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 3cb1a11..0270e16 100644
--- a/org/postgresql/xa/PGXAConnection.java
+++ b/org/postgresql/xa/PGXAConnection.java
@@ -439,7 +439,7 @@ public class PGXAConnection extends PooledConnectionImpl 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