since 7.2 there is option to specify deployment dependencies.
This should resolve your initial problem without any need for extra scripts.
Hi Tomaz, thank you for your answer.
Could you, please show me part of documentation concerning deployment dependencies in 7.2?
In my 7.1.1 I have tried to set dependencies in jboss-deployment-structure.xml but it seems not to chenge deployment order. Is this fixed in 7.2 ?
I am after migration of ma app from jbosa 4.2.2 to jboss 7.1.1 and I think the order deployment is my last porblem to solve.