Package javax.jms

Examples of javax.jms.StreamMessage.writeLong()


      byte[] testBytes = "Bytes".getBytes();
      sent.writeBytes(testBytes);
      sent.writeChar('c');
      sent.writeShort((short) 31415);
      sent.writeInt(314159);
      sent.writeLong(3141592653589793238L);
      sent.writeDouble(3.1415926535897932384626433832795);
      sent.writeFloat(3.141f);
      sent.writeObject("31415926535897932384626433832795");
      sent.writeString("31415926535897932384626433832795");
View Full Code Here


      sm.writeBytes(new byte[] { (byte)4, (byte)5, (byte)6 });
      sm.writeChar((char)7);
      sm.writeDouble(8.0);
      sm.writeFloat(9.0f);
      sm.writeInt(10);
      sm.writeLong(11l);
      sm.writeObject("this is an object");
      sm.writeShort((short)12);
      sm.writeString("this is a String");
   }
View Full Code Here

      m.writeBoolean(myBool);
      m.writeByte(myByte);
      m.writeShort(myShort);
      m.writeChar(myChar);
      m.writeInt(myInt);
      m.writeLong(myLong);
      m.writeFloat(myFloat);
      m.writeDouble(myDouble);
      m.writeString(myString);
      m.writeBytes(myBytes);
      m.writeBytes(myBytes, 2, 3);
View Full Code Here

      catch (javax.jms.MessageNotWriteableException e)
      {
      }
      try
      {
         m2.writeLong(myLong);
         ProxyAssertSupport.fail();
      }
      catch (javax.jms.MessageNotWriteableException e)
      {
      }
View Full Code Here

      byte[] testBytes = "Bytes".getBytes();
      sent.writeBytes(testBytes);
      sent.writeChar('c');
      sent.writeShort((short) 31415);
      sent.writeInt(314159);
      sent.writeLong(3141592653589793238L);
      sent.writeDouble(3.1415926535897932384626433832795);
      sent.writeFloat(3.141f);
      sent.writeObject("31415926535897932384626433832795");
      sent.writeString("31415926535897932384626433832795");
View Full Code Here

      catch (javax.jms.MessageNotWriteableException e)
      {
      }
      try
      {
         m2.writeLong(myLong);
         fail();
      }
      catch (javax.jms.MessageNotWriteableException e)
      {
      }
View Full Code Here

      m.writeBoolean(myBool);
      m.writeByte(myByte);
      m.writeShort(myShort);
      m.writeChar(myChar);
      m.writeInt(myInt);
      m.writeLong(myLong);
      m.writeFloat(myFloat);
      m.writeDouble(myDouble);
      m.writeString(myString);
      m.writeBytes(myBytes);
      m.writeBytes(myBytes, 2, 3);
View Full Code Here

      sm.writeBytes(new byte[] {(byte)4, (byte)5, (byte)6});
      sm.writeChar((char)7);
      sm.writeDouble(8.0);
      sm.writeFloat(9.0f);
      sm.writeInt(10);
      sm.writeLong(11l);
      sm.writeObject("this is an object");
      sm.writeShort((short)12);
      sm.writeString("this is a String");
   }
View Full Code Here

      //shorter code than using a jmstemplate because no need to create a messageCreator
      //alternative would be to use a messagelistener and wire a jmstemplate to the class for sending result
      MessageProducer sender = session.createProducer(message.getJMSReplyTo());
      StreamMessage smsg = session.createStreamMessage();
      smsg.setJMSCorrelationID(message.getJMSMessageID());
      smsg.writeLong(conf);
      sender.send(smsg);
  }
}

View Full Code Here

            System.out.println("Message Received From " + message.getStringProperty("username"));
            TextMessage msg = (TextMessage)message;
            System.out.println(msg.getText());
            long conf = 98765;
            StreamMessage smsg = session.createStreamMessage();
            smsg.writeLong(conf);
            QueueSender sender = session.createSender((Queue)message.getJMSReplyTo());
            sender.send(smsg);
           
            System.out.println("Waiting for messages...");
      } catch (Exception e) {
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.