Difference between revisions of "EclipseLink/Examples/JPA/Configure"

From Eclipsepedia

Jump to: navigation, search
Line 1: Line 1:
 
To use JPA you will need to have the following configurations:
 
To use JPA you will need to have the following configurations:
  
* Jar(s) containing your Entities, Embeddable's and MappedSuperclasses (all decorated with the necessary annotations or XML descriptors)
+
* Jar(s) containing your:
** Persistence.xml
+
** Persistence.xml - which defines your persistence units
 +
** Entities, Embeddable and MappedSuperclasses
 +
*** These classes should be decorated with the necessary annotations, and/or
 +
*** Be defined in the orm.xml using the XML descriptors.
 
* Properties - use these properties to further configure your JPA application.
 
* Properties - use these properties to further configure your JPA application.
 
** javax.persistence.transactionType - Standard JPA PersistenceUnitTransactionType property, JTA or RESOURCE_LOCAL.
 
** javax.persistence.transactionType - Standard JPA PersistenceUnitTransactionType property, JTA or RESOURCE_LOCAL.
 
** javax.persistence.jtaDataSource - Standard JPA JTA DataSource name.
 
** javax.persistence.jtaDataSource - Standard JPA JTA DataSource name.
 
** javax.persistence.nonJtaDataSource - Standard JPA non-JTA DataSource name.
 
** javax.persistence.nonJtaDataSource - Standard JPA non-JTA DataSource name.

Revision as of 10:24, 16 October 2007

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

  • Jar(s) containing your:
    • Persistence.xml - which defines your persistence units
    • Entities, Embeddable and MappedSuperclasses
      • These classes should be decorated with the necessary annotations, and/or
      • Be defined in the orm.xml 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.