[jboss-cvs] jboss-seam/src/ioc/org/jboss/seam/ioc/spring ...
Michael Youngstrom
youngm at gmail.com
Wed May 30 13:28:23 EDT 2007
User: myoungstrom
Date: 07/05/30 13:28:23
Modified: src/ioc/org/jboss/seam/ioc/spring
SeamManagedEntityManagerFactory.java
Log:
rolled back JBSEAM-1365
Revision Changes Path
1.3 +0 -14 jboss-seam/src/ioc/org/jboss/seam/ioc/spring/SeamManagedEntityManagerFactory.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: SeamManagedEntityManagerFactory.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/ioc/org/jboss/seam/ioc/spring/SeamManagedEntityManagerFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- SeamManagedEntityManagerFactory.java 29 May 2007 23:20:08 -0000 1.2
+++ SeamManagedEntityManagerFactory.java 30 May 2007 17:28:23 -0000 1.3
@@ -8,12 +8,10 @@
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
-import javax.persistence.TransactionRequiredException;
import org.jboss.seam.Component;
import org.jboss.seam.log.LogProvider;
import org.jboss.seam.log.Logging;
-import org.springframework.transaction.support.TransactionSynchronizationManager;
import org.springframework.util.ClassUtils;
/**
@@ -59,18 +57,6 @@
log.debug("Returning a Seam Managed PC from createEntityManager()");
SeamLifecycleUtils.beginTransactionalSeamCall();
EntityManager em = (EntityManager) Component.getInstance(persistenceContextName);
- //An extended EntityManager may not join the current Transaction
- //because spring may think it's creating a new EntityManager that
- //will join the current transaction automatically instead of
- //getting an old EntityManager.
- if(TransactionSynchronizationManager.isActualTransactionActive()) {
- try {
- em.joinTransaction();
- }
- catch (TransactionRequiredException ex) {
- log.debug("Could not join JTA transaction because none was active", ex);
- }
- }
return (EntityManager) Proxy.newProxyInstance(getClass().getClassLoader(), ClassUtils
.getAllInterfaces(em), new SeamManagedPersistenceContextHandler(em));
}
More information about the jboss-cvs-commits
mailing list