Package org.jboss.test.messaging.jms.message

Examples of org.jboss.test.messaging.jms.message.SimpleJMSTextMessage


       super.tearDown();
    }

    protected Message createForeignMessage() throws Exception
    {
        SimpleJMSTextMessage m = new SimpleJMSTextMessage();
        m.setText("this is the payload");
        return m;
    }
View Full Code Here


         // send a message that is not created by the session

         cconn.start();

         Message m = new SimpleJMSTextMessage("something");
         p.send(m);        

         TextMessage rec = (TextMessage)c.receive(3000);
        
         assertEquals("something", rec.getText());
View Full Code Here

        super(name);
    }

    protected Message createForeignMessage() throws Exception
    {
        SimpleJMSTextMessage m = new SimpleJMSTextMessage();
        m.setText("this is the payload");
        return m;
    }
View Full Code Here

      Session s = c.createSession(false, Session.AUTO_ACKNOWLEDGE);

      MessageProducer p = s.createProducer(queue1);

      // create a Bytes foreign message
      SimpleJMSTextMessage txt = new SimpleJMSTextMessage("hello from Brazil!");
      txt.setJMSDestination(null);

      p.send(txt);

      assertNotNull(txt.getJMSDestination());

      MessageConsumer cons = s.createConsumer(queue1);
      c.start();

      TextMessage tm = (TextMessage)cons.receive();
      assertNotNull(tm);
      assertEquals("hello from Brazil!", txt.getText());
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
View Full Code Here

         // send a message that is not created by the session

         cconn.start();

         Message m = new SimpleJMSTextMessage("something");
         p.send(m);        

         TextMessage rec = (TextMessage)c.receive(3000);
        
         assertEquals("something", rec.getText());
View Full Code Here

TOP

Related Classes of org.jboss.test.messaging.jms.message.SimpleJMSTextMessage

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.