openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Web developer <>
Subject Re: persistence.xml properties defined
Date Mon, 17 May 2010 15:20:13 GMT
Here what I use:

EntityManagerFactory emf =
        EntityManager em = emf.createEntityManager();

runner arguments:

-DDynamicEnhancementAgent=false -DRuntimeUnenhancedClasses=unsupported

My persistence.xml:

<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns=""

    <persistence-unit name="hellojpa" transaction-type="RESOURCE_LOCAL">
            The default provider can be OpenJPA, or some other product.
            This element is optional if OpenJPA is the only JPA provider
            in the current classloading environment, but can be specified
            in cases where there are multiple JPA implementations available.

        <!-- We must enumerate each entity in the persistence unit -->

                We can configure the default OpenJPA properties here. They
                happen to be commented out here since the provided examples
                all specify the values via System properties.

            <property name="openjpa.DynamicEnhancementAgent" value="false"/>

            <property name="openjpa.RuntimeUnenhancedClasses"

            <property name="openjpa.Sequence"

    <persistence-unit name="embeddables" transaction-type="RESOURCE_LOCAL">



2010/5/17 Jeremy Bauer <>

> John,
> Do you specify the persistence unit name when you create the entity manager
> factory?  If not, you may be picking up the default persistence unit which
> likely has those properties defined.  If you do specify the PU name could
> you post your persistence.xml and the version of OpenJPA you are using?
> -Jeremy
> On Sat, May 15, 2010 at 2:35 AM, Web developer <
> >wrote:
> > Hi. My persistence.xml contained ConnectionDriverName and ConnectionURL
> > properties defined for the unit that was not in use. But even when I
> added
> > tags into config for another unit - the effect is the same. John
> >

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message