1
votes

I am deploying four applications in mule. mule is picking them and deploy them in random fashion(deploy any application without any particular order)

I want to deploy the applications in ascending order of their name. As first application is setting some environment variables which are used by later applications.

How can I achieve that?

I am using Mule Enterprise ESB 3.5.2 standalone, and I am trying it on Linux machine. On windows 7 same applications are picked and deployed in ascending order without any extra configuration.

Thanks in advance

3

3 Answers

0
votes

Mule will (or at least used to, i haven´t tried) respect the alphanumeric order of the application names on startup. However, this is not documented and could change. There is not a feature like that intentionally.

Ideally, you would architect your applications in a way that they are detached enough to, using asynchronoys channels, not to have direct startup dependencies.

0
votes

Setting environment variables is typically something you should do elsewhere, statically, in your environment. If you have to compute runtime data that should be available to all applications, there are other ways to do that.

Using plain hot deployment or MMC deployment, you cannot know the start order and should design the applications to cope with that. That will make them more reliable and portable as well. Have the applications update information using standard communications methods (http, databas, hazlecast or whatnot).

If you really want the startup order to be trusted and respected, start mule using mule -app app1:app2:app3:app4. Note that you will lose the ability to add new applications on the fly. You can, however, update the application and it will reload without reloading the other applications. That is something to keep in mind.

0
votes

Mule generally deploy the application in alphabetic order .. for example Application starts with A will be deployed first then application starts with B and so on.. So, there is nothing much can be done over here and only thing as the time being comes into my mind is to design the apps in alphabetic order so that the dependent apps starts after the main or parent apps get started ...

but again I don't think it is a practical and recommended approach