Package javax.jms

Examples of javax.jms.StreamMessage.reset()


        StreamMessage message = session.createStreamMessage();
        message.writeString(text);
        message.writeInt(i);
        message.writeDouble(d);
        message.reset();

        AbstractJmsTransformer trans = createObject(JMSMessageToObject.class);
        Object transformedObject = trans.transform(message);
        assertTrue("Transformed object should be a List", transformedObject instanceof List);
View Full Code Here


            }
        }
        else if (message instanceof StreamMessage)
        {
            StreamMessage sMsg = (StreamMessage) message;
            sMsg.reset();

            ByteArrayOutputStream baos = new ByteArrayOutputStream(4096);
            byte[] buffer = new byte[4096];
            int len;
View Full Code Here

      }
      catch (javax.jms.MessageNotWriteableException e)
      {
      }

      m2.reset();

      // check we go back to the beginning
      ProxyAssertSupport.assertEquals(myBool, m2.readBoolean());
      ProxyAssertSupport.assertEquals(myByte, m2.readByte());
      ProxyAssertSupport.assertEquals(myShort, m2.readShort());
View Full Code Here

      {
      }

      m2.writeBoolean(myBool);

      m2.reset();

      ProxyAssertSupport.assertEquals(myBool, m2.readBoolean());
      try
      {
         m2.readBoolean();
View Full Code Here

      fail();
    } catch (javax.jms.MessageNotWriteableException e)
    {
    }

    m2.reset();

    // check we go back to the beginning
    assertEquals(myBool, m2.readBoolean());
    assertEquals(myByte, m2.readByte());
    assertEquals(myShort, m2.readShort());
View Full Code Here

    {
    }

    m2.writeBoolean(myBool);

    m2.reset();

    assertEquals(myBool, m2.readBoolean());
    try
    {
      m2.readBoolean();
View Full Code Here

   {
      super.assertEquivalent(m, mode, redelivery);

      StreamMessage sm = (StreamMessage)m;

      sm.reset();

      assertEquals(true, sm.readBoolean());
      assertEquals((byte)3, sm.readByte());
      byte[] bytes = new byte[3];
      sm.readBytes(bytes);
View Full Code Here

                msg.setObject(objMsg.getObject());
                msg.storeContent();
                activeMessage = msg;
            } else if (message instanceof StreamMessage) {
                StreamMessage streamMessage = (StreamMessage)message;
                streamMessage.reset();
                ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
                msg.setConnection(connection);
                Object obj = null;

                try {
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.