MULE生命周期-如何进入启动过程 [英] MULE lifecycle - how to hook into startup process
问题描述
我希望能够在Mule启动之后但在启动任何其他服务之前创建一些目录.
I would like to be able to create some directories after Mule has started, but before it starts any other services.
我开始研究通知,但是我不确定这是否是正确的选择.我将需要访问spring bean,因此必须在spring init之后但在任何连接器和其他进程启动之前.
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 +服务器+通知
谢谢.
推荐答案
m子生命周期有几个可用的接口,您可以用来完成此任务.
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
.../Initialisable.html
从本质上讲,据我了解,如果您希望在启动ule子实例时发生某些事情,则可以实现可启动.如果您希望在初始化特定的m子组件时发生某些事情,则可以实现initialisable.
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.
这篇关于MULE生命周期-如何进入启动过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!