Package javax.transaction.xa

Examples of javax.transaction.xa.XAResource.commit()


            try {
                if (!delistSuccessful || test.rollbackAllways()|| test.exceptionOccurred()) {
                  xaResource.rollback(xid);
                }
                else if (commit) {
                  xaResource.commit(xid, true);
                }           
            } catch (Exception e) {
              if (!exception) {
                throw new TransactionRuntimeException(e);
              }
View Full Code Here


        XAResource res = xa.getXAResource();

        res.start(xid, XAResource.TMNOFLAGS);
        assertTrue(!c.getAutoCommit());
        res.end(xid, XAResource.TMSUCCESS);
        res.commit(xid, true);
        assertTrue(c.getAutoCommit());

        res.start(xid, XAResource.TMNOFLAGS);
        assertTrue(!c.getAutoCommit());
        res.end(xid, XAResource.TMFAIL);
View Full Code Here

                trace("xares1.commit(xid1, false)");
                xares1.commit(xid1, false);
            }
            if (ret2 == XAResource.XA_OK) {
                trace("xares2.commit(xid2, false)");
                xares2.commit(xid2, false);
            }
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            JdbcUtils.closeSilently(stat1);
View Full Code Here

         assertEquals(xid1, xids[0]);
        
         log.trace("Committing the tx");
        
         //Commit
         res3.commit(xids[0], false);
        
         log.trace("committed the tx");
        
         conn1.close();
        
View Full Code Here

         assertEquals(xid1, xids[0]);
        
         log.trace("Committing the tx");
        
         //Commit
         res3.commit(xids[0], false);
        
         log.trace("committed the tx");

         conn1 = cf.createConnection();
        
View Full Code Here

        
         //prepare it
        
         res.prepare(xid1);
        
         res.commit(xid1, false);
        
         conn1.close();
        
         conn2.close();
                 
View Full Code Here

        
         log.trace("still can't see message");
        
         //Commit the tx
        
         res3.commit(xids[0], false);
        
         log.trace("committed");
        
         //The message should now be available
        
View Full Code Here

         assertEquals(xid1, xids[0]);
                 
         //Commit the tx
        
         res3.commit(xids[0], false);
        
         //The message should be acknowldged
        
         conn3.close();
        
View Full Code Here

         assertEquals(xid1, xids[0]);
        
         log.trace("Committing the tx");
        
         //Commit
         res3.commit(xids[0], false);
        
         log.trace("committed the tx");
        
         conn2.close();
        
View Full Code Here

         assertEquals(xid1, xids[0]);
        
         log.trace("Committing the tx");
        
         //Commit
         res3.commit(xids[0], false);
        
         log.trace("committed the tx");
                          
         conn1 = cf.createConnection();
        
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.