<?xml version="1.0" encoding="ISO-8859-1" ?>

<persistence xmlns="http://java.sun.com/xml/ns/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_1_0.xsd"
                      version="1.0">


	<!--
		To generate tables through application or JUnit test set eclipselink.ddl-generation property
		to drop-and-create-tables and choose output-mode, no oder config is needed.
		
		To generate tables through Eclipse set transaction-type to RESOURCE_LOCAL 
		"JPA Tools" -> "Generate Tables from Entities".
		Make sure to have the Connection configured in the project's JPA properties.		 
	-->
    <persistence-unit name="jpacontext" transaction-type="JTA">
        <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
        <jta-data-source>/com/csg/cs/CH/CID_CMTDataSource_XE</jta-data-source>
        <class>com.csg.cs.cids.services.localaddress_1.data.Address</class>
        <!-- parameter needed, otherwise eclipselink looks through all classes for Entities -->
        <exclude-unlisted-classes>true</exclude-unlisted-classes>
        <properties>
            <!-- target-database and target-server need to be defined -->
            <property name="eclipselink.target-database" value="Oracle"/>
            <property name="eclipselink.target-server" value="Weblogic_10"/>
            <!-- none, create-tables, drop-and-create-tables -->
            <property name="eclipselink.ddl-generation" value="create-tables"/>
            <!-- both, sql-script, database -->
            <property name="eclipselink.ddl-generation.output-mode" value="sql-script"/>
            <property name="eclipselink.create-ddl-jdbc-file-name" value="LocalAddress_create.sql"/>
            <property name="eclipselink.drop-ddl-jdbc-file-name" value="LocalAddress_drop.sql"/>            
            <property name="eclipselink.application-location" value="C:\temp\"/>
            

            <!-- The EclipseLink JPA persistence provider uses weaving to enhance JPA entities
            for such things as lazy loading, change tracking, fetch groups, and internal optimizations. -->
            <property name="eclipselink.weaving" value="true"/>
            <!-- The purpose of the eager option is to provide more granular control over weaving. -->
            <property name="eclipselink.weaving.eager" value="false"/>

            <!-- The EclipseLink cache is an in-memory repository that stores recently read or written objects
            based on class and primary key values.
            EclipseLink uses the cache to do the following:
                * Improve performance by holding recently read or written objects.
                * Manage locking and isolation level.
                * Manage object identity.  -->
            <property name="eclipselink.cache.type.default" value="SoftWeak"/>
            <property name="eclipselink.cache.size.default" value="5000"/>
            <property name="eclipselink.cache.shared.default" value="true"/>
            <property name="eclipselink.flush-clear.cache" value="DropInvalidate"/>

            <property name="eclipselink.logging.logger" value="JavaLogger"/>
            <!-- level FINE logs SQL statements -->
            <property name="eclipselink.logging.level" value="WARNING"/>
            <property name="eclipselink.logging.timestamp" value="true"/>
            <property name="eclipselink.logging.session" value="true"/>
            <property name="eclipselink.logging.thread" value="true"/>
            <property name="eclipselink.logging.exceptions" value="true"/>

            <!-- Specify an EclipseLink session customizer class. Generation of UUID oracle GUID RAW(20)-->
            <property name="eclipselink.session.customizer" value="com.csg.cs.services.data.jpa.UUIDSequence"/>
        </properties>
    </persistence-unit>

</persistence>
	
