Yes, this is intended behaviour. The DefaultPersistenceUnitDependencyResolver only works for spec compliant deployments.
If you want you can plug in your own implementation of a PersistenceUnitDependencyResolver which goes beyond the spec. But if the other ear/jar containing the persistence unit you want hasn't been deployed yet, you'll end up with a failed deployment.
Thanks for the reply.
What about keeping everything outside of an ear: par's, sar's, etc? Should the services then be able, somehow, to reference a persistence unit deployed directly in the deploy directory? I've given this a quick try and couldn't get it to work, but perhaps there's something else that needs to be done to get this to work.
Or is my only (spec-compliant) recourse to assemble all my components into a single ear? This can be done, but is a bit of a pain as the set of components is not known until install time, so we'd have to drop things into an exploded ear and alter the application.xml every time.
You don't have to alter the application.xml. EE 8.4.2 bullet 1 shows the rules when you don't have one. Most likely all the jars are correctly designated and the application will come up.
Excellent. Thanks for your help.