On Oct 22, 2009, at 1:52 PM, hypnosat7 wrote:
>
> Hello,
>
> I've add a provider property in my jndi.properties file to avoid
> using
> openjpa provider:
> # override properties of the "educaPU" persistence unit
> educaPU.provider = org.eclipse.persistence.jpa.PersistenceProvider
> educaPU.jta-data-source = educaDatabase
> educaPU.non-jta-data-source = educaDatabase
> educaPU.eclipselink.target-database =
> org.eclipse.persistence.platform.database.HSQLPlatform
> educaPU.eclipselink.ddl-generation = drop-and-create-tables
> educaPU.eclipselink.ddl-generation.output-mode = both
>
>
> But I still see OpenJPA as a provider:
> INFO - PersistenceUnit(name=educaPU,
> provider=org.apache.openjpa.persistence.PersistenceProviderImpl)
The overrides go directly to the <persistence-unit>/<properties>
element.
There are standard system properties for setting provider,
datasources, and transaction type if you do not wish to specify them
in the persistence.xml.
- javax.persistence.provider
- javax.persistence.transactionType
- javax.persistence.jtaDataSource
- javax.persistence.nonJtaDataSource
I wouldn't worry about setting the datasource names. In most cases we
can figure that out automatically.
-David