Examples of TextMessageImpl


Examples of hermes.providers.messages.TextMessageImpl

   * (non-Javadoc)
   *
   * @see hermes.MessageFactory#createTextMessage(java.lang.String)
   */
  public TextMessage createTextMessage(String text) throws JMSException {
    return new TextMessageImpl(text);
  }
View Full Code Here

Examples of net.timewalker.ffmq3.common.message.TextMessageImpl

        return msg;
    }
   
    public static TextMessageImpl createTextMessage( int size ) throws JMSException
    {
        TextMessageImpl msg = new TextMessageImpl();
        setDummyProperties(msg);

        msg.setText(createDummyString(size));
       
        return msg;
    }
View Full Code Here

Examples of net.timewalker.ffmq3.common.message.TextMessageImpl

    /* (non-Javadoc)
     * @see javax.jms.Session#createTextMessage()
     */
    public final TextMessage createTextMessage() throws JMSException
    {
        return new TextMessageImpl();
    }
View Full Code Here

Examples of net.timewalker.ffmq3.common.message.TextMessageImpl

    /* (non-Javadoc)
     * @see javax.jms.Session#createTextMessage(java.lang.String)
     */
    public final TextMessage createTextMessage(String text) throws JMSException
    {
        return new TextMessageImpl(text);
    }
View Full Code Here

Examples of net.timewalker.ffmq3.common.message.TextMessageImpl

   
    long start = System.currentTimeMillis();
    int msgCount = 178;
    for (int i = 0; i < msgCount; i++)
    {
      AbstractMessage msg = new TextMessageImpl("msg"+i);
      msg.setJMSMessageID("ID:FOO"+i);
      msg.setJMSPriority(rand.nextInt(10));
      assertTrue(msgStore.store(msg) != -1);
      //msgStore.commitChanges();
    }
    msgStore.commitChanges();
    long end = System.currentTimeMillis();
    System.out.println("testPriorityBasic: "+(end-start));
    assertEquals(msgCount, msgStore.size());
   
    assertOrdered(msgStore);
   
    // Delete half the queue
    int count = 0;
    int current = msgStore.first();
    while (current != -1 && count < (msgCount/2))
    {
      int next = msgStore.next(current);
      msgStore.delete(current);
      count++;
      current = next;
    }
    msgStore.commitChanges();
    assertEquals(msgCount/2, msgStore.size());
   
    assertOrdered(msgStore);
   
    //System.out.println(msgStore.toString());
   
    for (int i = 0; i < msgCount/2; i++)
    {
      AbstractMessage msg = new TextMessageImpl("other_msg"+i);
      msg.setJMSMessageID("ID:BAR"+i);
      msg.setJMSPriority(rand.nextInt(10));
      assertTrue(msgStore.store(msg) != -1);
    }
    msgStore.commitChanges();
    assertEquals(msgCount, msgStore.size());
   
View Full Code Here

Examples of net.timewalker.ffmq3.common.message.TextMessageImpl

  {
    MessageStore msgStore = createMessageStore();

    for (int i = 0; i < 10; i++)
    {   
      AbstractMessage msg = new TextMessageImpl("msg"+i);
      msg.setJMSMessageID("ID:FOO"+i);
      msg.setJMSPriority(i);
      msg.setJMSCorrelationID("ID"+i);
      msgStore.store(msg);
      msgStore.commitChanges();
    }
    assertEquals(10, msgStore.size());
   
    assertOrdered(msgStore);
   
    int current = msgStore.first();
    for(int n=0;n<5;n++)
      current = msgStore.next(current);
    Message removedMsg = msgStore.retrieve(current);
    msgStore.delete(current);
    msgStore.commitChanges();
   
    assertOrdered(msgStore);
   
    AbstractMessage msg = new TextMessageImpl("msgNEW");
    msg.setJMSMessageID("ID:XXX");
    msg.setJMSPriority(removedMsg.getJMSPriority()+1);
    msgStore.store(msg);
    msgStore.commitChanges();
   
    msg = new TextMessageImpl("msgNEW2");
    msg.setJMSMessageID("ID:YYY");
    msg.setJMSPriority(removedMsg.getJMSPriority());
    msgStore.store(msg);
    msgStore.commitChanges();
   
    //System.out.println(msgStore);
   
View Full Code Here

Examples of net.timewalker.ffmq3.common.message.TextMessageImpl

        "undefined in (1,2)",
    };
   
    private Message getTestMessage() throws Exception
    {
      Message msg = new TextMessageImpl();
      msg.setStringProperty("sProp", "foobar");
      msg.setIntProperty("iProp", 1);
      msg.setIntProperty("iProp2", 2);
      msg.setIntProperty("lProp", 3);
      msg.setFloatProperty("fProp", 1.23f);
      msg.setDoubleProperty("dProp", 4.56);
      msg.setBooleanProperty("bProp", true);
      return msg;
    }
View Full Code Here

Examples of org.exolab.jms.message.TextMessageImpl

     * @throws JMSException if the JMS provider fails to create this message due
     *                      to some internal error.
     */
    public TextMessage createTextMessage() throws JMSException {
        ensureOpen();
        return new TextMessageImpl();
    }
View Full Code Here

Examples of org.exolab.jms.message.TextMessageImpl

     * @throws JMSException if the JMS provider fails to create this message due
     *                      to some internal error.
     */
    public TextMessage createTextMessage(String text) throws JMSException {
        ensureOpen();
        TextMessageImpl result = new TextMessageImpl();
        result.setText(text);
        return result;
    }
View Full Code Here

Examples of org.exolab.jms.message.TextMessageImpl

     *
     * @return a new message
     * @throws JMSException for any JMS error
     */
    protected Message newMessage() throws JMSException {
        return new TextMessageImpl();
    }
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.