| <?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"> |
| |
| <persistence-unit name="xml-persistence-unit"> |
| <description> |
| This needs to be listed because the OpenJPA test framework |
| does not provide any other means to incrementally enhance classes |
| for particular test cases, and the XML data must be available at |
| enhance time for XML data to get incorporated into PCRegistry. |
| |
| In general, for persistent types that use annotations, you should |
| not list the persistent types here, but rather use the |
| PersistenceTestCase.setUp(Object...) method in your test case's |
| setUp() method, passing the Class objects for your persistent types |
| to that method. |
| |
| This PU needs to be first because XmlOverrideEntity overrides the |
| entity name, and that data is stored statically in the enhanced |
| class. |
| </description> |
| <mapping-file>org/apache/openjpa/persistence/xml/orm.xml</mapping-file> |
| <properties> |
| <property name="openjpa.jdbc.SynchronizeMappings" |
| value="buildSchema(ForeignKeys=true)"/> |
| </properties> |
| </persistence-unit> |
| |
| <persistence-unit name="test"> |
| <properties> |
| <!-- |
| These properties are instead passed via System properties |
| |
| <property name="openjpa.ConnectionDriverName" |
| value="org.apache.commons.dbcp.BasicDataSource"/> |
| <property name="openjpa.ConnectionProperties" |
| value="DriverClassName=org.apache.derby.jdbc.EmbeddedDriver,Url=jdbc:derby:target/database/openjpa-test-database;create=true,MaxActive=100,MaxWait=10000,TestOnBorrow=true"/> |
| --> |
| <property name="openjpa.jdbc.SynchronizeMappings" |
| value="buildSchema(ForeignKeys=true)"/> |
| </properties> |
| </persistence-unit> |
| |
| <persistence-unit name="second-persistence-unit"> |
| <class>org.apache.openjpa.enhance.UnenhancedBootstrapInstance</class> |
| </persistence-unit> |
| |
| <persistence-unit name="third-persistence-unit"> |
| <class>org.apache.openjpa.enhance.UnenhancedBootstrapInstance2</class> |
| </persistence-unit> |
| |
| <persistence-unit name="invalid"> |
| <properties> |
| <property name="openjpa.ConnectionDriverName" |
| value="org.apache.commons.dbcp.BasicDataSource" /> |
| <property name="openjpa.ConnectionProperties" |
| value="DriverClassName=not.a.real.Driver,Url=jdbc:notreal://"/> |
| </properties> |
| </persistence-unit> |
| |
| <persistence-unit name="empty-pu"> |
| </persistence-unit> |
| |
| <persistence-unit name="listener-pu"> |
| <mapping-file>META-INF/listener-orm.xml</mapping-file> |
| <class>org.apache.openjpa.persistence.callbacks.EntityListenerEntity</class> |
| <class>org.apache.openjpa.persistence.callbacks.GlobalListenerEntity</class> |
| <class>org.apache.openjpa.persistence.callbacks.Message</class> |
| <properties> |
| <property name="openjpa.jdbc.SynchronizeMappings" |
| value="buildSchema(ForeignKeys=true)"/> |
| </properties> |
| </persistence-unit> |
| |
| <persistence-unit name="test-unique-constraint"> |
| <mapping-file>org/apache/openjpa/persistence/jdbc/unique/orm.xml</mapping-file> |
| <class>org.apache.openjpa.persistence.jdbc.unique.UniqueA</class> |
| <class>org.apache.openjpa.persistence.jdbc.unique.UniqueB</class> |
| </persistence-unit> |
| |
| </persistence> |