In the previous cue card, when you used the Create Entities from Tables wizard to create the JPA entity, JDeveloper automatically created a default persistence unit
Project1 in the
persistence.xml file. That default persistence unit is configured to run inside a Java EE container.
In this example, you will create a persistence unit that runs outside of a container for the same entity.
The same entity can appear in multiple persistence units, but hold different mapping behavior in each one. In addition to defining the entity classes that it represents, a persistence unit also defines its data source information (when overriding the default connection) and any of a number of platform-specific properties. A common need for creating separate persistence units is to run the same entity or entities both inside and outside the Java EE container.
Copyright © 1997, 2009, Oracle. All rights reserved.