Overview of examples.helloworld.run

The main method controls the flow of the hello world application. From this code, you can see that the queue manager is started, a message is put to a queue, a message is got from a queue, and the queue manager is stopped.

Trace information can be redirected to the standard output stream if the MQE_TRACE_ON symbolic constant has its' value changed to 'true'.
  public static void main(String[] args) {    
          try {      
              Run me = new Run();

              if (MQE_TRACE_ON) {
                me.traceOn();
              }
              me.start();
              me.put();
              me.get();
              me.stop();
                if (MQE_TRACE_ON) {
                  me.traceOff();
              }
          } catch (Exception error) {
              System.err.println("Error: " + error.toString());
              error.printStackTrace();
          }
      }

Terms of use | WebSphere software

(c) Copyright IBM Corporation 2004, 2005. All rights reserved.