Deploy order of sub-dependencies in ear-bundled SY applications
jachym.culka Oct 1, 2013 8:31 AMHello, I'm currently working on a project where we deploy several SY application (10+) as a single EAR package, which works great. Now we would like to introduce dependencies among SY applications, simply to start one particular SY as the last. I tired to state such dependencies in jboss-deployment-structure which, according to AS 7.x documentation, but wasn't lucky, SY modules were deployed in random order which I tested by grepping server logs for "org.switchyard.deploy.internal.Deployment ... Initializing deployment".
BTW, I also tired to enable deploying in order as written in application.xml by <initialize-in-order>true</initialize-in-order> with the same result.
I wrote very simple test that can be used to test that behavior (ear attached) which I deployed several times with following results;
13:21:29,173 DEBUG [org.switchyard.deploy.internal.Deployment] (MSC service thread 1-13) Initializing deployment {http://test.com/ApplicationA}EarSYTest
13:21:29,183 DEBUG [org.switchyard.deploy.internal.Deployment] (MSC service thread 1-5) Initializing deployment {http://test.com/ApplicationC}EarSYTest
13:21:29,186 DEBUG [org.switchyard.deploy.internal.Deployment] (MSC service thread 1-6) Initializing deployment {http://test.com/ApplicationB}EarSYTest
13:21:50,134 DEBUG [org.switchyard.deploy.internal.Deployment] (MSC service thread 1-11) Initializing deployment {http://test.com/ApplicationC}EarSYTest
13:21:50,139 DEBUG [org.switchyard.deploy.internal.Deployment] (MSC service thread 1-2) Initializing deployment {http://test.com/ApplicationA}EarSYTest
13:21:50,140 DEBUG [org.switchyard.deploy.internal.Deployment] (MSC service thread 1-14) Initializing deployment {http://test.com/ApplicationB}EarSYTest
13:24:34,379 DEBUG [org.switchyard.deploy.internal.Deployment] (MSC service thread 1-5) Initializing deployment {http://test.com/ApplicationB}EarSYTest
13:24:34,382 DEBUG [org.switchyard.deploy.internal.Deployment] (MSC service thread 1-6) Initializing deployment {http://test.com/ApplicationC}EarSYTest
13:24:34,389 DEBUG [org.switchyard.deploy.internal.Deployment] (MSC service thread 1-11) Initializing deployment {http://test.com/ApplicationA}EarSYTest
As you can see, order of deployments seems to be completely random. These are very trivial (only SY descriptor with empty composite el) SY apps but the behavior is the same as with our real applications which deploys not in several ms but in tens of seconds.
Edit: Forgot to mention this, expected result would be A starting always after B, C, as A has dependencies on them.
My question is therefore following, is it possible to anyhow enforce order of sub-deployment SY applications in ear package, and if so, how it's done?
Tested on SY 0.8 in EAP 6.1 (SOA 6 Alpha 1).
Thanks in advance
Jachym
-
application.xml 546 bytes
-
jboss-deployment-structure.xml 567 bytes
-
EarSYTest.ear 3.3 KB