05015: | ProcessAccess callback output goes to wrong log file |
Category: Container Status: ClosedSeverity: MEDIUM Reported against release: 0.8 Fixed in release: 0.9
PROBLEM:Customer reported that the shutdown() method of a ProcessAccess object
registered with a Container did not appear to be called when the
process was shut down, since an expected line of output was not found
in the process log file. Another customer commented that in a similar
situation, he observed the output in the container log file instead of
the process (comonent) log file.
Reference the following emails on the Openwings user group for more
details:
http://groups.yahoo.com/group/openwings/message/105
http://groups.yahoo.com/group/openwings/message/106 ANALYSIS:The container implementation traps calls to System.out and System.err
and attempts to identify the process from which the call came. The
output is then sent to the correct print stream for the process.
The problem is that the process print stream cannot be correctly
identified once the shutdown of the process begins. The first thing the
stop() method does is to remove all record of the process from internal
data structures, and then the process is stopped, including calls to
ProcessAccess.shutdown() if the process has registered a ProcessAccess
object. If the process tries to print to System.out/System.err from its
shutdown() method, the container cannot find the process information in
its internal data structures. Therefore the container can't find the
correct process stream, and it just writes the output to the container
log file.
The solution is for the container to wait to remove process information
from its internal data structures until the process has been fully
stopped. |