-1

The class phekheij.Tllas implements MuleContextNotificationListener so that it can be run before everything else defined in Mule config:

...
<spring:beans>
    <spring:bean id="initializer" class="phekheij.Tllas" />
</spring:beans>

<notifications>
    <notification event="CONTEXT" />
    <notification-listener ref="initializer" />
</notifications>
...

What do I have to do so that Mule does not continue running given some condition, for example, when an exception is thrown from inside that class?

4

1 回答 1

1

I've never tried shutting down Mule during its initialization sequence so I'm unsure what will happen but you could try doing this in phekheij.Tllas:

muleContext.stop();
muleContext.dispose();

Background threads may keep the JVM running after that so you may end up having to:

System.exit(-1);

after a while.

于 2012-04-13T16:20:24.203 回答