Hi Ilan, > About MySQL - I think that Hibernate and EclipseLink use MyISAM, where > OpenJPA and DataNucleus use InnoDB. Is it possible to tell OpenJPA to use > MyISAM as well? It might be faster.
That can be done by specifying "tableType" property of MySQLDictionary: <property name="openjpa.jdbc.DBDictionary" value="batchLimit=100,tableType=myisam"/> This might not work with dictionary auto-detection. If so, use this: <property name="openjpa.jdbc.DBDictionary" value="mysql(batchLimit=100,tableType=myisam)"/> Cheers, Milosz > Here is an example of a persistence.xml file that was used by R3 (for > PostgreSQL). > > > <?xml version="1.0" encoding="UTF-8"?> > <persistence xmlns="http://java.sun.com/xml/ns/persistence" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://java.sun.com/xml/ns/persistence > http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd" version="2.0"> > <persistence-unit name="OpenJPA_R3-PostgreSQL-server"> > > <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider> > <class>org.jpab.basic.Person</class> > <class>org.jpab.col.CollectionPerson</class> > <class>org.jpab.ext.PersonBase</class> > <class>org.jpab.ext.PersonExt</class> > <class>org.jpab.ext.PersonExtExt</class> > <class>org.jpab.index.IndexedPerson</class> > <class>org.jpab.node.Node</class> > <properties> > <property name="openjpa.ConnectionProperties" > value="DriverClassName=org.postgresql.Driver, > Url=jdbc:postgresql://localhost:5432/jpab7493330740, MaxActive=100, > MaxWait=10000, TestOnBorrow=true, Username=postgres, Password=admin, > poolPreparedStatements=true"/> > <property name="openjpa.ConnectionRetainMode" value="always"/> > <property name="openjpa.ConnectionDriverName" > value="org.apache.commons.dbcp.BasicDataSource"/> > <property name="openjpa.jdbc.DBDictionary" value="batchLimit=100"/> > <property name="openjpa.DataCache" value="true"/> > <property name="openjpa.Log" value="DefaultLevel=ERROR"/> > <property name="openjpa.jdbc.SynchronizeMappings" > value="buildSchema"/> > </properties> > </persistence-unit> > </persistence> >
