[jboss-user] [JBoss Messaging] - System.out.print statements in onMessage method not showing
ilangocal
do-not-reply at jboss.com
Sun Nov 16 18:58:43 EST 2008
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
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4189689#4189689
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4189689
More information about the jboss-user
mailing list