Shared JPA entity library
We have just started using Glassfish 3 and are looking to build a number of JSF web apps and EJB's as part of a larger application. Each of the modules (either local EJBs within the web app WAR's or remote EJB's for common/shared functionality) will utilise the same Oracle database and as such we would like to build a single JPA entity model which all the applications couple share (to make maintainance easier). Our reason for keeping the application as a set of smaller "modules" is to make version control/deployment/concurrent development easier (hopefully).
My question is - what is the best way to go about this, I have tried budling the "entities.jar" (the one with our shared entity classes) into the domains/domain1/lib and it did not seem to work (JSF through exception about unknown entity class)?