Package org.hornetq.api.core.client

Examples of org.hornetq.api.core.client.ClientSession.recover()


      // This is not really necessary... But since the server has stopped, I would prefer to keep recreating the factory
      sessionFactory = createInVMFactory();

      session = sessionFactory.createSession(true, false, false);

      Xid[] xids = session.recover(XAResource.TMSTARTRSCAN);

      Assert.assertEquals(0, xids.length);

      session.close();
View Full Code Here


                  server.start();
               }

               session = sf.createSession(null, null, isXA, false, false, preAck, 0);

               Xid[] xids = session.recover(XAResource.TMSTARTRSCAN);
               Assert.assertEquals(1, xids.length);
               Assert.assertEquals(xid, xids[0]);

               session.rollback(xid);
               producer = session.createProducer(ADDRESS);
View Full Code Here

               server.start();
            }

            session = sf.createSession(null, null, isXA, false, false, preAck, 0);

            Xid[] xids = session.recover(XAResource.TMSTARTRSCAN);
            Assert.assertEquals(1, xids.length);
            Assert.assertEquals(xid, xids[0]);

            producer = session.createProducer(ADDRESS);
View Full Code Here

            Assert.assertEquals(1, listHeuristicRolledBackTransactions.length);
            System.out.println(listHeuristicRolledBackTransactions[0]);
         }

         session = sf.createSession(true, false, false);
         Xid[] recoveredXids = session.recover(XAResource.TMSTARTRSCAN);
         Assert.assertEquals(1, recoveredXids.length);
         Assert.assertEquals(xid, recoveredXids[0]);
         Assert.assertEquals(0, session.recover(XAResource.TMENDRSCAN).length);

         session.close();
View Full Code Here

         session = sf.createSession(true, false, false);
         Xid[] recoveredXids = session.recover(XAResource.TMSTARTRSCAN);
         Assert.assertEquals(1, recoveredXids.length);
         Assert.assertEquals(xid, recoveredXids[0]);
         Assert.assertEquals(0, session.recover(XAResource.TMENDRSCAN).length);

         session.close();
      }
      finally
      {
View Full Code Here

         server.stop();

         server.start();

         session = sf.createSession(true, false, false);
         Xid[] recoveredXids = session.recover(XAResource.TMSTARTRSCAN);
         Assert.assertEquals(0, recoveredXids.length);
         jmxServer = ManagementControlHelper.createHornetQServerControl(mbeanServer);
         if (heuristicCommit)
         {
            Assert.assertEquals(0, jmxServer.listHeuristicCommittedTransactions().length);
View Full Code Here

      // This is not really necessary... But since the server has stopped, I would prefer to keep recreating the factory
      sessionFactory = createInVMFactory();

      session = sessionFactory.createSession(true, false, false);

      Xid[] xids = session.recover(XAResource.TMSTARTRSCAN);

      Assert.assertEquals(0, xids.length);

      session.close();
View Full Code Here

         {
            e.printStackTrace();
         }

         // A prepare shouldn't mark any recoverable resources
         Xid[] xids = sendingSession.recover(XAResource.TMSTARTRSCAN);
         Assert.assertEquals(0, xids.length);

         session.close();

         senSession.close();
View Full Code Here

      ClientSessionFactory sf = createInVMFactory();
      sf.setBlockOnNonDurableSend(false);
      sf.setBlockOnAcknowledge(false);
      ClientSession session = sf.createSession(true, false, false);

      Xid[] xids = session.recover(XAResource.TMSTARTRSCAN);
      Assert.assertEquals(1, xids.length);
      Assert.assertEquals(xid, xids[0]);

      session.rollback(xid);
View Full Code Here

      ClientSessionFactory sf = createInVMFactory();
      sf.setBlockOnNonDurableSend(false);
      sf.setBlockOnAcknowledge(false);
      ClientSession session = sf.createSession(true, false, false);

      Xid[] xids = session.recover(XAResource.TMSTARTRSCAN);
      Assert.assertEquals(1, xids.length);
      Assert.assertEquals(xid, xids[0]);

      session.rollback(xid);
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.