When an ear would contain two ejb modules modulea.jar and moduleb.jar. And modulea.jar contains an @Startup ejbX, that calls another ejbY, which is not an @Startup ejb, from moduleb.jar during the startup of the bean X it is required that moduleb.jar is started first as otherwise the app server is not able to inject X into Y. But how to ensure that moduleb.jar is started first?
Currently I have this problem in WebSphere, but I can't seem to find a way to enforce an order. Is there something in the spec to manage order?
Or maybe WebSphere specific (rather not have vendor lock in though). Maybe it is a poor design to have a startup ejb and an ejb that is used by it in different modules, some insight about that is also welcome.