tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <>
Subject Re: Eclipse Multiple Projects and Missing persistence.xml
Date Wed, 18 Jun 2008 06:39:53 GMT

On Jun 11, 2008, at 5:57 PM, David Blevins wrote:

> The crux of the issue is that perfectly valid approach to testing is  
> to treat the entire classpath and all modules in it as essentially  
> one big ear, the things like persistence units declared in other  
> jars will still be considered part of the same "application".   
> Currently we treat every module we find as a separate application  
> which is really not the right technique for some people.
> I'm going to try and cook up a solution for this and put up some  
> snapshot binaries that you both can try out.

Ok.  I've put something together here and created an example for it.

To try it out in your modules update your openejb version to 3.1- 
SNAPSHOT.  This will come out in 3.0.1, just we're running 3.1 on  
trunk at the moment.  Then add openejb.deployments.classpath.ear=true  
this to your startup options as in:

         Properties p = new Properties();
         p.put("openejb.deployments.classpath.ear", "true");  // <-  
new option
         Context context = new InitialContext(p);

One thing that has yet to be fixed is that you still need an ejb- 
jar.xml (or web.xml, etc.) next to your persistence.xml in order for  
it to get picked up.  Will get that fixed as well.

Anyway, let us know if it works out.


View raw message