cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1406138 - in /cxf/branches/2.6.x-fixes: ./ rt/rs/extensions/search/ rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/ rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/fiql/ rt/rs/extensions/search/...
Date Tue, 06 Nov 2012 13:48:07 GMT
Author: sergeyb
Date: Tue Nov  6 13:48:06 2012
New Revision: 1406138

URL: http://svn.apache.org/viewvc?rev=1406138&view=rev
Log:
Merged revisions 1404148,1404556,1405063 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1404148 | sergeyb | 2012-10-31 14:10:44 +0000 (Wed, 31 Oct 2012) | 1 line
  
  Minor updates to the search code
........
  r1404556 | sergeyb | 2012-11-01 12:25:01 +0000 (Thu, 01 Nov 2012) | 1 line
  
  Adding JPA2 test with relationship
........
  r1405063 | sergeyb | 2012-11-02 17:19:53 +0000 (Fri, 02 Nov 2012) | 1 line
  
  Few updates to the search code after testing with OpenJPA
........

Added:
    cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/Library.java
      - copied unchanged from r1404556, cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/Library.java
Modified:
    cxf/branches/2.6.x-fixes/   (props changed)
    cxf/branches/2.6.x-fixes/rt/rs/extensions/search/pom.xml
    cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchUtils.java
    cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParser.java
    cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/AbstractJPATypedQueryVisitor.java
    cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPACriteriaQueryVisitor.java
    cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitor.java
    cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/Book.java
    cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/Book_.java
    cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitorTest.java
    cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/Name.java
    cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/test/resources/META-INF/persistence.xml

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/trunk:r1404148,1404556,1405063

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.6.x-fixes/rt/rs/extensions/search/pom.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/rs/extensions/search/pom.xml?rev=1406138&r1=1406137&r2=1406138&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/rs/extensions/search/pom.xml (original)
+++ cxf/branches/2.6.x-fixes/rt/rs/extensions/search/pom.xml Tue Nov  6 13:48:06 2012
@@ -65,17 +65,25 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-			<groupId>org.hibernate</groupId>
-			<artifactId>hibernate-entitymanager</artifactId>
-			<version>${hibernate.em.version}</version>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>hsqldb</groupId>
-			<artifactId>hsqldb</artifactId>
-			<version>${hsqldb.version}</version>
-			<scope>test</scope>
-		</dependency>
+	    <groupId>org.hibernate</groupId>
+	    <artifactId>hibernate-entitymanager</artifactId>
+	    <version>${hibernate.em.version}</version>
+	    <scope>test</scope>
+	</dependency>
+	<dependency>
+	   <groupId>hsqldb</groupId>
+	   <artifactId>hsqldb</artifactId>
+	   <version>${hsqldb.version}</version>
+	   <scope>test</scope>
+	</dependency>
+        <!--
+           <dependency>
+  	     <groupId>org.apache.openjpa</groupId>
+ 	     <artifactId>openjpa</artifactId>
+   	     <version>2.2.0</version>
+             <scope>test</scope>
+           </dependency>
+        -->
     </dependencies>
     <build>
         <plugins>

Modified: cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchUtils.java?rev=1406138&r1=1406137&r2=1406138&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchUtils.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchUtils.java
Tue Nov  6 13:48:06 2012
@@ -26,11 +26,10 @@ import org.apache.cxf.jaxrs.ext.search.s
 
 public final class SearchUtils {
     public static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd";
-    //public static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSZ";
     public static final String DATE_FORMAT_PROPERTY = "search.date-format";
     public static final String TIMEZONE_SUPPORT_PROPERTY = "search.timezone.support";
     public static final String LAX_PROPERTY_MATCH = "search.lax.property.match";
-    public static final String BEAN_PROPERTY_MAP = "search.lax.property.match";
+    public static final String BEAN_PROPERTY_MAP = "search.bean.property.map";
     
     private SearchUtils() {
         

Modified: cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParser.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParser.java?rev=1406138&r1=1406137&r2=1406138&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParser.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParser.java
Tue Nov  6 13:48:06 2012
@@ -286,27 +286,26 @@ public class FiqlParser<T> implements Se
             Object castedValue = value;
             if (Date.class.isAssignableFrom(valueType)) {
                 castedValue = convertToDate(value);
-            } else {
+            } else if (ownerBean == null || valueType.isPrimitive()) {
                 try {
                     castedValue = InjectionUtils.convertStringToPrimitive(value, valueType);
                 } catch (Exception e) {
-                    boolean throwEx = true;
-                    if (!valueType.isPrimitive()) {
-                        try {
-                            Method setterM = valueType.getMethod("set" + getMethodNameSuffix(setter),
-                                                                 new Class[]{String.class});
-                            setterM.invoke(ownerBean, new Object[]{value});
-                            castedValue = lastCastedValue;
-                            throwEx = false;
-                        } catch (Throwable ex) {
-                            // continue
-                        }
-                    }
-                    if (throwEx) {
-                        throw new SearchParseException("Cannot convert String value \"" +
value
+                    throw new SearchParseException("Cannot convert String value \"" + value
                                                  + "\" to a value of class " + valueType.getName(),
e);
-                    }
                 }
+            } else {
+                try {
+                    Method setterM = valueType.getMethod("set" + getMethodNameSuffix(setter),
+                                                         new Class[]{String.class});
+                    setterM.invoke(ownerBean, new Object[]{value});
+                } catch (Throwable ex) {
+                    throw new SearchParseException("Cannot convert String value \"" + value
+                                                   + "\" to a value of class " + valueType.getName(),
ex);
+                }
+                
+            }
+            if (lastCastedValue != null) {
+                castedValue = lastCastedValue;
             }
             return castedValue;
         } else {

Modified: cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/AbstractJPATypedQueryVisitor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/AbstractJPATypedQueryVisitor.java?rev=1406138&r1=1406137&r2=1406138&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/AbstractJPATypedQueryVisitor.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/AbstractJPATypedQueryVisitor.java
Tue Nov  6 13:48:06 2012
@@ -24,6 +24,7 @@ import java.util.Map;
 import java.util.Stack;
 
 import javax.persistence.EntityManager;
+import javax.persistence.TypedQuery;
 import javax.persistence.criteria.CriteriaBuilder;
 import javax.persistence.criteria.CriteriaQuery;
 import javax.persistence.criteria.Path;
@@ -124,6 +125,10 @@ public abstract class AbstractJPATypedQu
         return root;
     }
     
+    public TypedQuery<T1> getTypedQuery() {
+        return em.createQuery(getCriteriaQuery());
+    }
+    
     public CriteriaQuery<T1> getCriteriaQuery() {
         if (!criteriaFinalized) {
             List<Predicate> predsList = predStack.pop();

Modified: cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPACriteriaQueryVisitor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPACriteriaQueryVisitor.java?rev=1406138&r1=1406137&r2=1406138&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPACriteriaQueryVisitor.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPACriteriaQueryVisitor.java
Tue Nov  6 13:48:06 2012
@@ -25,6 +25,7 @@ import java.util.Map;
 import javax.persistence.EntityManager;
 import javax.persistence.criteria.CompoundSelection;
 import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Path;
 import javax.persistence.criteria.Selection;
 import javax.persistence.metamodel.SingularAttribute;
 
@@ -82,7 +83,9 @@ public class JPACriteriaQueryVisitor<T, 
     private List<Selection<?>> toSelectionsList(List<SingularAttribute<T,
?>> attributes) {
         List<Selection<?>> selections = new ArrayList<Selection<?>>(attributes.size());
         for (SingularAttribute<T, ?> attr : attributes) {
-            selections.add(getRoot().get(attr));
+            Path<?> path = getRoot().get(attr);
+            path.alias(attr.getName());
+            selections.add(path);
         }
         return selections;
     }

Modified: cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitor.java?rev=1406138&r1=1406137&r2=1406138&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitor.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitor.java
Tue Nov  6 13:48:06 2012
@@ -34,7 +34,7 @@ public class JPATypedQueryVisitor<T> ext
     }
     
     public TypedQuery<T> getQuery() {
-        return getEntityManager().createQuery(getCriteriaQuery());
+        return getTypedQuery();
     }
-     
+        
 }

Modified: cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/Book.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/Book.java?rev=1406138&r1=1406137&r2=1406138&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/Book.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/Book.java
Tue Nov  6 13:48:06 2012
@@ -21,15 +21,17 @@ package org.apache.cxf.jaxrs.ext.search.
 import javax.persistence.Embedded;
 import javax.persistence.Entity;
 import javax.persistence.Id;
+import javax.persistence.ManyToOne;
 
 @Entity(name = "Book")
 public class Book {
-    @Id
     private int id;
     private String title;
     private OwnerAddress address;
     private OwnerInfo ownerInfo;
+    private Library library;
     
+    @Id
     public int getId() {
         return id;
     }
@@ -62,4 +64,13 @@ public class Book {
     public void setOwnerInfo(OwnerInfo ownerInfo) {
         this.ownerInfo = ownerInfo;
     }
+
+    @ManyToOne
+    public Library getLibrary() {
+        return library;
+    }
+
+    public void setLibrary(Library library) {
+        this.library = library;
+    }
 }

Modified: cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/Book_.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/Book_.java?rev=1406138&r1=1406137&r2=1406138&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/Book_.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/Book_.java
Tue Nov  6 13:48:06 2012
@@ -28,5 +28,8 @@ public final class Book_ {
     }
     public static volatile SingularAttribute<Book, Integer> id;
     public static volatile SingularAttribute<Book, String> title;
+    public static volatile SingularAttribute<Book, Library> library;
+    public static volatile SingularAttribute<Book, OwnerInfo> ownerInfo;
+    public static volatile SingularAttribute<Book, OwnerAddress> address;
 }
 //CHECKSTYLE:ON
\ No newline at end of file

Modified: cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitorTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitorTest.java?rev=1406138&r1=1406137&r2=1406138&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitorTest.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitorTest.java
Tue Nov  6 13:48:06 2012
@@ -64,10 +64,17 @@ public class JPATypedQueryVisitorTest ex
             fail("Exception during HSQL database init.");
         }
         try {
-            emFactory = Persistence.createEntityManagerFactory("testUnit");
+            emFactory = Persistence.createEntityManagerFactory("testUnitHibernate");
             em = emFactory.createEntityManager();
          
             em.getTransaction().begin();
+            
+            Library lib = new Library();
+            lib.setId(1);
+            lib.setAddress("town");
+            em.persist(lib);
+            assertTrue(em.contains(lib));
+                        
             Book b1 = new Book();
             b1.setId(9);
             b1.setTitle("num9");
@@ -76,6 +83,7 @@ public class JPATypedQueryVisitorTest ex
             info1.setName(new Name("Fred"));
             info1.setDateOfBirth(parseDate("2000-01-01"));
             b1.setOwnerInfo(info1);
+            b1.setLibrary(lib);
             em.persist(b1);
             assertTrue(em.contains(b1));
             Book b2 = new Book();
@@ -86,6 +94,7 @@ public class JPATypedQueryVisitorTest ex
             info2.setName(new Name("Barry"));
             info2.setDateOfBirth(parseDate("2001-01-01"));
             b2.setOwnerInfo(info2);
+            b2.setLibrary(lib);
             em.persist(b2);
             assertTrue(em.contains(b2));
             Book b3 = new Book();
@@ -96,10 +105,10 @@ public class JPATypedQueryVisitorTest ex
             info3.setName(new Name("Bill"));
             info3.setDateOfBirth(parseDate("2002-01-01"));
             b3.setOwnerInfo(info3);
+            b3.setLibrary(lib);
             em.persist(b3);
             assertTrue(em.contains(b3));
             
-            
             em.getTransaction().commit();
         } catch (Exception ex) {
             ex.printStackTrace();
@@ -228,7 +237,12 @@ public class JPATypedQueryVisitorTest ex
         assertEquals("Fred", book.getOwnerInfo().getName().getName());
     }
     
+        
     @Test
+    // "ownerInfo.name" maps to Name class and this 
+    // does not work in OpenJPA, as opposed to Hibernate
+    // "ownerInfo.name.name" will map to primitive type, see
+    // testEqualsOwnerNameQuery3(), which also works in OpenJPA
     public void testEqualsOwnerNameQuery2() throws Exception {
         List<Book> books = queryBooks("ownerInfo.name==Fred");
         assertEquals(1, books.size());
@@ -246,6 +260,15 @@ public class JPATypedQueryVisitorTest ex
     }
     
     @Test
+    public void testFindBookInTownLibrary() throws Exception {
+        List<Book> books = queryBooks("libAddress==town;title==num10", null,
+            Collections.singletonMap("libAddress", "library.address"));
+        assertEquals(1, books.size());
+        Book book = books.get(0);
+        assertEquals("Barry", book.getOwnerInfo().getName().getName());
+    }
+    
+    @Test
     public void testEqualsOwnerBirthDate() throws Exception {
         List<Book> books = queryBooks("ownerbdate==2000-01-01", null,
             Collections.singletonMap("ownerbdate", "ownerInfo.dateOfBirth"));

Modified: cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/Name.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/Name.java?rev=1406138&r1=1406137&r2=1406138&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/Name.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/Name.java
Tue Nov  6 13:48:06 2012
@@ -29,7 +29,7 @@ public class Name {
     public Name() {
         
     }
-    Name(String name) {
+    public Name(String name) {
         this.name = name;
     }
     

Modified: cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/test/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/test/resources/META-INF/persistence.xml?rev=1406138&r1=1406137&r2=1406138&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/test/resources/META-INF/persistence.xml
(original)
+++ cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/test/resources/META-INF/persistence.xml
Tue Nov  6 13:48:06 2012
@@ -2,17 +2,35 @@
              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">
-   <persistence-unit name="testUnit" transaction-type="RESOURCE_LOCAL">
-    <provider>org.hibernate.ejb.HibernatePersistence</provider>
-    <class>org.apache.cxf.jaxrs.ext.search.jpa.Book</class>
-    <exclude-unlisted-classes>true</exclude-unlisted-classes>
-    <properties>
+   <persistence-unit name="testUnitHibernate" transaction-type="RESOURCE_LOCAL">
+     <provider>org.hibernate.ejb.HibernatePersistence</provider>
+     <class>org.apache.cxf.jaxrs.ext.search.jpa.Book</class>
+     <class>org.apache.cxf.jaxrs.ext.search.jpa.Library</class>
+     <exclude-unlisted-classes>true</exclude-unlisted-classes>
+     <properties>
         <property name="hibernate.connection.url" value="jdbc:hsqldb:mem:books-jpa"/>
         <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver"/>
         <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
         <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
         <property name="hibernate.connection.username" value="sa"/>
         <property name="hibernate.connection.password" value=""/>
-    </properties>
-</persistence-unit>
+     </properties>
+   </persistence-unit>
+   <persistence-unit name="testUnitOpenJPA" transaction-type="RESOURCE_LOCAL">
+     <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
+     <class>org.apache.cxf.jaxrs.ext.search.jpa.Book</class>
+     <class>org.apache.cxf.jaxrs.ext.search.jpa.Library</class>
+     <class>org.apache.cxf.jaxrs.ext.search.jpa.OwnerAddress</class>
+     <class>org.apache.cxf.jaxrs.ext.search.jpa.OwnerInfo</class>
+     <class>org.apache.cxf.jaxrs.ext.search.jpa.Name</class>
+     <exclude-unlisted-classes>true</exclude-unlisted-classes>
+     <properties>
+        <property name="openjpa.ConnectionURL" value="jdbc:hsqldb:mem:books-jpa"/>
+        <property name="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver"/>
+        <property name="openjpa.jdbc.DBDictionary" value="hsql" />
+        <property name="openjpa.ConnectionUserName" value="sa"/>
+        <property name="openjpa.ConnectionPassword" value=""/>
+        <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema"/>
+     </properties>
+    </persistence-unit>
 </persistence>
\ No newline at end of file



Mime
View raw message