1 Reply Latest reply on Nov 18, 2008 2:14 AM by gaohoward

    System.out.print statements in onMessage method not showing

      I added the System.out statements inside my onMessage method
      as below:

      public void onMessage(Message message) {
       String name = null;
       try {
       if (message instanceof ObjectMessage) {
       ObjectMessage objMessage = (ObjectMessage) message;
       Object obj = objMessage.getObject();
       if (obj instanceof ProcessDTO) {
       name = ((ProcessDTO)obj).getName();
       System.out.println("****************************************************");
       System.out.println("LongProcessMessageBean.onMessage(): Received message. NAME: "+name);
       System.out.println("****************************************************");
       System.out.println("Now calling LongProcessService.doLongProcess");
      
       ProcessResult result = LongProcessService.doLongProcess((ProcessDTO)obj);
       } else {
       System.err.println("Expecting ProcessDTO in Message");
       }
       } else {
       System.err.println("Expecting Object Message");
       }
       System.out.println("*******************************************");
       System.out.println("Leaving LongProcessMessageBean.onMessage(). NAME: "+name );
       System.out.println("*******************************************");
       } catch (Throwable t) {
       t.printStackTrace();
       context.setRollbackOnly();
       }
       }

      ------------

      I expected to see them in my jboss startup console, but I could not find any. What could I be doing wrong?

      Am I not posting messages on my queue in the right manner? Please help!!

      thanks