[seam-commits] Seam SVN: r13431 - in modules/persistence/trunk: impl/src/main/java/org/jboss/seam/transaction and 1 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Sun Jul 18 05:59:44 EDT 2010
Author: swd847
Date: 2010-07-18 05:59:43 -0400 (Sun, 18 Jul 2010)
New Revision: 13431
Added:
modules/persistence/trunk/api/src/main/java/org/jboss/seam/persistence/transaction/UserTransaction.java
Removed:
modules/persistence/trunk/impl/src/main/java/org/jboss/seam/transaction/UserTransaction.java
Modified:
modules/persistence/trunk/impl/src/main/java/org/jboss/seam/transaction/AbstractUserTransaction.java
modules/persistence/trunk/impl/src/main/java/org/jboss/seam/transaction/Transaction.java
modules/persistence/trunk/impl/src/main/java/org/jboss/seam/transaction/TransactionExtension.java
modules/persistence/trunk/impl/src/main/java/org/jboss/seam/transaction/TransactionInterceptor.java
modules/persistence/trunk/impl/src/main/java/org/jboss/seam/transaction/Work.java
modules/persistence/trunk/impl/src/test/java/org/jboss/seam/transactions/test/TransactionInterceptorTest.java
modules/persistence/trunk/impl/src/test/java/org/jboss/seam/transactions/test/UserTransactionTest.java
Log:
move more classes to api
Copied: modules/persistence/trunk/api/src/main/java/org/jboss/seam/persistence/transaction/UserTransaction.java (from rev 13428, modules/persistence/trunk/impl/src/main/java/org/jboss/seam/transaction/UserTransaction.java)
===================================================================
--- modules/persistence/trunk/api/src/main/java/org/jboss/seam/persistence/transaction/UserTransaction.java (rev 0)
+++ modules/persistence/trunk/api/src/main/java/org/jboss/seam/persistence/transaction/UserTransaction.java 2010-07-18 09:59:43 UTC (rev 13431)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.persistence.transaction;
+
+import javax.persistence.EntityManager;
+import javax.transaction.Synchronization;
+import javax.transaction.SystemException;
+
+/**
+ * Extends the standard UserTransaction interface with a couple of helpful
+ * methods.
+ *
+ * @author Gavin King
+ *
+ */
+public interface UserTransaction extends javax.transaction.UserTransaction
+{
+
+ public boolean isActive() throws SystemException;
+
+ public boolean isActiveOrMarkedRollback() throws SystemException;
+
+ public boolean isRolledBackOrMarkedRollback() throws SystemException;
+
+ public boolean isMarkedRollback() throws SystemException;
+
+ public boolean isNoTransaction() throws SystemException;
+
+ public boolean isRolledBack() throws SystemException;
+
+ public boolean isCommitted() throws SystemException;
+
+ public boolean isConversationContextRequired();
+
+ public abstract void registerSynchronization(Synchronization sync);
+
+ public void enlist(EntityManager entityManager) throws SystemException;
+}
Modified: modules/persistence/trunk/impl/src/main/java/org/jboss/seam/transaction/AbstractUserTransaction.java
===================================================================
--- modules/persistence/trunk/impl/src/main/java/org/jboss/seam/transaction/AbstractUserTransaction.java 2010-07-18 09:57:51 UTC (rev 13430)
+++ modules/persistence/trunk/impl/src/main/java/org/jboss/seam/transaction/AbstractUserTransaction.java 2010-07-18 09:59:43 UTC (rev 13431)
@@ -31,6 +31,8 @@
import javax.transaction.Synchronization;
import javax.transaction.SystemException;
+import org.jboss.seam.persistence.transaction.UserTransaction;
+
/**
* Base implementation of UserTransaction
*
Modified: modules/persistence/trunk/impl/src/main/java/org/jboss/seam/transaction/Transaction.java
===================================================================
--- modules/persistence/trunk/impl/src/main/java/org/jboss/seam/transaction/Transaction.java 2010-07-18 09:57:51 UTC (rev 13430)
+++ modules/persistence/trunk/impl/src/main/java/org/jboss/seam/transaction/Transaction.java 2010-07-18 09:59:43 UTC (rev 13431)
@@ -27,6 +27,7 @@
import javax.naming.NameNotFoundException;
import javax.naming.NamingException;
+import org.jboss.seam.persistence.transaction.UserTransaction;
import org.jboss.weld.extensions.managedproducer.ManagedProducer;
/**
Modified: modules/persistence/trunk/impl/src/main/java/org/jboss/seam/transaction/TransactionExtension.java
===================================================================
--- modules/persistence/trunk/impl/src/main/java/org/jboss/seam/transaction/TransactionExtension.java 2010-07-18 09:57:51 UTC (rev 13430)
+++ modules/persistence/trunk/impl/src/main/java/org/jboss/seam/transaction/TransactionExtension.java 2010-07-18 09:59:43 UTC (rev 13431)
@@ -33,6 +33,7 @@
import javax.enterprise.inject.spi.InjectionPoint;
import javax.enterprise.inject.spi.InjectionTarget;
+import org.jboss.seam.persistence.transaction.UserTransaction;
import org.jboss.weld.extensions.annotated.AnnotatedTypeBuilder;
import org.jboss.weld.extensions.bean.BeanBuilder;
import org.jboss.weld.extensions.bean.BeanImpl;
Modified: modules/persistence/trunk/impl/src/main/java/org/jboss/seam/transaction/TransactionInterceptor.java
===================================================================
--- modules/persistence/trunk/impl/src/main/java/org/jboss/seam/transaction/TransactionInterceptor.java 2010-07-18 09:57:51 UTC (rev 13430)
+++ modules/persistence/trunk/impl/src/main/java/org/jboss/seam/transaction/TransactionInterceptor.java 2010-07-18 09:59:43 UTC (rev 13431)
@@ -33,6 +33,7 @@
import org.jboss.seam.persistence.transaction.TransactionPropagation;
import org.jboss.seam.persistence.transaction.Transactional;
+import org.jboss.seam.persistence.transaction.UserTransaction;
/**
* Implements transaction propagation rules for Seam JavaBean components.
Deleted: modules/persistence/trunk/impl/src/main/java/org/jboss/seam/transaction/UserTransaction.java
===================================================================
--- modules/persistence/trunk/impl/src/main/java/org/jboss/seam/transaction/UserTransaction.java 2010-07-18 09:57:51 UTC (rev 13430)
+++ modules/persistence/trunk/impl/src/main/java/org/jboss/seam/transaction/UserTransaction.java 2010-07-18 09:59:43 UTC (rev 13431)
@@ -1,57 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.seam.transaction;
-
-import javax.persistence.EntityManager;
-import javax.transaction.Synchronization;
-import javax.transaction.SystemException;
-
-/**
- * Extends the standard UserTransaction interface with a couple of helpful
- * methods.
- *
- * @author Gavin King
- *
- */
-public interface UserTransaction extends javax.transaction.UserTransaction
-{
-
- public boolean isActive() throws SystemException;
-
- public boolean isActiveOrMarkedRollback() throws SystemException;
-
- public boolean isRolledBackOrMarkedRollback() throws SystemException;
-
- public boolean isMarkedRollback() throws SystemException;
-
- public boolean isNoTransaction() throws SystemException;
-
- public boolean isRolledBack() throws SystemException;
-
- public boolean isCommitted() throws SystemException;
-
- public boolean isConversationContextRequired();
-
- public abstract void registerSynchronization(Synchronization sync);
-
- public void enlist(EntityManager entityManager) throws SystemException;
-}
Modified: modules/persistence/trunk/impl/src/main/java/org/jboss/seam/transaction/Work.java
===================================================================
--- modules/persistence/trunk/impl/src/main/java/org/jboss/seam/transaction/Work.java 2010-07-18 09:57:51 UTC (rev 13430)
+++ modules/persistence/trunk/impl/src/main/java/org/jboss/seam/transaction/Work.java 2010-07-18 09:59:43 UTC (rev 13431)
@@ -44,7 +44,7 @@
return !transactionActive;
}
- public final T workInTransaction(org.jboss.seam.transaction.UserTransaction transaction) throws Exception
+ public final T workInTransaction(org.jboss.seam.persistence.transaction.UserTransaction transaction) throws Exception
{
boolean transactionActive = transaction.isActiveOrMarkedRollback() || transaction.isRolledBack();
// TODO: temp workaround, what should we really do in this case??
Modified: modules/persistence/trunk/impl/src/test/java/org/jboss/seam/transactions/test/TransactionInterceptorTest.java
===================================================================
--- modules/persistence/trunk/impl/src/test/java/org/jboss/seam/transactions/test/TransactionInterceptorTest.java 2010-07-18 09:57:51 UTC (rev 13430)
+++ modules/persistence/trunk/impl/src/test/java/org/jboss/seam/transactions/test/TransactionInterceptorTest.java 2010-07-18 09:59:43 UTC (rev 13431)
@@ -15,9 +15,9 @@
import org.jboss.arquillian.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.seam.persistence.transaction.UserTransaction;
import org.jboss.seam.transaction.Transaction;
import org.jboss.seam.transaction.TransactionInterceptor;
-import org.jboss.seam.transaction.UserTransaction;
import org.jboss.seam.transactions.test.util.ArtifactNames;
import org.jboss.seam.transactions.test.util.DontRollBackException;
import org.jboss.seam.transactions.test.util.EntityManagerProvider;
Modified: modules/persistence/trunk/impl/src/test/java/org/jboss/seam/transactions/test/UserTransactionTest.java
===================================================================
--- modules/persistence/trunk/impl/src/test/java/org/jboss/seam/transactions/test/UserTransactionTest.java 2010-07-18 09:57:51 UTC (rev 13430)
+++ modules/persistence/trunk/impl/src/test/java/org/jboss/seam/transactions/test/UserTransactionTest.java 2010-07-18 09:59:43 UTC (rev 13431)
@@ -16,8 +16,8 @@
import org.jboss.arquillian.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.seam.persistence.transaction.UserTransaction;
import org.jboss.seam.transaction.Transaction;
-import org.jboss.seam.transaction.UserTransaction;
import org.jboss.seam.transactions.test.util.ArtifactNames;
import org.jboss.seam.transactions.test.util.MavenArtifactResolver;
import org.jboss.shrinkwrap.api.Archive;
More information about the seam-commits
mailing list