17541755175617571758175917601761176217631764
res1.end(xid1, XAResource.TMSUCCESS); //prepare the tx res1.prepare(xid1); //Now recover conn3 = cf.createXAConnection();
18951896189718981899190019011902190319041905
res1.end(xid1, XAResource.TMSUCCESS); //prepare the tx res1.prepare(xid1); conn1 = null; conn2 = null;
21182119212021212122212321242125212621272128
res.end(xid1, XAResource.TMSUCCESS); //prepare it res.prepare(xid1); conn3 = cf.createXAConnection(); XASession sess3 = conn3.createXASession();
23732374237523762377237823792380238123822383
res.end(xid1, XAResource.TMSUCCESS); //prepare it res.prepare(xid1); conn1 = null; conn2 = null;
25892590259125922593259425952596259725982599
log.trace("Sent messages"); //prepare both txs res1.prepare(xid1); res2.prepare(xid2); log.trace("prepared messages"); //Now "crash" the server
27832784278527862787278827892790279127922793
//prepare both txs res1.prepare(xid1); res2.prepare(xid2); //Now "crash" the server ServerManagement.stopServerPeer();
29422943294429452946294729482949295029512952
30833084308530863087308830893090309130923093
32283229323032313232323332343235323632373238
271272273274275276277278279280281
prod.send(tm); res.end(xid2, XAResource.TMSUCCESS); res.prepare(xid2); } List txList = (List)ServerManagement.invoke(ServerManagement.getServerPeerObjectName(), "retrievePreparedTransactions", null, null);