|
[
Permlink
| « Hide
]
Dimitar Dimitrov added a comment - 22/May/08 05:39 AM
Also would be nice if the notification manager logged the dropped notifications with level DEBUG ot TRACE.
Hi,
You don't happen to have a failing test case do you? That why I can compare a fix to what you expect and get this in quicker. As I mentioned, if you remove the last 2 lines from the main() method, it doesn't terminate.
class StartNoStop {
public static void main(String[] args) throws MuleException, InterruptedException {
MuleContext ctx = new DefaultMuleContextFactory().createMuleContext();
ctx.start();
ctx.stop();
ctx.dispose();
}
}
And another one:
class StartNoStop {
public static void main(String[] args) throws MuleException {
MuleClient mc = new MuleClient(); // should create an empty context
mc.dispose();
}
}
Does not terminate This is serious, I'm surprised it hasn't appeared in any of out unit tests, these don't use System.exit() and start and stop mule via MuleContext. I'll take a look. Can you clarify what you mean by the "dropped notifications"?
thanks. Right not the fireNotification() method silently returns if the notification manager has been disposed. Instead of this, it would help debugging in any such calls were logged either as TRACE (if we assume it's normal condition) or as WARN (which would help us fix the code that fired the notification in the first place)
Also, somewhere in the dispatching code in the notif manager, there was another check which would cause it to ignore notifications after disposal, even if they made it in the queue. That's bad, since it's not deterministic. Ideally the NM should dispatch all pending notifications before disposal (we still need to think about timeouts). OK, I'll try to take a look at this sometime ... alternatively feel free to submit a patch by attaching it to this issue.
Applied your patch to log missing notifications. Not done anything to "dispatch all pending notifications before disposal" though...
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||