JPA - Open JPA

Card Puncher Data Processing

Configuration

Provider

<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>

Properties

Persistence Properties:

<properties>
  <property name="openjpa.ConnectionURL" value="jdbc:mysql://xx.xx.xx.xx:3306/dbname"/>
  <property name="openjpa.ConnectionDriverName" value="com.mysql.jdbc.Driver"/>
  <property name="openjpa.ConnectionUserName" value="xxx"/>
  <property name="openjpa.ConnectionPassword" value="xxx"/>
  <property name="openjpa.Log" value="SQL=TRACE"/>
</properties>
  • Dynamically
Map propertiesMap = new HashMap();
propertiesMap.put("openjpa.ConnectionUserName", "sh");
propertiesMap.put("openjpa.ConnectionPassword", "sh");
propertiesMap.put("openjpa.ConnectionDriverName","oracle.jdbc.OracleDriver");
propertiesMap.put("openjpa.ConnectionUserName","jdbc:oracle:thin:@localhost:1521/pdborcl.hotitem.local");
propertiesMap.put("openjpa.Log", "DefaultLevel=WARN, Runtime=INFO, Tool=INFO, SQL=TRACE");





Discover More
Card Puncher Data Processing
JPA - (Object) Persistence Provider Library

A persistence provider refers to an implementation of the Java Persistence API. The persistence provider is a library that provides the functionality to persist objects in the application. EclipseLink...



Share this page:
Follow us:
Task Runner