EDB's JDBC Driver and Commit Model

SOLVED
Highlighted
Community Manager

EDB's JDBC Driver and Commit Model

Hi All,

We've had several customers asking about EDB's JDBC driver and its commit model - specifically, does EDB support two-phase commits or XA transactions?  Appreciate the help in advance.

Archived Discussions


Effective March 31st, we will no longer engage on PostgresRocks.


How to engage with us further?


  • Thought Leadership: EDB Blogs

  • Tips and Tricks: Postgres Tutorials

  • Customer Support: Create a Case Please note: Only customers with an active EDB support subscription and support portal authorization can create support ticket

  • Engage on Stackoverflow While engaging on Stackoverflow tag the question with EDB or EnterpriseDB.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
EDB Team Member

Re: EDB's JDBC Driver and Commit Model

Our JDBC driver can be used with two phase commit , here is an example (taken from EDB/Community testing suite):
 
public void testTwoPhaseCommit() throws Exception {   
  Xid xid = new CustomXid(1); 
  xaRes.start(xid, XAResource.TMNOFLAGS);
  conn.createStatement().executeQuery("SELECT * FROM testxa1"); 
  xaRes.end(xid, XAResource.TMSUCCESS);
  xaRes.prepare(xid);
  xaRes.commit(xid, false); 
}

View solution in original post

1 REPLY 1
Highlighted
EDB Team Member

Re: EDB's JDBC Driver and Commit Model

Our JDBC driver can be used with two phase commit , here is an example (taken from EDB/Community testing suite):
 
public void testTwoPhaseCommit() throws Exception {   
  Xid xid = new CustomXid(1); 
  xaRes.start(xid, XAResource.TMNOFLAGS);
  conn.createStatement().executeQuery("SELECT * FROM testxa1"); 
  xaRes.end(xid, XAResource.TMSUCCESS);
  xaRes.prepare(xid);
  xaRes.commit(xid, false); 
}

View solution in original post

© 2019 EnterpriseDB Corporation. All rights reserved.   |   Privacy Policy   |  Terms of Use   |   Trademarks