Package org.jboss.jms.client

Examples of org.jboss.jms.client.JBossConnectionFactory.createConnection()


      stopService(cf1);
      stopService(cf2);
      stopService(cf3);

      // Check f4 is still ok
      Connection conn5 = f4.createConnection();
      conn5.close();

      stopService(cf4);

      stopService(c1);
View Full Code Here


         //otherwise messages may be merged to node2 and never sucked again.
         ServerManagement.kill(2);

         cf0 = (JBossConnectionFactory)ic[0].lookup("/ConnectionFactory");

         conn0 = cf0.createConnection();

         Session sess0 = conn0.createSession(false, Session.AUTO_ACKNOWLEDGE);
         MessageProducer prod0 = sess0.createProducer(queue[0]);

         final int NUM_MESSAGES = 1000;
View Full Code Here

         startReceive(msgs);
         startReceive(msgs);
         startReceive(msgs);
        
         JBossConnectionFactory cf1 = (JBossConnectionFactory)ic[1].lookup("/ConnectionFactory");
         conn1 = cf1.createConnection();
         Session sess1 = conn1.createSession(false, Session.CLIENT_ACKNOWLEDGE);
         MessageConsumer cons1 = sess1.createConsumer(queue[1]);
         conn1.start();
        
         TextMessage rm = (TextMessage)cons1.receive(5000);
View Full Code Here

   }

   private void startReceive(final Map<String, TextMessage> msgs) throws Exception
   {
      JBossConnectionFactory cf1 = (JBossConnectionFactory)ic[1].lookup("/ConnectionFactory");
      Connection conn1 = cf1.createConnection();
      Session sess1 = conn1.createSession(false, Session.CLIENT_ACKNOWLEDGE);
      MessageConsumer cons1 = sess1.createConsumer(queue[1]);
      cons1.setMessageListener(new MessageListener() {
         public void onMessage(Message m)
         {
View Full Code Here

      startDefaultServer(1, attr, false);

      Connection conn = null;
      try
      {
         conn = cf2.createConnection();
      }
      finally
      {
         try
         {
View Full Code Here

      for (int i=0; i<4; i++)
      {
         try
         {
            conn = cfNoCallback.createConnection();
            // 0 is the only server alive, so.. all connection should be performed on it
            assertEquals(0, getServerId(conn));
         }
         finally
         {
View Full Code Here

      assertTrue(del4.getServerLocatorURI().startsWith("bisocket://localhost:1236"));

      Connection con1 = f1.createConnection();
      Connection con2 = f2.createConnection();
      Connection con3 = f3.createConnection();
      Connection con4 = f4.createConnection();
      con1.close();
      con2.close();
      con3.close();
      con4.close();
View Full Code Here

      stopService(cf1);
      stopService(cf2);
      stopService(cf3);

      // Check f4 is still ok
      Connection conn5 = f4.createConnection();
      conn5.close();

      stopService(cf4);

      stopService(c1);
View Full Code Here

      for (int i=0; i<4; i++)
      {
         try
         {
            conn = cfNoCallback.createConnection();
            // 0 is the only server alive, so.. all connection should be performed on it
            assertEquals(0, getServerId(conn));
         }
         finally
         {
View Full Code Here

      assertTrue(del4.getServerLocatorURI().startsWith("bisocket://localhost:1236"));
     
      Connection con1 = f1.createConnection();
      Connection con2 = f2.createConnection();
      Connection con3 = f3.createConnection();
      Connection con4 = f4.createConnection();
      con1.close();
      con2.close();
      con3.close();
      con4.close();
     
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.