I think you have two choices :
- make sure you are not using a scoped classloader and use a separate archive for the shared code
- put all in on big ear
I think having the shared code in both archives can cause problems, especially if the shared code would itself be different versions at some point.
Hope this helps,
I think you can have a .jar (if not, then definately a .sar) with: