Jump to: navigation, search


< EclipseLink‎ | Examples‎ | JPA
Revision as of 10:06, 16 December 2008 by Rick.sapir.oracle.com (Talk | contribs) (added xrefs to elug)

To use JPA you will need to have the following configurations available:

  • Persistence.xml - which defines your persistence units and should be in the meta-inf/ directory.
<persistence-unit name="default" transaction-type="RESOURCE_LOCAL">
  <!-- By default your mappings can be defined in orm.xml file, -->
  <!-- which is discovered automatically.                        -->                                     

  • Entities, Embeddable and MappedSuperclasses
    • These classes should be decorated with the necessary annotations, and/or
    • Be defined in the orm.xml (or some other mapping file) using the XML descriptors.

  • Properties - use these properties to further configure your JPA application.
    • javax.persistence.transactionType - Standard JPA PersistenceUnitTransactionType property, JTA or RESOURCE_LOCAL.
    • javax.persistence.jtaDataSource - Standard JPA JTA DataSource name.
    • javax.persistence.nonJtaDataSource - Standard JPA non-JTA DataSource name.

See Developing JPA Projects in the EclipseLinkUser's Guide for details.