blob: 757f054a904d4f0592d9db12e3cd2f481f3304d3 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8" ?>
<persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0" xmlns="http://java.sun.com/xml/ns/persistence">
<persistence-unit name="order" transaction-type="RESOURCE_LOCAL">
<class>model.Order</class>
<class>model.OrderLine</class>
<class>model.Customer</class>
<properties>
<!-- Default database login using MySQL for EclipseLink's internal connection pool,
change this to access your own database. -->
<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver" />
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://node1:3306/mysql" />
<property name="javax.persistence.jdbc.user" value="root" />
<property name="javax.persistence.jdbc.password" value="password" />
<!-- The database platform is auto-detected by default,
if you want to set a specific platform this can be set. -->
<!-- property name=""eclipselink.target-database" value="Oracle" / -->
<!-- Configure connection pool. -->
<property name="eclipselink.connection-pool.default.initial" value="1" />
<property name="eclipselink.connection-pool.default.min" value="64" />
<property name="eclipselink.connection-pool.default.max" value="64" />
<!-- Configure 2nd database connection pool. -->
<property name="eclipselink.connection-pool.node2.url" value="jdbc:mysql://node2:3306/mysql" />
<property name="eclipselink.connection-pool.node2.user" value="root" />
<property name="eclipselink.connection-pool.node2.password" value="password" />
<property name="eclipselink.connection-pool.node2.initial" value="1" />
<property name="eclipselink.connection-pool.node2.min" value="64" />
<property name="eclipselink.connection-pool.node2.max" value="64" />
<!-- Default partioning to replication to allow DDL to be sent to all nodes -->
<property name="eclipselink.partitioning" value="Replicate" />
<!-- Enabled statement caching, this is only required when using internal connection pooling,
when using a DataSource, statement caching must be configured in the DataSource. -->
<property name="eclipselink.jdbc.cache-statements" value="true" />
<!-- In JSE no server platform is used, if you wish to use this example is a JEE server with JTA,
then you need to set this. -->
<!-- property name="eclipselink.target-server" value="WebLogic" / -->
<!-- Caching is disabled for this example to stress the database more. -->
<property name="eclipselink.cache.shared.default" value="false" />
<!-- If desired, this option would force a JDBC connection to be held for the duration of an EntityManager,
instead of returned to the pool in between queries/transactions. -->
<!-- property name="eclipselink.jdbc.exclusive-connection.mode" value="Always" / -->
<!-- Configure database to be created on startup if not already existing. -->
<!-- property name="eclipselink.ddl-generation" value="create-tables" / -->
<!-- To drop and replace existing schema this can be used. -->
<!-- property name="eclipselink.ddl-generation" value="drop-and-create-tables" / -->
<!-- Configure logging for demonstration. -->
<!-- property name="eclipselink.logging.level" value="FINE" / -->
</properties>
</persistence-unit>
</persistence>