Author: dwoods
Date: Wed Apr 21 20:42:04 2010
New Revision: 936497
URL: http://svn.apache.org/viewvc?rev=936497&view=rev
Log:
OPENJPA-1639 Create some simple openjpa-xmlstore tests
Added:
openjpa/trunk/openjpa-xmlstore/src/test/
openjpa/trunk/openjpa-xmlstore/src/test/java/
openjpa/trunk/openjpa-xmlstore/src/test/java/org/
openjpa/trunk/openjpa-xmlstore/src/test/java/org/apache/
openjpa/trunk/openjpa-xmlstore/src/test/java/org/apache/openjpa/
openjpa/trunk/openjpa-xmlstore/src/test/java/org/apache/openjpa/xmlstore/
openjpa/trunk/openjpa-xmlstore/src/test/java/org/apache/openjpa/xmlstore/simple/
openjpa/trunk/openjpa-xmlstore/src/test/java/org/apache/openjpa/xmlstore/simple/AllFieldTypes.java
(with props)
openjpa/trunk/openjpa-xmlstore/src/test/java/org/apache/openjpa/xmlstore/simple/Place.java
(with props)
openjpa/trunk/openjpa-xmlstore/src/test/java/org/apache/openjpa/xmlstore/simple/TestPersistence.java
(with props)
openjpa/trunk/openjpa-xmlstore/src/test/resources/
openjpa/trunk/openjpa-xmlstore/src/test/resources/META-INF/
openjpa/trunk/openjpa-xmlstore/src/test/resources/META-INF/persistence.xml
(with props)
Modified:
openjpa/trunk/openjpa-xmlstore/pom.xml
openjpa/trunk/openjpa-xmlstore/src/main/java/org/apache/openjpa/xmlstore/XMLFileHandler.java
Modified: openjpa/trunk/openjpa-xmlstore/pom.xml
URL:
http://svn.apache.org/viewvc/openjpa/trunk/openjpa-xmlstore/pom.xml?rev=936497&r1=936496&r2=936497&view=diff
==============================================================================
--- openjpa/trunk/openjpa-xmlstore/pom.xml (original)
+++ openjpa/trunk/openjpa-xmlstore/pom.xml Wed Apr 21 20:42:04 2010
@@ -21,23 +21,106 @@
Maven release plugin requires the project tag to be on a single line.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+
<modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.openjpa</groupId>
- <artifactId>openjpa-xmlstore</artifactId>
- <packaging>jar</packaging>
- <name>OpenJPA XML Store</name>
- <description>OpenJPA XML Store</description>
- <url>http://openjpa.apache.org</url>
+
<parent>
<groupId>org.apache.openjpa</groupId>
<artifactId>openjpa-parent</artifactId>
<version>2.1.0-SNAPSHOT</version>
</parent>
+
+ <groupId>org.apache.openjpa</groupId>
+ <artifactId>openjpa-xmlstore</artifactId>
+ <packaging>jar</packaging>
+ <name>OpenJPA XML Store</name>
+ <description>OpenJPA XML Store</description>
+
<dependencies>
<dependency>
<groupId>org.apache.openjpa</groupId>
<artifactId>openjpa-kernel</artifactId>
<version>${pom.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.openjpa</groupId>
+ <artifactId>openjpa-persistence-jdbc</artifactId>
+ <version>${pom.version}</version>
+ <!-- <classifier>test-base</classifier> -->
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
</dependencies>
+
+ <build>
+ <plugins>
+ <!-- create *-tests.jar -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-tests</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <!-- new way of using openjpa-maven-plugin to enhance classes -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>openjpa-maven-plugin</artifactId>
+ <version>1.1</version>
+ <configuration>
+
<excludes>org/apache/openjpa/xmlstore/**/Test*.class</excludes>
+
<excludes>org/apache/openjpa/persistence/**/*.class</excludes>
+ <addDefaultConstructor>true</addDefaultConstructor>
+
<enforcePropertyRestrictions>true</enforcePropertyRestrictions>
+ </configuration>
+ <executions>
+ <execution>
+ <id>enhancer</id>
+ <phase>process-test-classes</phase>
+ <goals>
+ <goal>test-enhance</goal>
+ </goals>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.openjpa</groupId>
+ <artifactId>openjpa</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <argLine>${test.jvm.arguments}</argLine>
+ <systemProperties>
+ <property>
+ <name>openjpa.Log</name>
+ <value>${openjpa.Log}</value>
+ </property>
+ <property>
+ <name>openjpa.DynamicEnhancementAgent</name>
+ <value>false</value>
+ </property>
+ <property>
+ <name>tests.openjpa.allowfailure</name>
+ <value>${tests.openjpa.allowfailure}</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
+
Modified:
openjpa/trunk/openjpa-xmlstore/src/main/java/org/apache/openjpa/xmlstore/XMLFileHandler.java
URL:
http://svn.apache.org/viewvc/openjpa/trunk/openjpa-xmlstore/src/main/java/org/apache/openjpa/xmlstore/XMLFileHandler.java?rev=936497&r1=936496&r2=936497&view=diff
==============================================================================
---
openjpa/trunk/openjpa-xmlstore/src/main/java/org/apache/openjpa/xmlstore/XMLFileHandler.java
(original)
+++
openjpa/trunk/openjpa-xmlstore/src/main/java/org/apache/openjpa/xmlstore/XMLFileHandler.java
Wed Apr 21 20:42:04 2010
@@ -116,6 +116,9 @@ public class XMLFileHandler {
* configuration property.
*/
private File getFile(ClassMetaData meta) {
+ if (_conf.getConnectionURL() == null) {
+ throw new InternalException("Invalid ConnectionURL");
+ }
File baseDir = new File(_conf.getConnectionURL());
return new File(baseDir, meta.getDescribedType().getName());
}
Added:
openjpa/trunk/openjpa-xmlstore/src/test/java/org/apache/openjpa/xmlstore/simple/AllFieldTypes.java
URL:
http://svn.apache.org/viewvc/openjpa/trunk/openjpa-xmlstore/src/test/java/org/apache/openjpa/xmlstore/simple/AllFieldTypes.java?rev=936497&view=auto
==============================================================================
---
openjpa/trunk/openjpa-xmlstore/src/test/java/org/apache/openjpa/xmlstore/simple/AllFieldTypes.java
(added)
+++
openjpa/trunk/openjpa-xmlstore/src/test/java/org/apache/openjpa/xmlstore/simple/AllFieldTypes.java
Wed Apr 21 20:42:04 2010
@@ -0,0 +1,368 @@
+/*
+ * 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.
+ */
+package org.apache.openjpa.xmlstore.simple;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.List;
+import java.util.ArrayList;
+import javax.persistence.Entity;
+import javax.persistence.OneToOne;
+import javax.persistence.OneToMany;
+
+import org.apache.openjpa.persistence.PersistentCollection;
+
+...@entity
+public class AllFieldTypes implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ public static enum EnumType {Value1, Value2};
+
+ // @Basic types
+ private short shortField;
+ private int intField;
+ private boolean booleanField;
+ private long longField;
+ private float floatField;
+ private char charField;
+ private double doubleField;
+ private byte byteField;
+ private Short wShortField;
+ private Integer wIntegerField;
+ private Boolean wBooleanField;
+ private Long wLongField;
+ private Float wFloatField;
+ private Character wCharacterField;
+ private Double wDoubleField;
+ private Byte wByteField;
+ private BigInteger bigIntegerField;
+ private BigDecimal bigDecimalField;
+ private String stringField;
+ private Date dateField;
+ private Calendar calendarField;
+ private java.sql.Date sqlDateField;
+ private java.sql.Time sqlTimeField;
+ private java.sql.Timestamp sqlTimestampField;
+ private byte[] byteLob;
+ private Byte[] wByteLob;
+ private char[] charLob;
+ private Character[] wCharacterLob;
+ private EnumType enumField;
+ private Serializable serializableField;
+
+ // Additional types
+ private Set<String> setOfStrings = new HashSet<String>();
+ private String[] arrayOfStrings;
+
+ @PersistentCollection
+ private int[] arrayOfInts;
+
+ // one-to-one and one-to-many relations to self
+ @OneToOne
+ private AllFieldTypes selfOneOne;
+ @OneToMany
+ private List<AllFieldTypes> selfOneMany = new ArrayList<AllFieldTypes>();
+
+ public void setShortField(short shortField) {
+ this.shortField = shortField;
+ }
+
+ public short getShortField() {
+ return this.shortField;
+ }
+
+ public void setIntField(int intField) {
+ this.intField = intField;
+ }
+
+ public int getIntField() {
+ return this.intField;
+ }
+
+ public void setBooleanField(boolean booleanField) {
+ this.booleanField = booleanField;
+ }
+
+ public boolean getBooleanField() {
+ return this.booleanField;
+ }
+
+ public void setLongField(long longField) {
+ this.longField = longField;
+ }
+
+ public long getLongField() {
+ return this.longField;
+ }
+
+ public void setFloatField(float floatField) {
+ this.floatField = floatField;
+ }
+
+ public float getFloatField() {
+ return this.floatField;
+ }
+
+ public void setCharField(char charField) {
+ this.charField = charField;
+ }
+
+ public char getCharField() {
+ return this.charField;
+ }
+
+ public void setDoubleField(double doubleField) {
+ this.doubleField = doubleField;
+ }
+
+ public double getDoubleField() {
+ return this.doubleField;
+ }
+
+ public void setByteField(byte byteField) {
+ this.byteField = byteField;
+ }
+
+ public byte getByteField() {
+ return this.byteField;
+ }
+
+ public void setStringField(String stringField) {
+ this.stringField = stringField;
+ }
+
+ public String getStringField() {
+ return this.stringField;
+ }
+
+ public void setDateField(Date dateField) {
+ this.dateField = dateField;
+ }
+
+ public Date getDateField() {
+ return this.dateField;
+ }
+
+ public void setSetOfStrings(Set<String> setOfStrings) {
+ this.setOfStrings = setOfStrings;
+ }
+
+ public Set<String> getSetOfStrings() {
+ return this.setOfStrings;
+ }
+
+ public void setArrayOfStrings(String[] arrayOfStrings) {
+ this.arrayOfStrings = arrayOfStrings;
+ }
+
+ public String[] getArrayOfStrings() {
+ return this.arrayOfStrings;
+ }
+
+ public void setArrayOfInts(int[] arrayOfInts) {
+ this.arrayOfInts = arrayOfInts;
+ }
+
+ public int[] getArrayOfInts() {
+ return arrayOfInts;
+ }
+
+ public BigDecimal getBigDecimalField() {
+ return bigDecimalField;
+ }
+
+ public void setBigDecimalField(BigDecimal bigDecimalField) {
+ this.bigDecimalField = bigDecimalField;
+ }
+
+ public BigInteger getBigIntegerField() {
+ return bigIntegerField;
+ }
+
+ public void setBigIntegerField(BigInteger bigIntegerField) {
+ this.bigIntegerField = bigIntegerField;
+ }
+
+ public byte[] getByteLob() {
+ return byteLob;
+ }
+
+ public void setByteLob(byte[] byteLob) {
+ this.byteLob = byteLob;
+ }
+
+ public Calendar getCalendarField() {
+ return calendarField;
+ }
+
+ public void setCalendarField(Calendar calendarField) {
+ this.calendarField = calendarField;
+ }
+
+ public char[] getCharLob() {
+ return charLob;
+ }
+
+ public void setCharLob(char[] charLob) {
+ this.charLob = charLob;
+ }
+
+ public EnumType getEnumField() {
+ return enumField;
+ }
+
+ public void setEnumField(EnumType enumField) {
+ this.enumField = enumField;
+ }
+
+ public Serializable getSerializableField() {
+ return serializableField;
+ }
+
+ public void setSerializableField(Serializable serializableField) {
+ this.serializableField = serializableField;
+ }
+
+ public java.sql.Date getSqlDateField() {
+ return sqlDateField;
+ }
+
+ public void setSqlDateField(java.sql.Date sqlDateField) {
+ this.sqlDateField = sqlDateField;
+ }
+
+ public java.sql.Time getSqlTimeField() {
+ return sqlTimeField;
+ }
+
+ public void setSqlTimeField(java.sql.Time sqlTimeField) {
+ this.sqlTimeField = sqlTimeField;
+ }
+
+ public java.sql.Timestamp getSqlTimestampField() {
+ return sqlTimestampField;
+ }
+
+ public void setSqlTimestampField(java.sql.Timestamp sqlTimestampField) {
+ this.sqlTimestampField = sqlTimestampField;
+ }
+
+ public Boolean getWBooleanField() {
+ return wBooleanField;
+ }
+
+ public void setWBooleanField(Boolean booleanField) {
+ wBooleanField = booleanField;
+ }
+
+ public Byte getWByteField() {
+ return wByteField;
+ }
+
+ public void setWByteField(Byte byteField) {
+ wByteField = byteField;
+ }
+
+ public Byte[] getWByteLob() {
+ return wByteLob;
+ }
+
+ public void setWByteLob(Byte[] byteLob) {
+ wByteLob = byteLob;
+ }
+
+ public Character getWCharacterField() {
+ return wCharacterField;
+ }
+
+ public void setWCharacterField(Character characterField) {
+ wCharacterField = characterField;
+ }
+
+ public Character[] getWCharacterLob() {
+ return wCharacterLob;
+ }
+
+ public void setWCharacterLob(Character[] characterLob) {
+ wCharacterLob = characterLob;
+ }
+
+ public Double getWDoubleField() {
+ return wDoubleField;
+ }
+
+ public void setWDoubleField(Double doubleField) {
+ wDoubleField = doubleField;
+ }
+
+ public Float getWFloatField() {
+ return wFloatField;
+ }
+
+ public void setWFloatField(Float floatField) {
+ wFloatField = floatField;
+ }
+
+ public Integer getWIntegerField() {
+ return wIntegerField;
+ }
+
+ public void setWIntegerField(Integer integerField) {
+ wIntegerField = integerField;
+ }
+
+ public Long getWLongField() {
+ return wLongField;
+ }
+
+ public void setWLongField(Long longField) {
+ wLongField = longField;
+ }
+
+ public Short getWShortField() {
+ return wShortField;
+ }
+
+ public void setWShortField(Short shortField) {
+ wShortField = shortField;
+ }
+
+ public AllFieldTypes getSelfOneOne() {
+ return selfOneOne;
+ }
+
+ public void setSelfOneOne(AllFieldTypes selfOneOne) {
+ this.selfOneOne = selfOneOne;
+ }
+
+ public List<AllFieldTypes> getSelfOneMany() {
+ return selfOneMany;
+ }
+
+ public void setSelfOneMany(List<AllFieldTypes> selfOneMany) {
+ this.selfOneMany = selfOneMany;
+ }
+}
+
Propchange:
openjpa/trunk/openjpa-xmlstore/src/test/java/org/apache/openjpa/xmlstore/simple/AllFieldTypes.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
openjpa/trunk/openjpa-xmlstore/src/test/java/org/apache/openjpa/xmlstore/simple/Place.java
URL:
http://svn.apache.org/viewvc/openjpa/trunk/openjpa-xmlstore/src/test/java/org/apache/openjpa/xmlstore/simple/Place.java?rev=936497&view=auto
==============================================================================
---
openjpa/trunk/openjpa-xmlstore/src/test/java/org/apache/openjpa/xmlstore/simple/Place.java
(added)
+++
openjpa/trunk/openjpa-xmlstore/src/test/java/org/apache/openjpa/xmlstore/simple/Place.java
Wed Apr 21 20:42:04 2010
@@ -0,0 +1,41 @@
+/*
+ * 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.
+ */
+package org.apache.openjpa.xmlstore.simple;
+
+import java.io.Serializable;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+...@entity
+public class Place implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private String location;
+
+ @Id
+ public String getLocation() {
+ return location;
+ }
+
+ public void setLocation(String location) {
+ this.location = location;
+ }
+}
+
Propchange:
openjpa/trunk/openjpa-xmlstore/src/test/java/org/apache/openjpa/xmlstore/simple/Place.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
openjpa/trunk/openjpa-xmlstore/src/test/java/org/apache/openjpa/xmlstore/simple/TestPersistence.java
URL:
http://svn.apache.org/viewvc/openjpa/trunk/openjpa-xmlstore/src/test/java/org/apache/openjpa/xmlstore/simple/TestPersistence.java?rev=936497&view=auto
==============================================================================
---
openjpa/trunk/openjpa-xmlstore/src/test/java/org/apache/openjpa/xmlstore/simple/TestPersistence.java
(added)
+++
openjpa/trunk/openjpa-xmlstore/src/test/java/org/apache/openjpa/xmlstore/simple/TestPersistence.java
Wed Apr 21 20:42:04 2010
@@ -0,0 +1,132 @@
+/*
+ * 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.
+ */
+package org.apache.openjpa.xmlstore.simple;
+
+import javax.persistence.EntityManager;
+import javax.persistence.EntityTransaction;
+
+import org.apache.openjpa.persistence.OpenJPAEntityManager;
+import org.apache.openjpa.persistence.OpenJPAEntityManagerFactorySPI;
+import org.apache.openjpa.persistence.test.AbstractPersistenceTestCase;
+
+/**
+ * Simple XMLStore test case to get an EntityManager and perform some basic
operations.
+ */
+public class TestPersistence extends AbstractPersistenceTestCase {
+
+ public void testCreateEntityManager() {
+ OpenJPAEntityManagerFactorySPI emf = createNamedEMF("xmlstore-simple");
+ try {
+ EntityManager em = emf.createEntityManager();
+
+ EntityTransaction t = em.getTransaction();
+ assertNotNull(t);
+ t.begin();
+ t.setRollbackOnly();
+ t.rollback();
+
+ // openjpa-facade test
+ assertTrue(em instanceof OpenJPAEntityManager);
+ OpenJPAEntityManager ojem = (OpenJPAEntityManager) em;
+ ojem.getFetchPlan().setMaxFetchDepth(1);
+ assertEquals(1, ojem.getFetchPlan().getMaxFetchDepth());
+ em.close();
+ } finally {
+ closeEMF(emf);
+ }
+ }
+
+ public void testQuery() {
+ OpenJPAEntityManagerFactorySPI emf = createNamedEMF("xmlstore-simple",
+ CLEAR_TABLES, AllFieldTypes.class);
+ try {
+ EntityManager em = emf.createEntityManager();
+ em.getTransaction().begin();
+ AllFieldTypes aft = new AllFieldTypes();
+ aft.setStringField("foo");
+ aft.setIntField(10);
+ em.persist(aft);
+ em.getTransaction().commit();
+ em.close();
+
+ em = emf.createEntityManager();
+ em.getTransaction().begin();
+ assertEquals(1, em.createQuery
+ ("select x from AllFieldTypes x where x.stringField = 'foo'").
+ getResultList().size());
+ assertEquals(0, em.createQuery
+ ("select x from AllFieldTypes x where x.stringField = 'bar'").
+ getResultList().size());
+ assertEquals(1, em.createQuery
+ ("select x from AllFieldTypes x where x.intField >= 10").
+ getResultList().size());
+ em.getTransaction().rollback();
+ em.close();
+ } finally {
+ closeEMF(emf);
+ }
+ }
+
+ public void testNewDeleteNew() {
+ OpenJPAEntityManagerFactorySPI emf = createNamedEMF("xmlstore-simple",
+ CLEAR_TABLES, Place.class);
+ try {
+ EntityManager em = emf.createEntityManager();
+
+ // create new
+ Place place = new Place();
+ place.setLocation("Lexington");
+ assertFalse(em.contains(place));
+ em.getTransaction().begin();
+ em.persist(place);
+ em.getTransaction().commit();
+ assertTrue(em.contains(place));
+
+ // find and verify
+ place = em.find(Place.class, "Lexington");
+ assertNotNull(place);
+ assertEquals("Lexington", place.getLocation());
+
+ // delete
+ em.getTransaction().begin();
+ em.remove(place);
+ em.getTransaction().commit();
+ assertFalse(em.contains(place));
+
+ // recreate
+ place = new Place();
+ place.setLocation("Lexington");
+ assertFalse(em.contains(place));
+ em.getTransaction().begin();
+ em.persist(place);
+ em.getTransaction().commit();
+ assertTrue(em.contains(place));
+
+ // find and verify
+ place = em.find(Place.class, "Lexington");
+ assertNotNull(place);
+ assertEquals("Lexington", place.getLocation());
+ em.close();
+ } finally {
+ closeEMF(emf);
+ }
+ }
+
+}
+
Propchange:
openjpa/trunk/openjpa-xmlstore/src/test/java/org/apache/openjpa/xmlstore/simple/TestPersistence.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
openjpa/trunk/openjpa-xmlstore/src/test/resources/META-INF/persistence.xml
URL:
http://svn.apache.org/viewvc/openjpa/trunk/openjpa-xmlstore/src/test/resources/META-INF/persistence.xml?rev=936497&view=auto
==============================================================================
--- openjpa/trunk/openjpa-xmlstore/src/test/resources/META-INF/persistence.xml
(added)
+++ openjpa/trunk/openjpa-xmlstore/src/test/resources/META-INF/persistence.xml
Wed Apr 21 20:42:04 2010
@@ -0,0 +1,46 @@
+<?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="2.0">
+
+ <persistence-unit name="xmlstore-simple">
+ <class>org.apache.openjpa.xmlstore.simple.AllFieldTypes</class>
+ <class>org.apache.openjpa.xmlstore.simple.Place</class>
+ <properties>
+ <property name="openjpa.ConnectionURL"
+ value="target/openjpa-xmlstore-db" />
+ <property name="openjpa.BrokerFactory"
+
value="org.apache.openjpa.abstractstore.AbstractStoreBrokerFactory" />
+ <property name="openjpa.abstractstore.AbstractStoreManager"
+ value="org.apache.openjpa.xmlstore.XMLStoreManager" />
+ <property name="openjpa.LockManager"
+ value="org.apache.openjpa.kernel.VersionLockManager" />
+ <!--
+ <property name="openjpa.jdbc.SynchronizeMappings"
+ value="buildSchema" />
+ <property name="openjpa.jdbc.SynchronizeMappings"
+ value="builma(ForeignKeys=true)"/>
+ -->
+ </properties>
+ </persistence-unit>
+
+</persistence>
+
Propchange:
openjpa/trunk/openjpa-xmlstore/src/test/resources/META-INF/persistence.xml
------------------------------------------------------------------------------
svn:eol-style = native