Hi Kevan How is the property: openjpa.MetaDataFactory default setting. The default setting that comes with geronimo causes openjpa to detect model from classes in the jar file regardless of the persistence.xml
What should I do to make openjpa look in the persistence.xml for classes assigned to each persistence unit. Please help Thank -B kevan wrote: > > > On Feb 11, 2009, at 10:55 PM, bongosdude wrote: > >> >> I posted this problem on openjpa forum: Please see this thread at: >> >> http://n2.nabble.com/Problem-with-multi-persistence-units-td2303818.html#a2304438 >> >> >> One of OpenJPA developer replied to my post and pointed out some >> problem >> that may be caused by how geronimo configures openjpa. I copied his >> reply >> here and hope someone from geronimo developers can comment >> >> Hi, >> It looks like Geronimo might be passing in some extra properties to >> OpenJPA??? In the trace, there are two openjpa properties that are >> suspect. You don't have them in your persistence.xml. And, if you >> are not >> passing them in as system properties, then my next guess is >> Geronimo. The >> two properties that seem to be causing your situation are these: >> >> openjpa.MetaDataFactory: >> jpa(Files=/usr/local/geronimo- >> tomcat6-javaee5-2.1.3/repository/default/callingcard-ear/1.0/ >> callingcard-ear-1.0.car/callingcard-ejb.jar) >> >> openjpa.jdbc.SynchronizeMappings: buildSchema(ForeignKeys=true) >> >> The first one (MetaDataFactory) specifies which persistence types to >> process. Since a jar file is specified, we will search the jar file >> for any >> persistence types (regardless of whether they are listed in a >> persistence.xml file or not). Our documentation explains this a bit >> more >> [1]. > > I don't know where the MetatDataFactory setting is coming from... I > can't find anywhere where it is set by either Geronimo/OpenEJB. Maybe > I'm not looking in the right places. > >> >> The next property (SynchronizeMappings) is what I was referring to in >> earlier e-mails. This is the property that tells OpenJPA to please >> create >> the tables if they do not exist. > > Yes, that's our default setting for SynchronizeMappings. See var/ > config/config.xml > > You can override by adding the following property in your > persistence.xml > > <property name="openjpa.jdbc.SynchronizeMappings" value="false" /> > > --kevan > ----- B Amigo:super: -- View this message in context: http://www.nabble.com/OpenJPA-problems-with-multi-persistence.xml-tp21969527s134p21983451.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.