...
- Object/relational mapping XML file named orm.xml may be specified in the *META-INF directory in the root of the
persistence unit.
- Object/relational mapping XML file named orm.xml may be specified in the META-INF directory of any jar file
referenced by the persistence.xml.
...
- All classes contained in the root of the persistence unit are also searched for annotated managed persistence classes and any mapping metadata annotations found on them will be processed, or they will be mapped using the mapping annotation defaults.
- If it is not intended that the annotated persistence classes contained in the root of the persistence unit be included in the persistence unit, the exclude-unlisted-classes element should be used.
- The exclude-unlisted-classes element is not intended for use in Java SE environments.
...
- The classes and/or jars that are named as part of a persistence unit must be on the classpath. Referencing them from the persistence.xml file does not cause them to be placed on the classpath.
...
The following XML fragment illustrate the use of properties element. The specified properties and the values enable JPA to connect to VehicleDB database created in the embedded derby of geronimo server.
Note | |||||||||
---|---|---|---|---|---|---|---|---|---|
The above properties are specific to OpenJPA provider. The OpenJPA provider reads these properties and creates appropriate EntityManagerFactory. The properties supported by OpenJPA is at this link |