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?
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:
Background threads may keep the JVM running after that so you may end up having to:
after a while.