Package com.drighetto.essai.springactivemq.processor

Examples of com.drighetto.essai.springactivemq.processor.MyMessageProducer


      // Create spring context
      ApplicationContext appCtx = new ClassPathXmlApplicationContext(
          "applicationContext-Queue.xml");

      // Get JMS template for message sending
      MyMessageProducer myMessageProducer = (MyMessageProducer) appCtx
          .getBean("myMessageProducer");

      int i = 0;
      String text = "";
      while (i < 50000) {
        text = "Hello World " + System.currentTimeMillis();
        myMessageProducer.sendMessage(text);
        System.out.printf("Msg Count :%s - Text : %s\n", i, text);
        i++;
        Thread.sleep(1000);
      }
View Full Code Here


      // Create spring context
      ApplicationContext appCtx = new ClassPathXmlApplicationContext(
          "applicationContext-Topic.xml");

      // Get JMS template for message sending
      MyMessageProducer myMessageProducer = (MyMessageProducer) appCtx
          .getBean("myMessageProducer");

      // Processing send/receive
      while (true) {
        myMessageProducer.sendMessage("Hello World "
            + System.currentTimeMillis());
        Thread.sleep(2000);
      }
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

      // Create spring context
      ApplicationContext appCtx = new ClassPathXmlApplicationContext(
          "applicationContext-Queue.xml");

      // Get JMS template for message sending
      MyMessageProducer myMessageProducer = (MyMessageProducer) appCtx
          .getBean("myMessageProducer");

      long i = 0;
      while (true) {
        myMessageProducer.sendMessage();
        System.out
            .printf(
                "Msg Count :%s - FreeMemory : %s - MaxMemory : %s - TotalMemory : %s\n",
                i, Runtime.getRuntime().freeMemory(), Runtime
                    .getRuntime().maxMemory(), Runtime
View Full Code Here

TOP

Related Classes of com.drighetto.essai.springactivemq.processor.MyMessageProducer

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.