incubator-aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lin...@apache.org
Subject svn commit: r1027562 - in /incubator/aries/trunk/jpa/jpa-blueprint-aries/src: main/java/org/apache/aries/jpa/blueprint/aries/impl/NSHandler.java test/java/org/apache/aries/jpa/blueprint/aries/test/NSHandlerTest.java
Date Tue, 26 Oct 2010 13:57:10 GMT
Author: linsun
Date: Tue Oct 26 13:57:10 2010
New Revision: 1027562

URL: http://svn.apache.org/viewvc?rev=1027562&view=rev
Log:
ARIES-469 update the jpa:context filter to be more accurate

Modified:
    incubator/aries/trunk/jpa/jpa-blueprint-aries/src/main/java/org/apache/aries/jpa/blueprint/aries/impl/NSHandler.java
    incubator/aries/trunk/jpa/jpa-blueprint-aries/src/test/java/org/apache/aries/jpa/blueprint/aries/test/NSHandlerTest.java

Modified: incubator/aries/trunk/jpa/jpa-blueprint-aries/src/main/java/org/apache/aries/jpa/blueprint/aries/impl/NSHandler.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/jpa/jpa-blueprint-aries/src/main/java/org/apache/aries/jpa/blueprint/aries/impl/NSHandler.java?rev=1027562&r1=1027561&r2=1027562&view=diff
==============================================================================
--- incubator/aries/trunk/jpa/jpa-blueprint-aries/src/main/java/org/apache/aries/jpa/blueprint/aries/impl/NSHandler.java
(original)
+++ incubator/aries/trunk/jpa/jpa-blueprint-aries/src/main/java/org/apache/aries/jpa/blueprint/aries/impl/NSHandler.java
Tue Oct 26 13:57:10 2010
@@ -383,7 +383,7 @@ public class NSHandler implements Namesp
           .append("=*))");
       else
           filter.append("(").append(PersistenceContextProvider.PROXY_FACTORY_EMF_ATTRIBUTE)
-                  .append("=*)");
+                  .append("=true)");
 
       // Add the empty name filter if necessary
       if (!"".equals(unitName))

Modified: incubator/aries/trunk/jpa/jpa-blueprint-aries/src/test/java/org/apache/aries/jpa/blueprint/aries/test/NSHandlerTest.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/jpa/jpa-blueprint-aries/src/test/java/org/apache/aries/jpa/blueprint/aries/test/NSHandlerTest.java?rev=1027562&r1=1027561&r2=1027562&view=diff
==============================================================================
--- incubator/aries/trunk/jpa/jpa-blueprint-aries/src/test/java/org/apache/aries/jpa/blueprint/aries/test/NSHandlerTest.java
(original)
+++ incubator/aries/trunk/jpa/jpa-blueprint-aries/src/test/java/org/apache/aries/jpa/blueprint/aries/test/NSHandlerTest.java
Tue Oct 26 13:57:10 2010
@@ -271,7 +271,7 @@ public class NSHandlerTest {
     ReferenceMetadata reference = (ReferenceMetadata) registeredComponents.get(0);
     
     assertEquals(EntityManagerFactory.class.getName(), reference.getInterface());
-    assertEquals("(&(org.apache.aries.jpa.proxy.factory=*)(osgi.unit.name=myUnit))",
reference.getFilter());
+    assertEquals("(&(org.apache.aries.jpa.proxy.factory=true)(osgi.unit.name=myUnit))",
reference.getFilter());
     
     Map<String,Object> props = new HashMap<String, Object>();
     props.put(PersistenceContextProvider.PERSISTENCE_CONTEXT_TYPE, PersistenceContextType.TRANSACTION);
@@ -293,7 +293,7 @@ public class NSHandlerTest {
     ReferenceMetadata reference = (ReferenceMetadata) registeredComponents.get(0);
     
     assertEquals(EntityManagerFactory.class.getName(), reference.getInterface());
-    assertEquals("(&(org.apache.aries.jpa.proxy.factory=*)(osgi.unit.name=myUnit))",
reference.getFilter());
+    assertEquals("(&(org.apache.aries.jpa.proxy.factory=true)(osgi.unit.name=myUnit))",
reference.getFilter());
     
     Map<String,Object> props = new HashMap<String, Object>();
     props.put(PersistenceContextProvider.PERSISTENCE_CONTEXT_TYPE, PersistenceContextType.TRANSACTION);
@@ -317,7 +317,7 @@ public class NSHandlerTest {
     ReferenceMetadata reference = (ReferenceMetadata) registeredComponents.get(0);
     
     assertEquals(EntityManagerFactory.class.getName(), reference.getInterface());
-    assertEquals("(&(org.apache.aries.jpa.proxy.factory=*)(osgi.unit.name=myUnit))",
reference.getFilter());
+    assertEquals("(&(org.apache.aries.jpa.proxy.factory=true)(osgi.unit.name=myUnit))",
reference.getFilter());
     
     Map<String,Object> props = new HashMap<String, Object>();
     props.put(PersistenceContextProvider.PERSISTENCE_CONTEXT_TYPE, PersistenceContextType.TRANSACTION);
@@ -341,7 +341,7 @@ public class NSHandlerTest {
     ReferenceMetadata reference = (ReferenceMetadata) registeredComponents.get(0);
     
     assertEquals(EntityManagerFactory.class.getName(), reference.getInterface());
-    assertEquals("(&(org.apache.aries.jpa.proxy.factory=*)(osgi.unit.name=myUnit))",
reference.getFilter());
+    assertEquals("(&(org.apache.aries.jpa.proxy.factory=true)(osgi.unit.name=myUnit))",
reference.getFilter());
     
     Map<String,Object> props = new HashMap<String, Object>();
     props.put(PersistenceContextProvider.PERSISTENCE_CONTEXT_TYPE, PersistenceContextType.TRANSACTION);
@@ -362,7 +362,7 @@ public class NSHandlerTest {
     ReferenceMetadata reference = (ReferenceMetadata) registeredComponents.get(0);
     
     assertEquals(EntityManagerFactory.class.getName(), reference.getInterface());
-    assertEquals("(&(org.apache.aries.jpa.proxy.factory=*)"+NSHandler.EMPTY_UNIT_NAME_FILTER+")",

+    assertEquals("(&(org.apache.aries.jpa.proxy.factory=true)"+NSHandler.EMPTY_UNIT_NAME_FILTER+")",

         reference.getFilter());
     
     Map<String,Object> props = new HashMap<String, Object>();
@@ -386,7 +386,7 @@ public class NSHandlerTest {
     ReferenceMetadata reference = (ReferenceMetadata) registeredComponents.get(0);
     
     assertEquals(EntityManagerFactory.class.getName(), reference.getInterface());
-    assertEquals("(&(org.apache.aries.jpa.proxy.factory=*)"+NSHandler.EMPTY_UNIT_NAME_FILTER+")",

+    assertEquals("(&(org.apache.aries.jpa.proxy.factory=true)"+NSHandler.EMPTY_UNIT_NAME_FILTER+")",

         reference.getFilter());
     
     Map<String,Object> props = new HashMap<String, Object>();
@@ -452,7 +452,7 @@ public class NSHandlerTest {
       reference = (ReferenceMetadata) registeredComponents.get(0);
       
       assertEquals(EntityManagerFactory.class.getName(), reference.getInterface());
-      assertEquals("(&(org.apache.aries.jpa.proxy.factory=*)(osgi.unit.name=myUnit))",
reference.getFilter());
+      assertEquals("(&(org.apache.aries.jpa.proxy.factory=true)(osgi.unit.name=myUnit))",
reference.getFilter());
       
       Map<String,Object> props = new HashMap<String, Object>();
       props.put(PersistenceContextProvider.PERSISTENCE_CONTEXT_TYPE, PersistenceContextType.TRANSACTION);
@@ -499,7 +499,7 @@ public class NSHandlerTest {
       reference = (ReferenceMetadata) registeredComponents.get(0);
       
       assertEquals(EntityManagerFactory.class.getName(), reference.getInterface());
-      assertEquals("(&(org.apache.aries.jpa.proxy.factory=*)(osgi.unit.name=myUnit))",
reference.getFilter());
+      assertEquals("(&(org.apache.aries.jpa.proxy.factory=true)(osgi.unit.name=myUnit))",
reference.getFilter());
       
       Map<String,Object> props = new HashMap<String, Object>();
       props.put(PersistenceContextProvider.PERSISTENCE_CONTEXT_TYPE, PersistenceContextType.TRANSACTION);



Mime
View raw message