Just small note to the dependency exclusions stuff. As I already mentioned here
dependency exclusions seem to work somewhat strangely.
I've got an ear with lib directory and four wars
MANIFEST.MF Class-Path entries in these wars reference libraries from the ear lib directory
Then I've got jboss-deployment-structure.xml
<module name="org.hibernate" />
<module name="org.hibernate.validator" />
Which doesn't seem to behave like I would expect. I can see that with these exclusions the behavior changes a little (when compared with no exclusions at all), but server's hibernate stuff is still being used.
I had to add a sub-deployment entry with the same exclusions for each war to get closer to the expected state.
Is is a normal behavior? It looks a quite strange to me, I'd expect setting these exclusions at deployment level would affect the whole ear but it doesn't seem so.