Java Reference
In-Depth Information
<property name="eclipselink.target-server" value="WebLogic_10"
/>
<property name="javax.persistence.jtaDataSource" value="jdbc/
MySQLDS" />
<property name="eclipselink.ddl-generation"
value="create-tables" />
<property name="eclipselink.target-database" value="MySQL" />
</properties>
</persistence-unit>
</persistence>
The persistence-unit is required to be named and may be given any name. We
had configured a JDBC data source with JNDI jdbc/MySQLDS in WebLogic Server.
Specify the JNDI name in the jta-data-source element. The properties element
specifies vendor-specific properties. The eclipselink.ddl-generation property
is set to create-tables , which implies that the required database tables will be
created unless they are already created . The persistence.xml configuration file is
shown in the Eclipse project in the following illustration:
 
Search WWH ::




Custom Search