users@glassfish.java.net

Re: sharing persistence unit between apps

From: <glassfish_at_javadesktop.org>
Date: Thu, 06 Nov 2008 07:42:16 PST

I achieved this by creating a standalone Enterprise EJB Module (this is packaged as a jar file) which contains Stateless Session bean "facades" to wrap the persistence...

The projects that want to use it would require a client jar which contains just the entity and interface classes from the above ejb, which is not too elegant. Biggest issue here is that ant files get more complicated and generate multiple jar files and the calling projects must have client jar that matches the EJB module jar. Also, I have yet to find a way to make one glassfish project/app dependent on another. So that if the EJBModule jar was updated, the other applications that make calls to it would automatically redeploy (so that entity classes will match up)

Sue
[Message sent by forum member 'suedonne123' (suedonne123)]

http://forums.java.net/jive/thread.jspa?messageID=315277