-
1. Re: How to see System.out messages inside onMessage()
adrian.brock Sep 2, 2003 4:03 PM (in response to wgunadi)The will appear on the console where you started jboss
or in log/server.log
They are INFO level messages in log4j
Regards,
Adrian -
2. Re: How to see System.out messages inside onMessage()
wgunadi Sep 3, 2003 9:07 AM (in response to wgunadi)That's the funny thing, though, I *never* see my messages.
Not on the console, neither it is in the server.log
What am I missing? -
3. Re: How to see System.out messages inside onMessage()
raja05 Sep 3, 2003 10:17 AM (in response to wgunadi)"raja05" wrote:
Do you have this in your log4j.xml in the <JBossConfig>/conf directory
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
<param name="Threshold" value="INFO"/>
<param name="Target" value="System.out"/> -
4. Re: How to see System.out messages inside onMessage()
wgunadi Sep 3, 2003 2:12 PM (in response to wgunadi)Yes, this to be exact:
<!-- The default pattern: Date Priority [Category] Message\n --> -
5. Re: How to see System.out messages inside onMessage()
dumber168 Sep 4, 2003 11:37 PM (in response to wgunadi)hi wgunadi,
it's really odd to hear that System.out.println does not
show any on your console. it should show something
if the process really goes through your onMessage()
method.
if you wouldn't mind, please post your onMessage()
code so that we could see what really is happening
inside.
perhaps, your MDB is not actually called during
process. or your MDB is not properly mapped to
listen to your Queue.
cheers. -
6. Re: How to see System.out messages inside onMessage()
wgunadi Sep 8, 2003 2:02 PM (in response to wgunadi)If my MDB is not properly setup, how come I can put a breakpoint in it and the debugger actually stopped at the breakpoint, allows me to step through the code until it throws exception.
I'm not sure what else can be gathered from looking at the onMessage(), but thanks for helping (NOTE: Search for "==>" to find some clarifications in the code):
public void onMessage(Message msg) {
String strXml = null;
try {
System.out.println("got here"); ==> This one doesn't show up either in console nor server.log
TextMessage txtMsg = (TextMessage)msg;
strXml = txtMsg.getText();
TpCtrl tpctrl = TpCtrlParser.parseThis(strXml);
System.out.println("---- docid is: " + tpctrl.getDocId());
ServerEjbManager jndiMgr = ServerEjbManager.getInstance();
if (tpctrl.getDocId().equals("858")) {
jndiMgr.getReleaseController().processReleaseFromEdi(strXml, createUser());
} else if (tpctrl.getDocId().equals("850")) {
jndiMgr.getPoController().processPoFromEdi(tpctrl, strXml, createUser());
}
} catch (Exception ex) {
log.error("[CDATA[" + getStackTraceAsString(ex) + "]]" + strXml, ex); ==> This is not org.jboss.log, it's our own wrapper for log4j
}
}