Author: pete.muir(a)jboss.org
Date: 2009-03-08 17:56:27 -0400 (Sun, 08 Mar 2009)
New Revision: 1820
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/mock/MockTransactionServices.java
ri/trunk/spi/pom.xml
ri/trunk/spi/src/main/java/org/jboss/webbeans/transaction/spi/TransactionServices.java
Log:
Commit the SPI
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/mock/MockTransactionServices.java
===================================================================
---
ri/trunk/impl/src/main/java/org/jboss/webbeans/mock/MockTransactionServices.java 2009-03-08
21:41:55 UTC (rev 1819)
+++
ri/trunk/impl/src/main/java/org/jboss/webbeans/mock/MockTransactionServices.java 2009-03-08
21:56:27 UTC (rev 1820)
@@ -40,7 +40,6 @@
return false;
}
- @Override
public void registerSynchronization(Synchronization synchronizedObserver)
{
// TODO Auto-generated method stub
Modified: ri/trunk/spi/pom.xml
===================================================================
--- ri/trunk/spi/pom.xml 2009-03-08 21:41:55 UTC (rev 1819)
+++ ri/trunk/spi/pom.xml 2009-03-08 21:56:27 UTC (rev 1820)
@@ -39,6 +39,10 @@
<artifactId>servlet-api</artifactId>
<optional>true</optional>
</dependency>
+ <dependency>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ </dependency>
</dependencies>
Modified:
ri/trunk/spi/src/main/java/org/jboss/webbeans/transaction/spi/TransactionServices.java
===================================================================
---
ri/trunk/spi/src/main/java/org/jboss/webbeans/transaction/spi/TransactionServices.java 2009-03-08
21:41:55 UTC (rev 1819)
+++
ri/trunk/spi/src/main/java/org/jboss/webbeans/transaction/spi/TransactionServices.java 2009-03-08
21:56:27 UTC (rev 1820)
@@ -1,5 +1,7 @@
package org.jboss.webbeans.transaction.spi;
+import javax.transaction.Synchronization;
+
/**
* <p>
* The container must implement the services related to transactional behavior
@@ -11,7 +13,7 @@
* observer methods which are activated based on the phase and status of a
* currently active transaction. In order to use these abilities, the container
* must provide these intermediary services which in turn may interact with an
- * application server and JTA or any other type of transaction service provider.
+ * application server and JTA.
* </p>
*
* @author David Allen
@@ -20,7 +22,8 @@
public interface TransactionServices
{
/**
- * Possible status conditions for a transaction.
+ * Possible status conditions for a transaction. This can be used by SPI
+ * providers to keep track for which status an observer is used.
*/
public static enum Status
{
@@ -28,31 +31,15 @@
}
/**
- * Registers a task to be executed immediately before the current transaction
- * is committed or rolled back.
+ * Registers a synchronization object with the currently executing
+ * transaction.
*
- * @param task The Runnable that will be executed
+ * @see javax.transaction.Synchronization
+ * @param synchronizedObserver
*/
- public void executeBeforeTransactionCompletion(Runnable task);
+ public void registerSynchronization(Synchronization synchronizedObserver);
/**
- * Registers a task to be executed immediately after the current transaction
- * is committed or rolled back.
- *
- * @param task The Runnable that will be executed
- */
- public void executeAfterTransactionCompletion(Runnable task);
-
- /**
- * Registers a task to be executed immediately after the current transaction
- * is committed or rolled back, but only one depending on the status
- * provided.
- *
- * @param task The Runnable that will be executed
- */
- public void executeAfterTransactionCompletion(Runnable task, Status desiredStatus);
-
- /**
* Queries the status of the current execution to see if a transaction is
* currently active.
*