Thank you! The openejb.jpa.init-entitymanager option is what i was looking for.
<property name="openejb.jpa.init-entitymanager" value="true" /> In persistence.xml solved my problem. On Mon, Jun 3, 2013 at 10:08 PM, Romain Manni-Bucau <[email protected]>wrote: > Hi, > > this is an openjpa feature. > > In OpenEJB we have https://issues.apache.org/jira/browse/OPENEJB-1878 > > + to init a database (mem) from sql script you can simply create a script > (sql) at classpath called import-<name of datasource or persistence > unit>.sql with a sql command by line and it will be executed at startup. > > *Romain Manni-Bucau* > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* > *Blog: **http://rmannibucau.wordpress.com/*< > http://rmannibucau.wordpress.com/> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* > *Github: https://github.com/rmannibucau* > > > > 2013/6/3 kumm0307 <[email protected]> > > > Hello! > > > > i've realized initialization of jpa provider is not a part of the deploy > > process in tomEE (unlike glassfish, or jobss). > > Openjpa creates database schema at the first entitymanager call. > > I can reproduce this in a simple web-application too, but my main issue > is > > integration testing. > > > > I try to populate the database with test data before the test method. > > For example in arquillian i can do it at @before, but at this point the > > schema does not exist. > > Tried arquillian-persistence, and failed too. > > > > Is a switch somewhere to turn off this extra-lazy behaviour? > > > > > > > > -- > > View this message in context: > > > http://openejb.979440.n4.nabble.com/jpa-extra-lazy-initialization-tp4663443.html > > Sent from the OpenEJB User mailing list archive at Nabble.com. > > >
