Added: openjpa/trunk/openjpa-slice/src/test/resources/META-INF/persistence.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-slice/src/test/resources/META-INF/persistence.xml?rev=627636&view=auto ============================================================================== --- openjpa/trunk/openjpa-slice/src/test/resources/META-INF/persistence.xml (added) +++ openjpa/trunk/openjpa-slice/src/test/resources/META-INF/persistence.xml Wed Feb 13 18:26:59 2008 @@ -0,0 +1,118 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> +<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"> + <persistence-unit name="enhance"> + <class>org.apache.openjpa.slice.PObject</class> + <class>org.apache.openjpa.slice.Person</class> + <class>org.apache.openjpa.slice.Address</class> + </persistence-unit> + <!-- ==================================================================== --> + <!-- Configuration for testing basic per-slice configuration --> + <!-- ==================================================================== --> + <persistence-unit name="per-slice"> + <properties> + <property name="openjpa.BrokerFactory" value="slice"/> + <property name="openjpa.slice.Names" value="One,Two, Three"/> + <property name="openjpa.slice.Master" value="One"/> + <property name="openjpa.slice.Lenient" value="true"/> + + <property name="openjpa.slice.DistributionPolicy" value="org.apache.openjpa.slice.policy.UserDistributionPolicy"/> + <property name="openjpa.slice.ThreadingPolicy" value="fixed"/> + + <property name="openjpa.Log" value="DefaultLevel=WARN, Enhance=TRACE, SQL=TRACE"/> + <property name="openjpa.ConnectionDriverName" value="com.mysql.jdbc.Driver"/> + + <property name="openjpa.slice.One.ConnectionURL" value="jdbc:mysql://localhost/slice1"/> + <property name="openjpa.slice.Two.ConnectionURL" value="jdbc:mysql://localhost/slice2"/> + <property name="openjpa.slice.Three.ConnectionURL" value="jdbc:mysql://localhost/slice3"/> + + </properties> + </persistence-unit> + + <persistence-unit name="XA"> + <class>org.apache.openjpa.slice.PObject</class> + <properties> + <property name="openjpa.BrokerFactory" value="slice"/> + <property name="openjpa.ConnectionDriverName" value="com.mysql.jdbc.Driver"/> + + <property name="openjpa.slice.Names" value="One,Two"/> + <property name="openjpa.slice.DistributionPolicy" value="org.apache.openjpa.slice.policy.UserDistributionPolicy"/> + <property name="openjpa.slice.TransactionPolicy" value="xa"/> + + <property name="openjpa.slice.One.ConnectionDriverName" value="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource"/> + <property name="openjpa.slice.One.ConnectionProperties" value="url=jdbc:mysql://localhost/slice1"/> + <property name="openjpa.slice.Two.ConnectionDriverName" value="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource"/> + <property name="openjpa.slice.Two.ConnectionProperties" value="url=jdbc:mysql://localhost/slice2"/> + + <property name="openjpa.Multithreaded" value="false"/> + <property name="openjpa.Log" value="DefaultLevel=WARN, Enhance=TRACE, SQL=TRACE"/> + <property name="openjpa.jdbc.SynchronizeMappings" value="refresh"/> + <property name="openjpa.jdbc.MappingDefaults" value="DefaultMissingInfo=true"/> + <property name="openjpa.RuntimeUnenhancedClasses" value="supported"/> + </properties> + </persistence-unit> + + <!-- ==================================================================== --> + <!-- Configuration for testing basic CRUD operations --> + <!-- ==================================================================== --> + <persistence-unit name="slice"> + <class>org.apache.openjpa.slice.PObject</class> + <class>org.apache.openjpa.slice.Person</class> + <class>org.apache.openjpa.slice.Address</class> + <properties> + <property name="openjpa.BrokerFactory" value="slice"/> + <property name="openjpa.ConnectionDriverName" value="com.mysql.jdbc.Driver"/> + <property name="openjpa.slice.Names" value="One,Two"/> + <property name="openjpa.slice.Master" value="Two"/> + <property name="openjpa.slice.One.ConnectionURL" value="jdbc:mysql://localhost/slice1"/> + <property name="openjpa.slice.Two.ConnectionURL" value="jdbc:mysql://localhost/slice2"/> + <property name="openjpa.ConnectionUserName" value="root"/> + <property name="openjpa.ConnectionPassword" value="hello"/> + <property name="openjpa.slice.DistributionPolicy" value="org.apache.openjpa.slice.policy.UserDistributionPolicy"/> + <property name="openjpa.slice.Lenient" value="false"/> + + <property name="openjpa.Connection2URL" value="jdbc:mysql://localhost/slice1"/> + <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema"/> + <property name="openjpa.QueryCompilationCache" value="false"/> + <property name="openjpa.Log" value="DefaultLevel=WARN, Enhance=TRACE, SQL=TRACE"/> + <property name="openjpa.jdbc.MappingDefaults" value="DefaultMissingInfo=true"/> + <property name="openjpa.RuntimeUnenhancedClasses" value="supported"/> + </properties> + </persistence-unit> + + <persistence-unit name="ordering"> + <class>org.apache.openjpa.slice.PObject</class> + <properties> + <property name="openjpa.BrokerFactory" value="slice"/> + <property name="openjpa.ConnectionDriverName" value="com.mysql.jdbc.Driver"/> + <property name="openjpa.slice.Even.ConnectionURL" value="jdbc:mysql://localhost/slice1"/> + <property name="openjpa.slice.Odd.ConnectionURL" value="jdbc:mysql://localhost/slice2"/> + <property name="openjpa.ConnectionUserName" value="root"/> + <property name="openjpa.ConnectionPassword" value="hello"/> + <property name="openjpa.slice.DistributionPolicy" value="org.apache.openjpa.slice.policy.EvenOddDistributionPolicy"/> + <property name="openjpa.slice.Lenient" value="false"/> + + <property name="openjpa.Connection2URL" value="jdbc:mysql://localhost/slice1"/> + <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema"/> + <property name="openjpa.Log" value="DefaultLevel=WARN, Enhance=TRACE, SQL=TRACE"/> + <property name="openjpa.jdbc.MappingDefaults" value="DefaultMissingInfo=true"/> + </properties> + </persistence-unit> +</persistence>
