cancel
Showing results for 
Search instead for 
Did you mean: 

EDB's JDBC Driver and Commit Model

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.

Tags (1)
1 REPLY
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); 
}