I use in my EJB and WAR files jboss cache (now I migrate it to Infinispan). As this is common part of the code for those projects, I put it into separate project (non-ejb, not web app): my-commons.jar. When I deploy it to standalone/lib (via jboss management) or in deployments it is ok. However my WAR file (web application using this jar) is not deploying with those infos:
java.lang.ClassNotFoundException: org.infinispan.manager.EmbeddedCacheManager from [Module "deployment.my-commons.jar:main" from Service Module Loader
OK, the problem is clearly described in migration guide. So I added org.infinispan to my WAR's META-INF, I did also to the my-commons.jar
And I have org.infinispan.main under modules in jboss7 folder.
I run out ideas what to try more. The only thing I can imagine is to copy those classes from my-commons.jar to each WAR or EJB using it :/
You can create a module out of it and then add a dependency on that module in each of the applications.
Or, if your usecase allows, you can package the .war and the ejb jar in a .ear and include that common jar in the .ear/lib folder.