Package org.hornetq.jms.tests.message

Examples of org.hornetq.jms.tests.message.SimpleJMSMessage


      message = null;
   }

   protected Message createForeignMessage() throws Exception
   {
      SimpleJMSMessage m = new SimpleJMSMessage();
      log.debug("creating JMS Message type " + m.getClass().getName());

      return m;
   }
View Full Code Here


  
   public void testForeignMessageCorrelationIDBytesDisabled() throws Exception
   {
      System.setProperty(HornetQJMSConstants.JMS_HORNETQ_ENABLE_BYTE_ARRAY_JMS_CORRELATION_ID_PROPERTY_NAME, "false");
     
      SimpleJMSMessage msg = new SimpleJMSMessage();
     
      msg.setJMSCorrelationID("mycorrelationid");
      byte[] bytes = new byte[] { 1, 4, 3, 6, 8};
      msg.setJMSCorrelationIDAsBytes(bytes);

      queueProd.send(msg);

      Message rec = queueCons.receive();
      ProxyAssertSupport.assertNotNull(rec);
     
      assertNull(rec.getJMSCorrelationIDAsBytes());
     
      assertEquals("mycorrelationid", msg.getJMSCorrelationID());
   }
View Full Code Here

  
   public void testForeignMessageCorrelationID() throws Exception
   {
      System.setProperty(HornetQJMSConstants.JMS_HORNETQ_ENABLE_BYTE_ARRAY_JMS_CORRELATION_ID_PROPERTY_NAME, "true");
     
      SimpleJMSMessage msg = new SimpleJMSMessage();
     
      msg.setJMSCorrelationID("mycorrelationid");
      byte[] bytes = new byte[] { 1, 4, 3, 6, 8};
      msg.setJMSCorrelationIDAsBytes(bytes);

      queueProd.send(msg);

      Message rec = queueCons.receive();
      ProxyAssertSupport.assertNotNull(rec);
View Full Code Here

         MessageConsumer c = sess.createConsumer(HornetQServerTestCase.queue1);

         conn.start();

         Message foreign = new SimpleJMSMessage(new SimpleDestination());

         foreign.setJMSDestination(new SimpleDestination());

         // the producer destination should override the foreign destination and the send should succeed

         p.send(foreign);
View Full Code Here

      message = null;
   }

   protected Message createForeignMessage() throws Exception
   {
      SimpleJMSMessage m = new SimpleJMSMessage();
      log.debug("creating JMS Message type " + m.getClass().getName());

      return m;
   }
View Full Code Here

  
   public void testForeignMessageCorrelationIDBytesDisabled() throws Exception
   {
      System.setProperty(HornetQJMSConstants.JMS_HORNETQ_ENABLE_BYTE_ARRAY_JMS_CORRELATION_ID_PROPERTY_NAME, "false");
     
      SimpleJMSMessage msg = new SimpleJMSMessage();
     
      msg.setJMSCorrelationID("mycorrelationid");
      byte[] bytes = new byte[] { 1, 4, 3, 6, 8};
      msg.setJMSCorrelationIDAsBytes(bytes);

      queueProd.send(msg);

      Message rec = queueCons.receive();
      ProxyAssertSupport.assertNotNull(rec);
     
      assertNull(rec.getJMSCorrelationIDAsBytes());
     
      assertEquals("mycorrelationid", msg.getJMSCorrelationID());
   }
View Full Code Here

  
   public void testForeignMessageCorrelationID() throws Exception
   {
      System.setProperty(HornetQJMSConstants.JMS_HORNETQ_ENABLE_BYTE_ARRAY_JMS_CORRELATION_ID_PROPERTY_NAME, "true");
     
      SimpleJMSMessage msg = new SimpleJMSMessage();
     
      msg.setJMSCorrelationID("mycorrelationid");
      byte[] bytes = new byte[] { 1, 4, 3, 6, 8};
      msg.setJMSCorrelationIDAsBytes(bytes);

      queueProd.send(msg);

      Message rec = queueCons.receive();
      ProxyAssertSupport.assertNotNull(rec);
View Full Code Here

         MessageConsumer c = sess.createConsumer(HornetQServerTestCase.queue1);

         conn.start();

         Message foreign = new SimpleJMSMessage(new SimpleDestination());

         foreign.setJMSDestination(new SimpleDestination());

         // the producer destination should override the foreign destination and the send should succeed

         p.send(foreign);
View Full Code Here

      message = null;
   }

   protected Message createForeignMessage() throws Exception
   {
      SimpleJMSMessage m = new SimpleJMSMessage();
      log.debug("creating JMS Message type " + m.getClass().getName());

      return m;
   }
View Full Code Here

   public void testForeignMessageCorrelationIDBytesDisabled() throws Exception
   {
      System.setProperty(HornetQJMSConstants.JMS_HORNETQ_ENABLE_BYTE_ARRAY_JMS_CORRELATION_ID_PROPERTY_NAME, "false");

      SimpleJMSMessage msg = new SimpleJMSMessage();

      msg.setJMSCorrelationID("mycorrelationid");
      byte[] bytes = new byte[] { 1, 4, 3, 6, 8};
      msg.setJMSCorrelationIDAsBytes(bytes);

      queueProd.send(msg);

      Message rec = queueCons.receive();
      ProxyAssertSupport.assertNotNull(rec);

      assertNull(rec.getJMSCorrelationIDAsBytes());

      assertEquals("mycorrelationid", msg.getJMSCorrelationID());
   }
View Full Code Here

TOP

Related Classes of org.hornetq.jms.tests.message.SimpleJMSMessage

Copyright © 2018 www.massapicom. 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.