Package javax.jms

Examples of javax.jms.Connection.stop()


  
         consumerSess.commit();
        
         log.trace("Committed session");
  
         conn.stop();
         consumer.close();
  
         conn.close();
  
         conn = cf.createConnection();
View Full Code Here


            count++;
         }
  
         assertEquals(NUM_MESSAGES, count);
  
         conn.stop();
         consumer.close();
  
         conn.close();
  
         conn = cf.createConnection();
View Full Code Here

  
         consumerSess.commit();
        
         log.trace("Committed session");
  
         conn.stop();
         consumer.close();
  
         conn.close();
  
         conn = cf.createConnection();
View Full Code Here

  
         assertEquals(NUM_MESSAGES, count);
  
         consumerSess.rollback();
  
         conn.stop();
         consumer.close();
  
         conn.close();
  
         conn = cf.createConnection();
View Full Code Here

        
         TextMessage reply = (TextMessage) consumer.receive(2000);
         System.out.println("reply = " + reply.getText());
        
         producer.close();
         conn.stop();
         consumer.close();
         session.close();
      }
      catch(Exception e)
      {
View Full Code Here

      // TODO: check stateless.state
     
      consumer.close();
      producer.close();
      session.close();
      conn.stop();
   }
  
   public void testServerFound() throws Exception
   {
      serverFound();
View Full Code Here

        
         TextMessage reply = (TextMessage) consumer.receive(2000);
         System.out.println("reply = " + reply.getText());
        
         producer.close();
         conn.stop();
         consumer.close();
         session.close();
      }
      catch(Exception e)
      {
View Full Code Here

        boolean halfwayPointReached = consumerReadToHalfwayLatch.await(5000, TimeUnit.MILLISECONDS);
        assertTrue("Did not read half of messages within time allowed", halfwayPointReached);

        _managedSourceQueue.moveMessages(fromMessageId, toMessageId, _destinationQueueName);

        asyncConnection.stop();

        // The exact number of messages moved will be non deterministic, as the number of messages processed
        // by the consumer cannot be predicted.  There is also the possibility that a message can remain
        // on the source queue.  This situation will arise if a message has been acquired by the consumer, but not
        // yet delivered to the client application (i.e. MessageListener#onMessage()) when the Connection#stop() occurs.
View Full Code Here

            postGetMessage(session, destination, replyToDestination);
            checkBookInResponse(session, replyToDestination, 123L, "CXF JMS Rocks");
            session.close();
        } finally {
            try {
                connection.stop();
                connection.close();
            } catch (JMSException ex) {
                // ignore
            }
        }
View Full Code Here

            postBook(session, destination, replyToDestination);
            checkBookInResponse(session, replyToDestination, 124L, "JMS");
            session.close();
        } finally {
            try {
                connection.stop();
                connection.close();
            } catch (JMSException ex) {
                // ignore
            }
        }
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.