Examples of createTextMessage()


Examples of hermes.Hermes.createTextMessage()

        try
        {
            final Hermes myHermes = HermesFactory.createHermes(getConfig(), getHermes());
            final Destination destination = myHermes.getDestination(getDestination(), Domain.UNKNOWN);
            final BufferedReader reader = new BufferedReader(new FileReader(new File(getFile()))) ;
            final TextMessage textMessage = myHermes.createTextMessage() ;
            final StringBuffer buffer = new StringBuffer() ;
           
            String line ;

            while ((line = reader.readLine()) != null)
View Full Code Here

Examples of javax.jms.QueueSession.createTextMessage()

      ictx.close();

      QueueConnection qc = qcf.createQueueConnection();
      QueueSession qs = qc.createQueueSession(true, 0);
      QueueSender qsend = qs.createSender(queue);
      TextMessage msg = qs.createTextMessage();

      qc.start();
      int i;
      for (i = 0; i < 10; i++) {
        msg.setText("Test number " + i);
View Full Code Here

Examples of javax.jms.Session.createTextMessage()

    String location = System.getProperty("location");
    if (location != null)
      System.out.println("Publishes messages on topic on " + location);

    TextMessage msg = session.createTextMessage();

    int i;
    for (i = 0; i < 10; i++) {
      msg.setText("Msg " + i);
      pub.send(msg);
View Full Code Here

Examples of javax.jms.Session.createTextMessage()

    Connection cnx = cf.createConnection("anonymous", "anonymous");
    Session sess = cnx.createSession(false, Session.AUTO_ACKNOWLEDGE);
    MessageProducer pub = sess.createProducer(topic);

    TextMessage msg = sess.createTextMessage();

    int i;
    for (i = 0; i < 1000; i++) {
      msg.setText("Msg " + i);
      pub.send(msg);
View Full Code Here

Examples of javax.jms.Session.createTextMessage()

    Connection cnx = tcf.createConnection("anonymous", "anonymous");
    Session sess = cnx.createSession(false, Session.AUTO_ACKNOWLEDGE);
    MessageProducer pub = sess.createProducer(topic);

    TextMessage msg = sess.createTextMessage();

    int i;
    for (i = 0; i < 5000; i++) {
      msg.setText("Msg " + i);
      pub.send(msg);
View Full Code Here

Examples of javax.jms.Session.createTextMessage()

   
    session = cnx.createSession(true, Session.AUTO_ACKNOWLEDGE);
    cnx.start();

    producer = session.createProducer(queue);
    message = session.createTextMessage();

    for (int i = 1; i <= 100000; i++) {
      message.setText("Test number " + i);
      producer.send(message);
View Full Code Here

Examples of javax.jms.Session.createTextMessage()

    Connection cnx = cf.createConnection();
    Session sess = cnx.createSession(true, 0);

    MessageProducer producer = sess.createProducer(null);

    TextMessage msg = sess.createTextMessage();

    for (int i = 1; i <= 10; i++) {
      msg.setText("Soap test " + i);
      producer.send(queue, msg);
      System.out.println("SOAP test " + i);
View Full Code Here

Examples of javax.jms.Session.createTextMessage()

    ictx.close();

    Connection cnx = cf.createConnection();
    Session sess = cnx.createSession(false, Session.AUTO_ACKNOWLEDGE);
    MessageProducer producer = sess.createProducer(null);
    TextMessage msg = sess.createTextMessage();

    msg.setText("Test transfer " + file);
    if (user != null && pass != null)
      msg.setStringProperty("url", "ftp://" + user + ':' + pass + '@' + host + '/' + file + ";type=i");
    else
View Full Code Here

Examples of javax.jms.Session.createTextMessage()

    MessageProducer producer = sess.createProducer(topic);

    System.out.println("Produces 5 messages on the MailTopic.");

    for (int i=0; i<5; i++) {
      TextMessage msg = sess.createTextMessage();
      msg.setBooleanProperty("showProperties", false);
      msg.setText("Queue : Test number #" + i);
      producer.send(msg);
    }
    sess.commit();
View Full Code Here

Examples of javax.jms.Session.createTextMessage()

         Session producerSession = connection.createSession(transacted, ackMode);
         MessageProducer publisher = producerSession.createProducer(this.topic);
         connection.start();

         for (int i=0; i < this.nmax; i++) {
            TextMessage msg = producerSession.createTextMessage();
            msg.setText("this is a " + type + " jms message nr. " + i);
            publisher.send(this.topic, msg);
         }
        
         if (ackMode == Session.CLIENT_ACKNOWLEDGE) {
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.