676677678679680681682683684685686
try { conn1 = cf.createXAConnection(); XASession sess1 = conn1.createXASession(); XAResource res1 = sess1.getXAResource(); byte[] branchQualifier = new byte[] { 1, 2, 3, 4, 5, 6, 0, 0, 0, 0 };
761762763764765766767768769770771
{ conn = cf.createXAConnection(); tm.begin(); XASession sess = conn.createXASession(); XAResource res = sess.getXAResource(); XAResource res2 = new DummyXAResource(); Transaction tx = tm.getTransaction();
821822823824825826827828829830831
conn = cf.createXAConnection(); tm.begin(); XASession sess = conn.createXASession(); MessagingXAResource res = (MessagingXAResource)sess.getXAResource(); XAResource res2 = new DummyXAResource(); //To prevent 1PC optimization being used
883884885886887888889890891892893
936937938939940941942943944945946
{ conn = cf.createXAConnection(); tm.begin(); XASession sess = conn.createXASession(); MessagingXAResource res = (MessagingXAResource)sess.getXAResource(); //prevent 1Pc optimisation res.setPreventJoining(true);
10061007100810091010101110121013101410151016
10741075107610771078107910801081108210831084
conn = cf.createXAConnection(); conn.start(); tm.begin(); XASession sess = conn.createXASession(); XAResource res = sess.getXAResource(); XAResource res2 = new DummyXAResource(); Transaction tx = tm.getTransaction();
11531154115511561157115811591160116111621163
conn = cf.createXAConnection(); conn.start(); tm.begin(); XASession sess = conn.createXASession(); MessagingXAResource res = (MessagingXAResource)sess.getXAResource(); res.setPreventJoining(true); XAResource res2 = new DummyXAResource();
12361237123812391240124112421243124412451246
13191320132113221323132413251326132713281329