[seam-commits] Seam SVN: r13613 - in modules/persistence/trunk/impl/src: test/java/org/jboss/seam/persistence/test and 1 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Sun Aug 15 20:52:52 EDT 2010


Author: swd847
Date: 2010-08-15 20:52:52 -0400 (Sun, 15 Aug 2010)
New Revision: 13613

Modified:
   modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/AbstractManagedPersistenceContextBeanLifecycle.java
   modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/ManagedPersistenceContextExtension.java
   modules/persistence/trunk/impl/src/test/java/org/jboss/seam/persistence/test/ManagedPersistenceContextELTest.java
   modules/persistence/trunk/impl/src/test/java/org/jboss/seam/persistence/transactions/test/UserTransactionTest.java
Log:
fix seam persistence tests


Modified: modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/AbstractManagedPersistenceContextBeanLifecycle.java
===================================================================
--- modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/AbstractManagedPersistenceContextBeanLifecycle.java	2010-08-15 19:17:39 UTC (rev 13612)
+++ modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/AbstractManagedPersistenceContextBeanLifecycle.java	2010-08-16 00:52:52 UTC (rev 13613)
@@ -61,7 +61,7 @@
    protected AbstractManagedPersistenceContextBeanLifecycle(BeanManager manager, ClassLoader loader)
    {
       this.manager = manager;
-      proxyClass = Proxy.getProxyClass(PersistenceContext.class.getClassLoader(), EntityManager.class, Serializable.class, PersistenceContext.class);
+      proxyClass = Proxy.getProxyClass(loader, EntityManager.class, Serializable.class, PersistenceContext.class);
 
       try
       {
@@ -118,5 +118,4 @@
       }
       return persistenceContexts;
    }
-
 }

Modified: modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/ManagedPersistenceContextExtension.java
===================================================================
--- modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/ManagedPersistenceContextExtension.java	2010-08-15 19:17:39 UTC (rev 13612)
+++ modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/ManagedPersistenceContextExtension.java	2010-08-16 00:52:52 UTC (rev 13613)
@@ -118,7 +118,9 @@
       builder.setQualifiers(qualifiers);
       builder.setScope(scope);
       builder.getTypes().add(PersistenceContext.class);
-      builder.setBeanLifecycle(new ManagedPersistenceContextBeanLifecycle(qualifiers, loader, manager));
+      builder.getTypes().add(Object.class);
+      ManagedPersistenceContextBeanLifecycle lifecycle = new ManagedPersistenceContextBeanLifecycle(qualifiers, loader, manager);
+      builder.setBeanLifecycle(lifecycle);
       beans.add(builder.create());
    }
 

Modified: modules/persistence/trunk/impl/src/test/java/org/jboss/seam/persistence/test/ManagedPersistenceContextELTest.java
===================================================================
--- modules/persistence/trunk/impl/src/test/java/org/jboss/seam/persistence/test/ManagedPersistenceContextELTest.java	2010-08-15 19:17:39 UTC (rev 13612)
+++ modules/persistence/trunk/impl/src/test/java/org/jboss/seam/persistence/test/ManagedPersistenceContextELTest.java	2010-08-16 00:52:52 UTC (rev 13613)
@@ -35,7 +35,7 @@
 import org.jboss.seam.persistence.transaction.DefaultTransaction;
 import org.jboss.seam.persistence.transaction.SeamTransaction;
 import org.jboss.seam.persistence.transaction.TransactionExtension;
-import org.jboss.seam.persistence.util.EjbApi;
+import org.jboss.seam.persistence.util.NamingUtils;
 import org.jboss.seam.transactions.test.util.ArtifactNames;
 import org.jboss.seam.transactions.test.util.HelloService;
 import org.jboss.seam.transactions.test.util.Hotel;
@@ -61,7 +61,8 @@
       war.addPackage(TransactionExtension.class.getPackage());
       war.addPackage(PersistenceContextExtension.class.getPackage());
       war.addPackage(TransactionExtension.class.getPackage());
-      war.addClasses(ManagedPersistenceContextELTest.class, Hotel.class, ManagedPersistenceContextProvider.class, HotelNameProducer.class, HelloService.class, EjbApi.class);
+      war.addPackage(NamingUtils.class.getPackage());
+      war.addClasses(ManagedPersistenceContextELTest.class, Hotel.class, ManagedPersistenceContextProvider.class, HotelNameProducer.class, HelloService.class);
       war.addWebResource("META-INF/persistence.xml", "classes/META-INF/persistence.xml");
       war.addWebResource(new ByteArrayAsset(new byte[0]), "beans.xml");
       war.addWebResource("META-INF/services/javax.enterprise.inject.spi.Extension", "classes/META-INF/services/javax.enterprise.inject.spi.Extension");

Modified: modules/persistence/trunk/impl/src/test/java/org/jboss/seam/persistence/transactions/test/UserTransactionTest.java
===================================================================
--- modules/persistence/trunk/impl/src/test/java/org/jboss/seam/persistence/transactions/test/UserTransactionTest.java	2010-08-15 19:17:39 UTC (rev 13612)
+++ modules/persistence/trunk/impl/src/test/java/org/jboss/seam/persistence/transactions/test/UserTransactionTest.java	2010-08-16 00:52:52 UTC (rev 13613)
@@ -5,7 +5,6 @@
 import javax.inject.Inject;
 import javax.persistence.EntityManager;
 import javax.persistence.PersistenceContext;
-import javax.persistence.PersistenceException;
 import javax.transaction.HeuristicMixedException;
 import javax.transaction.HeuristicRollbackException;
 import javax.transaction.NotSupportedException;
@@ -42,7 +41,6 @@
       war.addLibraries(MavenArtifactResolver.resolve(ArtifactNames.WELD_EXTENSIONS));
       war.addLibraries(MavenArtifactResolver.resolve(ArtifactNames.SEAM_PERSISTENCE_API));
       war.addPackage(TransactionExtension.class.getPackage());
-      war.addPackage(PersistenceException.class.getPackage());
       war.addClasses(UserTransactionTest.class, Hotel.class, HelloService.class);
       war.addClass(SeamPersistenceProvider.class);
       war.addPackage(NamingUtils.class.getPackage());



More information about the seam-commits mailing list