The eardeployer is reading the application.xml into a hashset and is iterating over the hashset. That iterator loses the ordering in the hashset.
I've posted in the Deployment section for changing hashset to arraylist.
Can you try having a depends clause in jboss.xml so that the beans depend on each other,
For e.g, Bean B can have a depends like
and bean c can have
Thanks Raj. I'm figuring since the EJB become Mbeans, this depends part will work.
That'll mean I'll have to modify my xdoclet results after the descriptors are generated. Oh well..
As far as my previous statement, making the metadata use an ArrayList instead of a HashSet won't work. Ultimately, the Ear deployer sets each jar a subdeployer in set list. This set is also a hashset. Ordering is lost there to. :)
One thing u can do instead of tweaking the descriptor is maybe use a XDoclet merge file instead of letting XDoclet create the file for the Beans which have dependencies. Too bad Xdoclet cant generate them.
One way or other, you have to generate the XML :-(