MULE lifecycle - how to hook into startup process

mule

Solution

The mule lifecycle has several interfaces available that you could use to accomplish this.

http://www.mulesource.org/docs/site/2.2.1/apidocs/org/mule/api/lifecycle/Startable.html

.../Initialisable.html

Essentially, from what I understand, if you want something to happen when your mule instance starts you would implement startable. If you want something to happen when a specific mule component is initialized, then you would implement initialisable.

Problem

I would like to be able to create some directories after Mule has started, but before it starts any other services. I started looking into notifications but I'm not sure if that is the right place to do it. I will need access to the spring beans so it would have to be after spring init, but before any of the connectors and other processes kick off. http://www.mulesource.org/display/MULE2USER/Mule+Server+Notifications Thanks.

Original source