]
Kevin Conner commented on JBESB-3566:
-------------------------------------
A quick search shows a second instance in
org/jbosson/plugins/jbossesb/ServiceDiscoveryComponent.java, System.out.println
JON plugin: should not write to stdout
--------------------------------------
Key: JBESB-3566
URL:
https://issues.jboss.org/browse/JBESB-3566
Project: JBoss ESB
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Management
Affects Versions: 4.9
Reporter: John Mazzitelli
The ESB plugin is dumping exception stack traces to stdout. All JON plugins should never
write to stdout or stderr - they should always log messages via something like log4j. In
other words, never use "System.out.print" or its derivatives and never use
Throwable.printStackTrace.
As an example where the ESB plugin code is doing this, see ESBMessageEventPoller class
[1] where it is doing a throwable.printStackTrace(), specifically line 138.
JON plugins should never write to stdout/stderr for a couple reasons - 1) if the user is
running the agent in "console" mode (where the agent prompt allows a user to
enter prompt commands), if a plugin prints to stdout, it mixes in with the true console
output and confuses the user and corrupts the console output expected by the user. 2) as
the forum thread [2] shows, if running using the wrapper script, the captured stdout grows
unbounded.
Therefore, to fix this issue, simply go through the ESB plugin code and remove or modify
all code writing to stdout/stderr, which usually just entails changing it from printing to
stdout to logging to a log file via log4j.
[1]
http://fisheye.jboss.org/browse/JBossESB/branches/JBESB_4_9_CP/product/to...
[2]
http://community.jboss.org/message/583204#583204
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: