openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r789056 - in /incubator/openwebbeans/trunk/webbeans-jpa/src/test/java/org/apache/webbeans/test: component/resource/TstResourcePersistenceBean.java unittests/resource/ResourceInjectionTest.java
Date Sun, 28 Jun 2009 06:42:23 GMT
Author: gerdogdu
Date: Sun Jun 28 06:42:23 2009
New Revision: 789056

URL: http://svn.apache.org/viewvc?rev=789056&view=rev
Log:
Removing method based resource injection. Specification does not support those kind of injection.
See section 3.5 and Section 5 for injection semantic. Java EE resource are injected by producer
field
resource kind. We have to changed our resolution into bean based.

Modified:
    incubator/openwebbeans/trunk/webbeans-jpa/src/test/java/org/apache/webbeans/test/component/resource/TstResourcePersistenceBean.java
    incubator/openwebbeans/trunk/webbeans-jpa/src/test/java/org/apache/webbeans/test/unittests/resource/ResourceInjectionTest.java

Modified: incubator/openwebbeans/trunk/webbeans-jpa/src/test/java/org/apache/webbeans/test/component/resource/TstResourcePersistenceBean.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-jpa/src/test/java/org/apache/webbeans/test/component/resource/TstResourcePersistenceBean.java?rev=789056&r1=789055&r2=789056&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-jpa/src/test/java/org/apache/webbeans/test/component/resource/TstResourcePersistenceBean.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-jpa/src/test/java/org/apache/webbeans/test/component/resource/TstResourcePersistenceBean.java
Sun Jun 28 06:42:23 2009
@@ -60,7 +60,7 @@
         return emfMethodInjected;
     }
 
-    @PersistenceUnit(unitName="openwebbeanstest")
+    //@PersistenceUnit(unitName="openwebbeanstest") Spec does not support thid
     public void setMethodInjectedEntityManagerFactory(EntityManagerFactory emf2)
     {
         this.emfMethodInjected = emf2;
@@ -71,7 +71,7 @@
         return emMethodInjected;
     }
 
-    @PersistenceContext(unitName="openwebbeanstest")
+    //@PersistenceContext(unitName="openwebbeanstest")
     public void setMethodInjectedEntityManager(EntityManager em3)
     {
         this.emMethodInjected = em3;

Modified: incubator/openwebbeans/trunk/webbeans-jpa/src/test/java/org/apache/webbeans/test/unittests/resource/ResourceInjectionTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-jpa/src/test/java/org/apache/webbeans/test/unittests/resource/ResourceInjectionTest.java?rev=789056&r1=789055&r2=789056&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-jpa/src/test/java/org/apache/webbeans/test/unittests/resource/ResourceInjectionTest.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-jpa/src/test/java/org/apache/webbeans/test/unittests/resource/ResourceInjectionTest.java
Sun Jun 28 06:42:23 2009
@@ -66,12 +66,12 @@
         Assert.assertNotNull(em2);
 
         Assert.assertTrue(em != em2);
-        
-        // test method injection
-        EntityManagerFactory emf2 = persBean.getMethodInjectedEntityManagerFactory();
-        Assert.assertNotNull(emf2);
-        
-        EntityManager em3 = persBean.getMethodInjectedEntityManager();
-        Assert.assertNotNull(em3);
+//Spec seems does not support this type of injection, See SECTION 3.5 and See SECTION 5 First
Paragraph
+//        // test method injection
+//        EntityManagerFactory emf2 = persBean.getMethodInjectedEntityManagerFactory();
+//        Assert.assertNotNull(emf2);
+//        
+//        EntityManager em3 = persBean.getMethodInjectedEntityManager();
+//        Assert.assertNotNull(em3);
     }
 }



Mime
View raw message