3.0.0-SNAPSHOT On Sep 27, 2012, at 8:37 AM, Dan Tran <[email protected]> wrote:
> Brian > > What karaf version are you using? > > Thanks > > -D > > On Wed, Sep 26, 2012 at 11:37 PM, Dan Tran <[email protected]> wrote: >> See my comments inline >> >> On Wed, Sep 26, 2012 at 10:05 PM, Brian Topping <[email protected]> wrote: >>> Dan, I went through a lot of this recently with OpenJPA. YMMV with other >>> providers. >> >> Brian, thank you for sharing this experience, it is surely settle our >> headache a bit!! >> >>> >>> 1. OpenJPA doesn't seem to manage very well with base classes across bundle >>> boundaries. It looked like there needed to be more magic in place that it >>> could deal with not being able to enhance or otherwise modify the >>> superclass jar due to classloader isolation. I did set up build time >>> enhancement but it didn't seem to be enough and I forgot where I was in the >>> code that it was a problem. One solution to this *may* be to use fragment >>> hosts. For now, we've just duplicated the base classes across the >>> persistence bundles, kicking the can down the road a bit. >>> >> >> This would mean all your duplicate base classes have their own java >> package to prevent collision? >> >>> 2. I have been successful in having multiple persistence units in the same >>> Karaf runtime and sharing a single data source, but the PUs do need to be >>> named differently. We have noticed some race conditions that occur, >>> turning on JPA logging seems to bury them a little deeper, and we haven't >>> had time to explore what's going on so we can report it. >> >> This is worry some. Are you able to bring your JPA into production >> with this issue? >> >>> >>> 3. One of the issues with multiple PUs is you need to set them up with >>> different names for the sequence tables under DBs like Postgres and Oracle. >>> This can be done statically from persistence.xml. >>> >>> I'm very interested in resolutions to these issues and would like to >>> contribute to them, but have been under a lot of pressure with client >>> deadlines. I wonder if others have seen any of these issues yet and can >>> offer any better advice than this. >>> >>> Cheers, B >> >> Thanks >> >> -D >> >> >>> >>> On Sep 26, 2012, at 9:01 PM, Dan Tran <[email protected]> wrote: >>> >>>> Hi, >>>> >>>> I am porting a set of JPA moduels under spring to Karaf JPA where I >>>> have i module which contains abstract entity classes, and a couple of >>>> other JPA modules use the 'base module', is it possible under >>>> jpa/openjpa/derby?? >>>> >>>> I am struggling on what do do with the base module since it has no >>>> entities, what the persistent.xml looks like, should it has its own >>>> persistent unit? >>>> >>>> Can all three modules use the same persistent unit name? >>>> >>>> any suggestion is greatly appreciated. >>>> >>>> thanks >>>> >>>> -D >>>
