Mule startup order for applications - mule

So, i have three mule applications where one needs to be started before the other two. And I start mule as a windows service. I found this site and follow the example by putting
wrapper.app.parameter.1=-app
wrapper.app.parameter.2=%MULE_STARTUP_ORDER%
in wrapper.conf. where MULE_STARTUP_ORDER is an system variable containing App1:App2:App3
But when i look in my mule.log after staring the service app2 starts first followed by app3 and app1 is last.
And I use mule standalone 3.7.0.
Anyone have any idea what I am doing wrong/missing?

Try setting the list of applications directly in wrapper.conf in case the service has no access to the system environment variable from Windows. Also try using higher numbers for the parameters like the example in the KB article you referenced. Low numbers might be get overridden by other parameters.
Example:
wrapper.app.parameter.10=-app
wrapper.app.parameter.20=app1:app2:app3

Related

Cannot use name when deploying application in Mulesoft Cloudhub

I am using Mule 4 and I am looking to deploy a new application in Cloudhub but it is not allowing me to use the name "customer-api". There is no other application called that in any of the environments and I cannot see it used in API manager either. There was an API called customer-api which has been deleted so not sure if this name could still be cached/ registered somewhere and the entry needs to be cleared.
The only place I can see that name used is in the Anypoint Exchange but wouldn't think that would impact what we are deploying.
Does anybody know what could be preventing me from using that name?
Thanks for any help
Every MuleSoft customer uses the cloudhub, which means it has to be "globally" unique. Try customer-api-randomString and it should work.

Mule ESB Startup Script Parameters

Mule is running as a Windows Service, and when the server is restarted we need the flows to start back up in a very specific manner.
I have edited the bat file located in $HOME\bin\mule.bat
with these parameters:
./mule -app app1:app2:app3 start
However this does not appears to make a difference in the startup.
Here is the answer from Mule.
On Windows
Run as Windows Service:
Follow the next steps to control the order with a system variable.
Stop the windows service.
Create a system variable MULE_STARTUP_ORDER containing the desired order (apps separated by ":") i.e.:APP1:APP2:APP3
Add the next lines to the $MULE_HOME/conf/wrapper.conf file:
wrapper.app.parameter.10=-app
wrapper.app.parameter.11=%MULE_STARTUP_ORDER%
Start the windows service.
The order should be the expected.
Note: With this method you need to manually add/delete applications to the MULE_STARTUP_ORDER variable for them to start
It maybe of help to others running Mule 3.8 Standalone as a Window service, but this worked for me.
Remove the existing Mule service (if it exists) by running the following from the command line
${MULE_HOME}\bin>mule remove
Where ${MULE_HOME} is the directory where Mule is installed
Edit the following file
\Mule\bin\mule.bat
set MULE_OPTS=set.MULE_APP=%MULE_APP%
set.MULE_APP_LONG=%MULE_APP_LONG% set.MULE_HOME="%MULE_HOME%"
set.MULE_BASE="%MULE_BASE%" set.MULE_LIB=%MULE_LIB%
wrapper.working.dir=%_REALPATH% wrapper.app.parameter.1=-app
wrapper.app.parameter.2="appName1:appName2" wrapper.app.parameter.3=%3
wrapper.app.parameter.4=%4 wrapper.app.parameter.5=%5
wrapper.app.parameter.6=%6 wrapper.app.parameter.7=%7
wrapper.app.parameter.8=%8 wrapper.app.parameter.9=%9
Where appName1 and appName2 are the names of my Mule applications in \Mule\apps
Install Mule as a service again
${MULE_HOME}\bin>mule install
Start your Mule service and check the logs to confirm the Mule apps are starting in the order expected.
Finally, if you wished to do the same from the command line, then try
${MULE_HOME}\bin>mule -app=appName1:appName2
Hope that helps!
Where did you found out that would even work?
Have a look over here in the docs about starting/stopping Mule.
https://docs.mulesoft.com/mule-user-guide/v/3.7/starting-and-stopping-mule-esb
As far as i know that isn't possible.
You can change the initial state of your flows in Anypoint Studio to stopped.
That will help you out for the flows that you don't want to start after restart.
However you should start them afterwards manually via MMC or via the API.

How to control glassfish module startup order

I have several web modules. There are dependency between them, say during startup, module B will use MBean exposed by module A. How to configure glassfish to enable it start them by specific order? Or is it possible to configure it to load them concurrently.
I searched quite a lot via google, but not result.
BTW, I'm using glassfish-2
This post indicates that initial deployment order defines the startup order. I have found (on Glassfish 3) that the order is stored in domain.xml so you can swap entries in there.
If they're part of the same EAR and you're willing to move to Java EE 6 and thus GlassFish 3, here's a solution for you : http://blogs.oracle.com/alexismp/entry/module_initialization_order_in_java
GF 3.1 seems to reset the order after editing the domain.xml.

WLST: deploy application but do not start it -- how?

I need to script an EAR deployment to Weblogic 9.2. Extra requirements I have though are:
Application Name shall be the one I provide, not just EAR name
Application is deployed in Prepared state, not Running one
As far as I can tell, when I use deploy(), the name is got assigned by me (good!), but application starts right away (bad! other services are not ready yet!).
Can anyone point me to a correct way of doing that?
I think that what you're looking for is distributeApplication, not deploy (also see Administration Mode for Isolating Production Applications).
For the application name, why don't you set it in the deployment descriptor?

flex 3 and acessing remote java objects

im just starting to learn flex and im trying to understand how Flex does remoting? From what i have read it looks like Flex provides a LifeCycle data services war which sits on your server and intercepts your remote calls , is this close?
Im concerned that if i use this option that 1. Ill have to add an extra war to my server - the lifecycle data service war and 2. That i will have to pay for a license for each instance i use on each cpu.
Is there an easier [free] option out there which i can use to call my remote java objects from within my flex mxml?
Blaze DS is based off the same APIs / code base as LiveCycle Data Services and is completely free and open source:
http://opensource.adobe.com/wiki/display/blazeds/BlazeDS/
There are a number of other options available including:
Granite DS
WebOrb
FluorineFX (for .NET)
There are also solutions for PHP, Python and Ruby, although I can't recall their names right now.
Easiest option is to send xml from the server and to use it in Flex.
However if you want to use java Objects you can go for BlazeDs. It would require you to put an extra jar files (an no incensing) Also there are other options available as WebOrb for java nr meraapi.