[seam-commits] Seam SVN: r13640 - modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/transaction.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Thu Aug 26 03:48:24 EDT 2010
Author: swd847
Date: 2010-08-26 03:48:24 -0400 (Thu, 26 Aug 2010)
New Revision: 13640
Modified:
modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/transaction/AbstractUserTransaction.java
modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/transaction/CMTTransaction.java
modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/transaction/EntityTransaction.java
modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/transaction/NoTransaction.java
modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/transaction/UTTransaction.java
Log:
fix transaction proxiability
Modified: modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/transaction/AbstractUserTransaction.java
===================================================================
--- modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/transaction/AbstractUserTransaction.java 2010-08-25 23:43:14 UTC (rev 13639)
+++ modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/transaction/AbstractUserTransaction.java 2010-08-26 07:48:24 UTC (rev 13640)
@@ -31,8 +31,6 @@
import javax.transaction.Synchronization;
import javax.transaction.SystemException;
-import org.jboss.seam.persistence.transaction.SeamTransaction;
-
/**
* Base implementation of UserTransaction
*
@@ -42,13 +40,8 @@
public abstract class AbstractUserTransaction implements SeamTransaction
{
- private final Synchronizations synchronizations;
+ private Synchronizations synchronizations;
- public AbstractUserTransaction(Synchronizations synchronizations)
- {
- this.synchronizations = synchronizations;
- }
-
public boolean isActive() throws SystemException
{
return getStatus() == STATUS_ACTIVE;
@@ -106,4 +99,9 @@
return synchronizations;
}
+ protected void setSynchronizations(Synchronizations synchronizations)
+ {
+ this.synchronizations = synchronizations;
+ }
+
}
Modified: modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/transaction/CMTTransaction.java
===================================================================
--- modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/transaction/CMTTransaction.java 2010-08-25 23:43:14 UTC (rev 13639)
+++ modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/transaction/CMTTransaction.java 2010-08-26 07:48:24 UTC (rev 13640)
@@ -51,7 +51,7 @@
public CMTTransaction(EJBContext ejbContext, Synchronizations sync)
{
- super(sync);
+ setSynchronizations(sync);
this.ejbContext = ejbContext;
if (ejbContext == null)
{
Modified: modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/transaction/EntityTransaction.java
===================================================================
--- modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/transaction/EntityTransaction.java 2010-08-25 23:43:14 UTC (rev 13639)
+++ modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/transaction/EntityTransaction.java 2010-08-26 07:48:24 UTC (rev 13640)
@@ -34,7 +34,6 @@
import javax.transaction.SystemException;
import org.jboss.seam.persistence.SeamPersistenceProvider;
-import org.jboss.weld.extensions.core.Veto;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -48,7 +47,7 @@
*
*/
@RequestScoped
- at Veto
+ at DefaultTransaction
public class EntityTransaction extends AbstractUserTransaction
{
private static final Logger log = LoggerFactory.getLogger(EntityTransaction.class);
@@ -60,11 +59,15 @@
private Instance<SeamPersistenceProvider> persistenceProvider;
@Inject
- public EntityTransaction(Synchronizations sync)
+ public void init(Synchronizations sync)
{
- super(sync);
+ setSynchronizations(sync);
}
+ public EntityTransaction()
+ {
+ }
+
private javax.persistence.EntityTransaction getDelegate()
{
return entityManager.getTransaction();
Modified: modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/transaction/NoTransaction.java
===================================================================
--- modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/transaction/NoTransaction.java 2010-08-25 23:43:14 UTC (rev 13639)
+++ modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/transaction/NoTransaction.java 2010-08-26 07:48:24 UTC (rev 13640)
@@ -45,7 +45,6 @@
public NoTransaction()
{
- super(null);
}
public void begin() throws NotSupportedException, SystemException
Modified: modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/transaction/UTTransaction.java
===================================================================
--- modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/transaction/UTTransaction.java 2010-08-25 23:43:14 UTC (rev 13639)
+++ modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/transaction/UTTransaction.java 2010-08-26 07:48:24 UTC (rev 13640)
@@ -48,7 +48,7 @@
UTTransaction(javax.transaction.UserTransaction delegate, Synchronizations sync)
{
- super(sync);
+ this.setSynchronizations(sync);
this.delegate = delegate;
if (delegate == null)
{
More information about the seam-commits
mailing list