OW2 Consortium
Search OW2 Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | gotm-commits List | July 2005 Index

<--  Date Index  --> <--  Thread Index  -->

CVS update of gotm-jts (28 files)


    Date: Monday, July 11, 2005 @ 10:27:09
  Author: rouvoy
    Path: /cvsroot/gotm/gotm-jts

   Added: 
examples/benchmark/src/fractal/org/objectweb/gotm/lib/FcBenchExplorer.fractal
          
          
examples/local/src/fractal/org/objectweb/gotm/lib/FcLocalExplorer.fractal
           src/fractal/org/objectweb/gotm/lib/JtsTransaction.fractal
          src/fractal/org/objectweb/gotm/lib/JtsTransactionManager.fractal
          src/fractal/org/objectweb/gotm/lib/TpResourceManager.fractal
          src/fractal/org/objectweb/gotm/lib/TpTransaction.fractal
          src/java/org/objectweb/gotm/lib/jta/xa/XAResourceActionProvider.java
           src/java/org/objectweb/gotm/lib/jta/xa/XidProvider.java
Modified: .classpath .settings/org.eclipse.core.resources.prefs
          
examples/benchmark/src/fractal/org/objectweb/gotm/jts/benchmark/FcApplication.fractal
          
          
examples/benchmark/src/fractal/org/objectweb/gotm/jts/benchmark/FcExplorer.fractal
          
          
examples/local/src/fractal/org/objectweb/gotm/jts/local/FcApplication.fractal
          
          
examples/local/src/fractal/org/objectweb/gotm/jts/local/FcExplorer.fractal
          
          
examples/local/src/fractal/org/objectweb/gotm/lib/FcExplorerImpl.fractal
          
          
examples/local/src/java/org/objectweb/gotm/jts/local/CounterImpl.java
          
          
src/java/org/objectweb/gotm/lib/jta/SynchronizationActionProvider.java
           src/java/org/objectweb/gotm/lib/jta/TransactionImpl.java
          test/java/org/objectweb/gotm/jts/xa/XABoolean.java
          test/java/org/objectweb/gotm/jts/xa/XAInteger.java
 Removed: 
examples/benchmark/src/fractal/org/objectweb/gotm/lib/FcExplorerImpl.fractal
          
          src/fractal/org/objectweb/gotm/lib/FcTransactionManagerImpl.fractal
           src/fractal/org/objectweb/gotm/lib/TpJTSImpl.fractal
          src/fractal/org/objectweb/gotm/lib/TpManagerImpl.fractal
          src/fractal/org/objectweb/gotm/lib/TpResourceImpl.fractal
          src/fractal/org/objectweb/gotm/lib/TpTransactionImpl.fractal
          src/java/org/objectweb/gotm/lib/jta/XAFlagsConverter.java
          src/java/org/objectweb/gotm/lib/jta/XAResourceActionProvider.java

* Adding XA interfaces support,
* Adding adaptive commit protocol support,
* Adding logging support,
* Cosmetic updates.


---------------------------------------------------------------------------------------+
 .classpath                                                                   
         |    2 
 .settings/org.eclipse.core.resources.prefs                                   
         |   15 
 
examples/benchmark/src/fractal/org/objectweb/gotm/jts/benchmark/FcApplication.fractal
 |    2 
 
examples/benchmark/src/fractal/org/objectweb/gotm/jts/benchmark/FcExplorer.fractal
    |    2 
 
examples/benchmark/src/fractal/org/objectweb/gotm/lib/FcBenchExplorer.fractal 
        |   14 
 examples/benchmark/src/fractal/org/objectweb/gotm/lib/FcExplorerImpl.fractal 
         |   14 
 
examples/local/src/fractal/org/objectweb/gotm/jts/local/FcApplication.fractal 
        |    2 
 examples/local/src/fractal/org/objectweb/gotm/jts/local/FcExplorer.fractal   
         |    2 
 examples/local/src/fractal/org/objectweb/gotm/lib/FcExplorerImpl.fractal     
         |    2 
 examples/local/src/fractal/org/objectweb/gotm/lib/FcLocalExplorer.fractal    
         |   14 
 examples/local/src/java/org/objectweb/gotm/jts/local/CounterImpl.java        
         |   43 +-
 src/fractal/org/objectweb/gotm/lib/FcTransactionManagerImpl.fractal          
         |   19 -
 src/fractal/org/objectweb/gotm/lib/JtsTransaction.fractal                    
         |   46 ++
 src/fractal/org/objectweb/gotm/lib/JtsTransactionManager.fractal             
         |   19 +
 src/fractal/org/objectweb/gotm/lib/TpJTSImpl.fractal                         
         |   44 --
 src/fractal/org/objectweb/gotm/lib/TpManagerImpl.fractal                     
         |   37 -
 src/fractal/org/objectweb/gotm/lib/TpResourceImpl.fractal                    
         |   56 --
 src/fractal/org/objectweb/gotm/lib/TpResourceManager.fractal                 
         |   57 +++
 src/fractal/org/objectweb/gotm/lib/TpTransaction.fractal                     
         |   49 ++
 src/fractal/org/objectweb/gotm/lib/TpTransactionImpl.fractal                 
         |   43 --
 src/java/org/objectweb/gotm/lib/jta/SynchronizationActionProvider.java       
         |   25 -
 src/java/org/objectweb/gotm/lib/jta/TransactionImpl.java                     
         |  176 +++++----
 src/java/org/objectweb/gotm/lib/jta/XAFlagsConverter.java                    
         |   84 ----
 src/java/org/objectweb/gotm/lib/jta/XAResourceActionProvider.java            
         |  152 --------
 src/java/org/objectweb/gotm/lib/jta/xa/XAResourceActionProvider.java         
         |  189 ++++++++++
 src/java/org/objectweb/gotm/lib/jta/xa/XidProvider.java                      
         |  102 +++++
 test/java/org/objectweb/gotm/jts/xa/XABoolean.java                           
         |    4 
 test/java/org/objectweb/gotm/jts/xa/XAInteger.java                           
         |    4 
 28 files changed, 645 insertions(+), 573 deletions(-)


Index: gotm-jts/.classpath
diff -u gotm-jts/.classpath:1.8 gotm-jts/.classpath:1.9
--- gotm-jts/.classpath:1.8     Tue Jun 28 10:02:28 2005
+++ gotm-jts/.classpath Mon Jul 11 10:27:09 2005
@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
        <classpathentry kind="src" path="src/java"/>
+       <classpathentry kind="src" path="src/fractal"/>
        <classpathentry kind="src" path="examples/benchmark/src/fractal"/>
        <classpathentry kind="src" path="examples/benchmark/src/java"/>
        <classpathentry kind="src" path="examples/local/src/fractal"/>
        <classpathentry kind="src" path="examples/local/src/java"/>
-       <classpathentry kind="src" path="src/fractal"/>
        <classpathentry kind="src" path="test/java"/>
        <classpathentry kind="src" path="/ow-transaction"/>
        <classpathentry kind="src" path="/gotm"/>
Index: gotm-jts/.settings/org.eclipse.core.resources.prefs
diff -u gotm-jts/.settings/org.eclipse.core.resources.prefs:1.6 
gotm-jts/.settings/org.eclipse.core.resources.prefs:1.7
--- gotm-jts/.settings/org.eclipse.core.resources.prefs:1.6     Tue Jun 28 
10:02:28 2005
+++ gotm-jts/.settings/org.eclipse.core.resources.prefs Mon Jul 11 10:27:08 
2005
@@ -1,13 +1,12 @@
-#Mon Jun 27 16:47:12 CEST 2005
+#Tue Jul 05 11:19:09 CEST 2005
 eclipse.preferences.version=1
 
encoding//examples/benchmark/src/fractal/org/objectweb/gotm/jts/benchmark/FcApplication.fractal=ISO-8859-1
 
encoding//examples/benchmark/src/fractal/org/objectweb/gotm/jts/benchmark/FcExplorer.fractal=ISO-8859-1
-encoding//examples/benchmark/src/fractal/org/objectweb/gotm/lib/FcExplorerImpl.fractal=ISO-8859-1
+encoding//examples/benchmark/src/fractal/org/objectweb/gotm/lib/FcBenchExplorer.fractal=ISO-8859-1
 
encoding//examples/local/src/fractal/org/objectweb/gotm/jts/local/FcApplication.fractal=ISO-8859-1
 
encoding//examples/local/src/fractal/org/objectweb/gotm/jts/local/FcExplorer.fractal=ISO-8859-1
-encoding//examples/local/src/fractal/org/objectweb/gotm/lib/FcExplorerImpl.fractal=ISO-8859-1
-encoding//src/fractal/org/objectweb/gotm/lib/FcTransactionManagerImpl.fractal=ISO-8859-1
-encoding//src/fractal/org/objectweb/gotm/lib/TpJTSImpl.fractal=ISO-8859-1
-encoding//src/fractal/org/objectweb/gotm/lib/TpManagerImpl.fractal=ISO-8859-1
-encoding//src/fractal/org/objectweb/gotm/lib/TpResourceImpl.fractal=ISO-8859-1
-encoding//src/fractal/org/objectweb/gotm/lib/TpTransactionImpl.fractal=ISO-8859-1
+encoding//examples/local/src/fractal/org/objectweb/gotm/lib/FcLocalExplorer.fractal=ISO-8859-1
+encoding//src/fractal/org/objectweb/gotm/lib/JtsTransaction.fractal=ISO-8859-1
+encoding//src/fractal/org/objectweb/gotm/lib/JtsTransactionManager.fractal=ISO-8859-1
+encoding//src/fractal/org/objectweb/gotm/lib/TpResourceManager.fractal=ISO-8859-1
+encoding//src/fractal/org/objectweb/gotm/lib/TpTransaction.fractal=ISO-8859-1
Index: 
gotm-jts/examples/benchmark/src/fractal/org/objectweb/gotm/jts/benchmark/FcApplication.fractal
diff -u 
gotm-jts/examples/benchmark/src/fractal/org/objectweb/gotm/jts/benchmark/FcApplication.fractal:1.1
 
gotm-jts/examples/benchmark/src/fractal/org/objectweb/gotm/jts/benchmark/FcApplication.fractal:1.2
--- 
gotm-jts/examples/benchmark/src/fractal/org/objectweb/gotm/jts/benchmark/FcApplication.fractal:1.1
  Tue Jun 28 10:02:27 2005
+++ 
gotm-jts/examples/benchmark/src/fractal/org/objectweb/gotm/jts/benchmark/FcApplication.fractal
      Mon Jul 11 10:27:08 2005
@@ -15,7 +15,7 @@
   <component name="FcCounter"
        definition="org.objectweb.gotm.jts.benchmark.TpCounterImpl"/>
   <component name="FcTransactionManager"
-       definition="org.objectweb.gotm.lib.FcTransactionManagerImpl"/>
+       definition="org.objectweb.gotm.lib.JtsTransactionManager"/>
 
   <binding client="this.r"
            server="FcClient.runnable"/>
Index: 
gotm-jts/examples/benchmark/src/fractal/org/objectweb/gotm/jts/benchmark/FcExplorer.fractal
diff -u 
gotm-jts/examples/benchmark/src/fractal/org/objectweb/gotm/jts/benchmark/FcExplorer.fractal:1.1
 
gotm-jts/examples/benchmark/src/fractal/org/objectweb/gotm/jts/benchmark/FcExplorer.fractal:1.2
--- 
gotm-jts/examples/benchmark/src/fractal/org/objectweb/gotm/jts/benchmark/FcExplorer.fractal:1.1
     Tue Jun 28 10:02:27 2005
+++ 
gotm-jts/examples/benchmark/src/fractal/org/objectweb/gotm/jts/benchmark/FcExplorer.fractal
 Mon Jul 11 10:27:08 2005
@@ -5,7 +5,7 @@
 
 <definition name="org.objectweb.gotm.jts.benchmark.FcExplorer">
   <component name="FcExplorer"
-       definition="org.objectweb.gotm.lib.FcExplorerImpl"/>
+       definition="org.objectweb.gotm.lib.FcBenchExplorer"/>
   <component name="FcApplication"
        definition="org.objectweb.gotm.jts.benchmark.FcApplication"/>
 
Index: 
gotm-jts/examples/benchmark/src/fractal/org/objectweb/gotm/lib/FcBenchExplorer.fractal
diff -u /dev/null 
gotm-jts/examples/benchmark/src/fractal/org/objectweb/gotm/lib/FcBenchExplorer.fractal:1.1
--- /dev/null   Mon Jul 11 10:27:09 2005
+++ 
gotm-jts/examples/benchmark/src/fractal/org/objectweb/gotm/lib/FcBenchExplorer.fractal
      Mon Jul 11 10:27:08 2005
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC "-//objectweb.org//DTD Fractal ADL 2.0//EN" 
"classpath://org/objectweb/fractal/adl/xml/standard.dtd">
+<!--<!DOCTYPE definition PUBLIC "-//objectweb.org//DTD Fractal ADL 2.0//EN" 
"classpath://org/objectweb/fractal/adl/xml/basic.dtd">-->
+
+<definition name="org.objectweb.gotm.lib.FcBenchExplorer">
+  <interface name="fcAppl" role="client" 
+        signature="org.objectweb.fractal.api.Component" />
+
+  <content class="BrowserImpl"/>
+
+  <attributes signature="BrowserAttributes">
+    <attribute value="benchmark.xml" name="ConfigFiles"/>
+  </attributes>
+</definition>
Index: 
gotm-jts/examples/benchmark/src/fractal/org/objectweb/gotm/lib/FcExplorerImpl.fractal
diff -u 
gotm-jts/examples/benchmark/src/fractal/org/objectweb/gotm/lib/FcExplorerImpl.fractal:1.1
 
gotm-jts/examples/benchmark/src/fractal/org/objectweb/gotm/lib/FcExplorerImpl.fractal:removed
--- 
gotm-jts/examples/benchmark/src/fractal/org/objectweb/gotm/lib/FcExplorerImpl.fractal:1.1
   Tue Jun 28 10:02:30 2005
+++ 
gotm-jts/examples/benchmark/src/fractal/org/objectweb/gotm/lib/FcExplorerImpl.fractal
       Mon Jul 11 10:27:09 2005
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE definition PUBLIC "-//objectweb.org//DTD Fractal ADL 2.0//EN" 
"classpath://org/objectweb/fractal/adl/xml/standard.dtd">
-<!--<!DOCTYPE definition PUBLIC "-//objectweb.org//DTD Fractal ADL 2.0//EN" 
"classpath://org/objectweb/fractal/adl/xml/basic.dtd">-->
-
-<definition name="org.objectweb.gotm.lib.FcExplorerImpl">
-  <interface name="fcAppl" role="client" 
-        signature="org.objectweb.fractal.api.Component" />
-
-  <content class="BrowserImpl"/>
-
-  <attributes signature="BrowserAttributes">
-    <attribute value="benchmark.xml" name="ConfigFiles"/>
-  </attributes>
-</definition>
Index: 
gotm-jts/examples/local/src/fractal/org/objectweb/gotm/jts/local/FcApplication.fractal
diff -u 
gotm-jts/examples/local/src/fractal/org/objectweb/gotm/jts/local/FcApplication.fractal:1.1
 
gotm-jts/examples/local/src/fractal/org/objectweb/gotm/jts/local/FcApplication.fractal:1.2
--- 
gotm-jts/examples/local/src/fractal/org/objectweb/gotm/jts/local/FcApplication.fractal:1.1
  Tue Jun 28 10:02:27 2005
+++ 
gotm-jts/examples/local/src/fractal/org/objectweb/gotm/jts/local/FcApplication.fractal
      Mon Jul 11 10:27:08 2005
@@ -13,7 +13,7 @@
   <component name="FcCounter"
        definition="org.objectweb.gotm.jts.local.FcCounterImpl"/>
   <component name="FcTransactionManager"
-       definition="org.objectweb.gotm.lib.FcTransactionManagerImpl"/>
+       definition="org.objectweb.gotm.lib.JtsTransactionManager"/>
 
   <binding client="this.runnable"
            server="FcClient.runnable"/>
Index: 
gotm-jts/examples/local/src/fractal/org/objectweb/gotm/jts/local/FcExplorer.fractal
diff -u 
gotm-jts/examples/local/src/fractal/org/objectweb/gotm/jts/local/FcExplorer.fractal:1.1
 
gotm-jts/examples/local/src/fractal/org/objectweb/gotm/jts/local/FcExplorer.fractal:1.2
--- 
gotm-jts/examples/local/src/fractal/org/objectweb/gotm/jts/local/FcExplorer.fractal:1.1
     Tue Jun 28 10:02:27 2005
+++ 
gotm-jts/examples/local/src/fractal/org/objectweb/gotm/jts/local/FcExplorer.fractal
 Mon Jul 11 10:27:08 2005
@@ -5,7 +5,7 @@
 
 <definition name="org.objectweb.gotm.jts.local.FcExplorer">
   <component name="FcExplorer"
-       definition="org.objectweb.gotm.lib.FcExplorerImpl"/>
+       definition="org.objectweb.gotm.lib.FcLocalExplorer"/>
   <component name="FcApplication"
        definition="org.objectweb.gotm.jts.local.FcApplication"/>
 
Index: 
gotm-jts/examples/local/src/fractal/org/objectweb/gotm/lib/FcExplorerImpl.fractal
diff -u 
gotm-jts/examples/local/src/fractal/org/objectweb/gotm/lib/FcExplorerImpl.fractal:1.1
 
gotm-jts/examples/local/src/fractal/org/objectweb/gotm/lib/FcExplorerImpl.fractal:1.2
--- 
gotm-jts/examples/local/src/fractal/org/objectweb/gotm/lib/FcExplorerImpl.fractal:1.1
       Tue Jun 28 10:02:27 2005
+++ 
gotm-jts/examples/local/src/fractal/org/objectweb/gotm/lib/FcExplorerImpl.fractal
   Mon Jul 11 10:27:08 2005
@@ -2,7 +2,7 @@
 <!DOCTYPE definition PUBLIC "-//objectweb.org//DTD Fractal ADL 2.0//EN" 
"classpath://org/objectweb/fractal/adl/xml/standard.dtd">
 <!--<!DOCTYPE definition PUBLIC "-//objectweb.org//DTD Fractal ADL 2.0//EN" 
"classpath://org/objectweb/fractal/adl/xml/basic.dtd">-->
 
-<definition name="org.objectweb.gotm.lib.FcExplorerImpl">
+<definition name="org.objectweb.gotm.lib.FcLocalExplorer">
   <interface name="fcAppl" role="client" 
         signature="org.objectweb.fractal.api.Component" />
 
Index: 
gotm-jts/examples/local/src/fractal/org/objectweb/gotm/lib/FcLocalExplorer.fractal
diff -u /dev/null 
gotm-jts/examples/local/src/fractal/org/objectweb/gotm/lib/FcLocalExplorer.fractal:1.1
--- /dev/null   Mon Jul 11 10:27:09 2005
+++ 
gotm-jts/examples/local/src/fractal/org/objectweb/gotm/lib/FcLocalExplorer.fractal
  Mon Jul 11 10:27:08 2005
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC "-//objectweb.org//DTD Fractal ADL 2.0//EN" 
"classpath://org/objectweb/fractal/adl/xml/standard.dtd">
+<!--<!DOCTYPE definition PUBLIC "-//objectweb.org//DTD Fractal ADL 2.0//EN" 
"classpath://org/objectweb/fractal/adl/xml/basic.dtd">-->
+
+<definition name="org.objectweb.gotm.lib.FcLocalExplorer">
+  <interface name="fcAppl" role="client" 
+        signature="org.objectweb.fractal.api.Component" />
+
+  <content class="BrowserImpl"/>
+
+  <attributes signature="BrowserAttributes">
+    <attribute value="local.xml" name="ConfigFiles"/>
+  </attributes>
+</definition>
Index: 
gotm-jts/examples/local/src/java/org/objectweb/gotm/jts/local/CounterImpl.java
diff -u 
gotm-jts/examples/local/src/java/org/objectweb/gotm/jts/local/CounterImpl.java:1.1
 
gotm-jts/examples/local/src/java/org/objectweb/gotm/jts/local/CounterImpl.java:1.2
--- 
gotm-jts/examples/local/src/java/org/objectweb/gotm/jts/local/CounterImpl.java:1.1
  Tue Jun 28 10:02:27 2005
+++ 
gotm-jts/examples/local/src/java/org/objectweb/gotm/jts/local/CounterImpl.java
      Mon Jul 11 10:27:09 2005
@@ -22,7 +22,7 @@
  Contributor(s): ______________________________________.
 
  ---------------------------------------------------------------------
- $Id: CounterImpl.java,v 1.1 2005/06/28 08:02:27 rouvoy Exp $
+ $Id: CounterImpl.java,v 1.2 2005/07/11 08:27:09 rouvoy Exp $
  ====================================================================*/
 
 package org.objectweb.gotm.jts.local;
@@ -39,8 +39,8 @@
 /**
  * @author <a href="mailto:Romain.Rouvoy@xxxxxxx";>Romain Rouvoy</a>
  * @created 3 janv. 2005
- * @modified $Date: 2005/06/28 08:02:27 $
- * @version $Revision: 1.1 $
+ * @modified $Date: 2005/07/11 08:27:09 $
+ * @version $Revision: 1.2 $
  * @fractal.itf name="synchronization" role="server" 
signature="javax.transaction.Synchronization"
  * @fractal.itf name="xa-resource" role="server" 
signature="javax.transaction.xa.XAResource"
  */
@@ -70,14 +70,16 @@
      * @see javax.transaction.Synchronization#beforeCompletion()
      */
     public void beforeCompletion() {
-        getLogger().log(INFO,"Receiving beforeCompletion()...");
+        if (getLogger().isLoggable(INFO)) 
+            getLogger().log(INFO,"Receiving beforeCompletion()...");
     }
 
     /* (non-Javadoc)
      * @see javax.transaction.Synchronization#afterCompletion(int)
      */
     public void afterCompletion(int arg0) {
-        getLogger().log(INFO,"Receiving afterCompletion("+arg0+")...");
+        if (getLogger().isLoggable(INFO)) 
+            getLogger().log(INFO,"Receiving afterCompletion("+arg0+")...");
         if (arg0 == Status.STATUS_COMMITTED) {
             this.counter += this.clone ;
         }
@@ -127,28 +129,32 @@
      * @see javax.transaction.xa.XAResource#commit(javax.transaction.xa.Xid, 
boolean)
      */
     public void commit(Xid arg0, boolean arg1) {
-        getLogger().log(DEBUG,"Receiving setTransactionTimeout("+arg0+")");
+        if (getLogger().isLoggable(INFO)) 
+            getLogger().log(INFO,"Receiving 
setTransactionTimeout("+arg0+")");
     }
 
     /* (non-Javadoc)
      * @see javax.transaction.xa.XAResource#end(javax.transaction.xa.Xid, 
int)
      */
     public void end(Xid arg0, int arg1) {
-        getLogger().log(DEBUG,"Receiving end("+arg0+", "+arg1+")");
+        if (getLogger().isLoggable(INFO)) 
+            getLogger().log(INFO,"Receiving end("+arg0+", "+arg1+")");
     }
 
     /* (non-Javadoc)
      * @see javax.transaction.xa.XAResource#forget(javax.transaction.xa.Xid)
      */
     public void forget(Xid arg0) {
-        getLogger().log(DEBUG,"Receiving forget("+arg0+")");
+        if (getLogger().isLoggable(INFO)) 
+            getLogger().log(INFO,"Receiving forget("+arg0+")");
     }
 
     /* (non-Javadoc)
      * @see javax.transaction.xa.XAResource#getTransactionTimeout()
      */
     public int getTransactionTimeout() {
-        getLogger().log(DEBUG,"Receiving getTransactionTimeout()");
+        if (getLogger().isLoggable(INFO)) 
+            getLogger().log(INFO,"Receiving getTransactionTimeout()");
         return 0;
     }
 
@@ -156,7 +162,8 @@
      * @see 
javax.transaction.xa.XAResource#isSameRM(javax.transaction.xa.XAResource)
      */
     public boolean isSameRM(XAResource arg0) {
-        getLogger().log(DEBUG,"Receiving setTransactionTimeout("+arg0+")");
+        if (getLogger().isLoggable(INFO)) 
+            getLogger().log(INFO,"Receiving 
setTransactionTimeout("+arg0+")");
         return false;
     }
 
@@ -164,7 +171,8 @@
      * @see javax.transaction.xa.XAResource#prepare(javax.transaction.xa.Xid)
      */
     public int prepare(Xid arg0) {
-        getLogger().log(DEBUG,"Receiving prepare("+arg0+")");
+        if (getLogger().isLoggable(INFO)) 
+            getLogger().log(INFO,"Receiving prepare("+arg0+")");
         return XA_OK;
     }
 
@@ -172,7 +180,8 @@
      * @see javax.transaction.xa.XAResource#recover(int)
      */
     public Xid[] recover(int arg0) {
-        getLogger().log(DEBUG,"Receiving recover("+arg0+")");
+        if (getLogger().isLoggable(INFO)) 
+            getLogger().log(INFO,"Receiving recover("+arg0+")");
         return null;
     }
 
@@ -180,14 +189,16 @@
      * @see 
javax.transaction.xa.XAResource#rollback(javax.transaction.xa.Xid)
      */
     public void rollback(Xid arg0) {
-        getLogger().log(DEBUG,"Receiving rollback("+arg0+")");
+        if (getLogger().isLoggable(INFO)) 
+            getLogger().log(INFO,"Receiving rollback("+arg0+")");
     }
 
     /* (non-Javadoc)
      * @see javax.transaction.xa.XAResource#setTransactionTimeout(int)
      */
     public boolean setTransactionTimeout(int arg0) {
-        getLogger().log(DEBUG,"Receiving setTransactionTimeout("+arg0+")");
+        if (getLogger().isLoggable(INFO)) 
+            getLogger().log(INFO,"Receiving 
setTransactionTimeout("+arg0+")");
         return false;
     }
 
@@ -195,7 +206,7 @@
      * @see javax.transaction.xa.XAResource#start(javax.transaction.xa.Xid, 
int)
      */
     public void start(Xid arg0, int arg1) {
-        getLogger().log(DEBUG,"Receiving start("+arg0+", "+arg1+")");
+        if (getLogger().isLoggable(INFO)) 
+            getLogger().log(INFO,"Receiving start("+arg0+", "+arg1+")");
     }
-    
 }
Index: 
gotm-jts/src/fractal/org/objectweb/gotm/lib/FcTransactionManagerImpl.fractal
diff -u 
gotm-jts/src/fractal/org/objectweb/gotm/lib/FcTransactionManagerImpl.fractal:1.1
 
gotm-jts/src/fractal/org/objectweb/gotm/lib/FcTransactionManagerImpl.fractal:removed
--- 
gotm-jts/src/fractal/org/objectweb/gotm/lib/FcTransactionManagerImpl.fractal:1.1
    Wed Feb 23 18:39:46 2005
+++ 
gotm-jts/src/fractal/org/objectweb/gotm/lib/FcTransactionManagerImpl.fractal  
      Mon Jul 11 10:27:09 2005
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE definition PUBLIC 
-          "-//objectweb.org//DTD Fractal ADL 2.0//EN" 
-          "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
-
-<definition name="org.objectweb.gotm.lib.FcTransactionManagerImpl">
-  <interface name="transaction-manager" role="server"
-         signature="javax.transaction.TransactionManager"/>
-
-  <component name="FcMonitor"
-       definition="org.objectweb.gotm.lib.jta.FcTransactionManagerImpl"/>
-  <component name="FcTemplate"
-       definition="org.objectweb.gotm.lib.TpJTSImpl"/>
-
-  <binding client="this.transaction-manager" 
-           server="FcMonitor.tx-manager"/>
-  <binding client="FcMonitor.factory"
-           server="FcTemplate.component"/>
-</definition>
Index: gotm-jts/src/fractal/org/objectweb/gotm/lib/JtsTransaction.fractal
diff -u /dev/null 
gotm-jts/src/fractal/org/objectweb/gotm/lib/JtsTransaction.fractal:1.1
--- /dev/null   Mon Jul 11 10:27:09 2005
+++ gotm-jts/src/fractal/org/objectweb/gotm/lib/JtsTransaction.fractal  Mon 
Jul 11 10:27:08 2005
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC 
+          "-//objectweb.org//DTD Fractal ADL 2.0//EN" 
+          "classpath://org/objectweb/fractal/adl/xml/standard.dtd">
+
+<definition name="org.objectweb.gotm.lib.JtsTransaction" 
arguments="validation">
+  <interface name="transaction" role="server"
+         signature="javax.transaction.Transaction"/>
+  <interface name="user-transaction" role="server"
+         signature="javax.transaction.UserTransaction"/>
+         
+  <component name="FcAdapter"
+       definition="org.objectweb.gotm.lib.jta.TpTransactionImpl"/>
+  <component name="FcGoTM"
+       definition="org.objectweb.gotm.lib.TpTransaction(${validation})"/>
+  <component name="FcResource"
+       definition="org.objectweb.gotm.lib.TpResourceManager"/>
+  <component name="FcConverter"
+       definition="org.objectweb.gotm.lib.jta.TpStatusConverter"/>
+
+  <binding client="this.transaction"
+           server="FcAdapter.transaction"/>
+  <binding client="this.user-transaction"
+           server="FcAdapter.user-transaction"/>
+           
+  <binding client="FcAdapter.tx-state"
+           server="FcGoTM.tx-state"/>
+  <binding client="FcAdapter.synchronization"
+           server="FcResource.synchronization"/>
+  <binding client="FcAdapter.xa-resource"
+           server="FcResource.xa-resource"/>
+  <binding client="FcResource.subscribe"
+           server="FcGoTM.subscribe"/>
+  <binding client="FcResource.tx-state"
+           server="FcGoTM.tx-state"/>
+  <binding client="FcAdapter.commit"
+           server="FcGoTM.process-twopc"/>
+  <binding client="FcAdapter.rollback"
+           server="FcGoTM.process-rollback"/>
+  <binding client="FcAdapter.status-converter"
+           server="FcConverter.event-converter"/>
+  <binding client="FcAdapter.timeout-attr"
+           server="FcGoTM.timeout-attr"/>
+           
+  <template-controller desc="compositeTemplate" />
+</definition>
Index: 
gotm-jts/src/fractal/org/objectweb/gotm/lib/JtsTransactionManager.fractal
diff -u /dev/null 
gotm-jts/src/fractal/org/objectweb/gotm/lib/JtsTransactionManager.fractal:1.1
--- /dev/null   Mon Jul 11 10:27:09 2005
+++ gotm-jts/src/fractal/org/objectweb/gotm/lib/JtsTransactionManager.fractal 
  Mon Jul 11 10:27:08 2005
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC 
+          "-//objectweb.org//DTD Fractal ADL 2.0//EN" 
+          "classpath://org/objectweb/fractal/adl/xml/standard.dtd">
+
+<definition name="org.objectweb.gotm.lib.JtsTransactionManager">
+  <interface name="transaction-manager" role="server"
+         signature="javax.transaction.TransactionManager"/>
+
+  <component name="FcMonitor"
+       definition="org.objectweb.gotm.lib.jta.FcTransactionManagerImpl"/>
+  <component name="FcTemplate"
+       
definition="org.objectweb.gotm.lib.JtsTransaction(org.objectweb.gotm.lib.coordination.Tp2PC)"/>
+
+  <binding client="this.transaction-manager" 
+           server="FcMonitor.tx-manager"/>
+  <binding client="FcMonitor.factory"
+           server="FcTemplate.component"/>
+</definition>
Index: gotm-jts/src/fractal/org/objectweb/gotm/lib/TpJTSImpl.fractal
diff -u gotm-jts/src/fractal/org/objectweb/gotm/lib/TpJTSImpl.fractal:1.3 
gotm-jts/src/fractal/org/objectweb/gotm/lib/TpJTSImpl.fractal:removed
--- gotm-jts/src/fractal/org/objectweb/gotm/lib/TpJTSImpl.fractal:1.3   Mon 
Jul  4 17:59:58 2005
+++ gotm-jts/src/fractal/org/objectweb/gotm/lib/TpJTSImpl.fractal       Mon 
Jul 11 10:27:09 2005
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE definition PUBLIC 
-          "-//objectweb.org//DTD Fractal ADL 2.0//EN" 
-          "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
-
-<definition name="org.objectweb.gotm.lib.TpJTSImpl">
-  <interface name="transaction" role="server"
-         signature="javax.transaction.Transaction"/>
-  <interface name="user-transaction" role="server"
-         signature="javax.transaction.UserTransaction"/>
-         
-  <component name="FcAdapter"
-       definition="org.objectweb.gotm.lib.jta.TpTransactionImpl"/>
-  <component name="FcGoTM" 
-       definition="org.objectweb.gotm.lib.TpTransactionImpl"/>
-  <component name="FcResource"
-       definition="org.objectweb.gotm.lib.TpResourceImpl"/>
-  <component name="FcConverter"
-       definition="org.objectweb.gotm.lib.jta.TpStatusConverter"/>
-
-  <binding client="this.transaction"
-           server="FcAdapter.transaction"/>
-  <binding client="this.user-transaction"
-           server="FcAdapter.user-transaction"/>
-           
-  <binding client="FcAdapter.tx-state"
-           server="FcGoTM.tx-state"/>
-  <binding client="FcAdapter.synchronization"
-           server="FcResource.synchronization"/>
-  <binding client="FcAdapter.xa-resource"
-           server="FcResource.xa-resource"/>
-  <binding client="FcResource.subscribe"
-           server="FcGoTM.subscribe"/>
-  <binding client="FcResource.tx-state"
-           server="FcGoTM.tx-state"/>
-  <binding client="FcAdapter.commit"
-           server="FcGoTM.process-twopc"/>
-  <binding client="FcAdapter.rollback"
-           server="FcGoTM.process-rollback"/>
-  <binding client="FcAdapter.status-converter"
-           server="FcConverter.event-converter"/>
-           
-  <template-controller desc="compositeTemplate" />
-</definition>
Index: gotm-jts/src/fractal/org/objectweb/gotm/lib/TpManagerImpl.fractal
diff -u gotm-jts/src/fractal/org/objectweb/gotm/lib/TpManagerImpl.fractal:1.3 
gotm-jts/src/fractal/org/objectweb/gotm/lib/TpManagerImpl.fractal:removed
--- gotm-jts/src/fractal/org/objectweb/gotm/lib/TpManagerImpl.fractal:1.3     
  Fri Jul  1 18:27:50 2005
+++ gotm-jts/src/fractal/org/objectweb/gotm/lib/TpManagerImpl.fractal   Mon 
Jul 11 10:27:09 2005
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE definition PUBLIC 
-          "-//objectweb.org//DTD Fractal ADL 2.0//EN" 
-          "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
-
-<definition name="org.objectweb.gotm.lib.TpManagerImpl">
-  <interface name="tx-state" role="server" 
-        
signature="org.objectweb.transaction.api.transaction.TransactionState"/>
-  <interface name="tx-status" role="server" 
-        
signature="org.objectweb.transaction.api.transaction.TransactionStatusFeature"/>
-<!--  <interface name="tx-activation" role="server" 
-        
signature="org.objectweb.transaction.api.transaction.TransactionActivationFeature"/>
-  <interface name="tx-interruption" role="server" 
-        
signature="org.objectweb.transaction.api.transaction.TransactionInterruptionFeature"/>
--->
-  <interface name="publish" role="client"
-        signature="org.objectweb.transaction.api.event.PublishFeature"/>
-
-  <component name="FcState" 
-       
definition="org.objectweb.gotm.lib.transaction.TpTransactionStateAuto"/>
-<!--
- <component name="FcActivation"
-       definition="org.objectweb.gotm.lib.TpActivationImpl">
-        <component name="FcState" definition="./FcState"/>
-  </component>
-  <component name="FcInterruption"
-       definition="org.objectweb.gotm.lib.TpInterruptionImpl">
-       <component name="FcState" definition="./FcState"/>
-  </component>
--->
-  <binding client="this.tx-state"        server="FcState.tx-state"/>
-  <binding client="this.tx-status"       server="FcState.tx-status"/>
-<!--
-  <binding client="this.tx-activation"   
server="FcActivation.tx-activation"/>
-  <binding client="this.tx-interruption" 
server="FcInterruption.tx-interruption"/>
--->
-  <binding client="FcState.publish"      server="this.publish"/>
-         
-  <template-controller desc="compositeTemplate" />
-</definition>
Index: gotm-jts/src/fractal/org/objectweb/gotm/lib/TpResourceImpl.fractal
diff -u 
gotm-jts/src/fractal/org/objectweb/gotm/lib/TpResourceImpl.fractal:1.4 
gotm-jts/src/fractal/org/objectweb/gotm/lib/TpResourceImpl.fractal:removed
--- gotm-jts/src/fractal/org/objectweb/gotm/lib/TpResourceImpl.fractal:1.4    
  Mon Jul  4 17:59:58 2005
+++ gotm-jts/src/fractal/org/objectweb/gotm/lib/TpResourceImpl.fractal  Mon 
Jul 11 10:27:09 2005
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE definition PUBLIC 
-          "-//objectweb.org//DTD Fractal ADL 2.0//EN" 
-          "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
-
-<definition name="org.objectweb.gotm.lib.TpResourceImpl">
-  <interface name="synchronization" role="server"
-        signature="org.objectweb.gotm.lib.resource.ResourceManager"/>
-  <interface name="xa-resource" role="server"
-        signature="org.objectweb.gotm.lib.resource.ResourceManager"/>
-  <interface name="subscribe" role="client"
-        signature="org.objectweb.transaction.api.event.SubscribeFeature"/>
-  <interface name="tx-state" role="client"
-        
signature="org.objectweb.transaction.api.transaction.TransactionState"/>
-
-  <component name="FcSynchronizationManager" 
-       definition="org.objectweb.gotm.lib.resource.TpResourceManagerImpl"/>
-  <component name="FcSynchronizationActions"
-       
definition="org.objectweb.gotm.lib.jta.TpSynchronizationActionProvider"/>
-
-  <component name="FcXAResourceManager" 
-       definition="org.objectweb.gotm.lib.resource.TpResourceManagerImpl"/>
-  <component name="FcXAResourceActions"
-       definition="org.objectweb.gotm.lib.jta.TpXAResourceActionProvider"/>
-  <component name="FcXid"
-       definition="org.objectweb.gotm.lib.xid.TpXidStateImpl"/>
-<!--
-  <component name="FcThread"
-       definition="org.objectweb.util.thread.comp.TpThreadManager(10,100)"/>
-  <binding client="FcSynchronizationManager.runnable-manager"
-           server="FcThread.runnable-manager"/>
-  <binding client="FcXAResourceManager.runnable-manager"
-           server="FcThread.runnable-manager"/>
--->
-
-  <binding client="this.synchronization" 
-           server="FcSynchronizationManager.resource"/>
-  <binding client="FcSynchronizationManager.action-provider"
-           server="FcSynchronizationActions.action-provider"/>
-  <binding client="FcSynchronizationManager.subscribe" 
-           server="this.subscribe"/>
-  <binding client="FcSynchronizationManager.tx-state" 
-           server="this.tx-state"/>
-
-  <binding client="this.xa-resource" 
-           server="FcXAResourceManager.resource"/>
-  <binding client="FcXAResourceManager.action-provider"
-           server="FcXAResourceActions.action-provider"/>
-  <binding client="FcXAResourceActions.xid-state" 
-           server="FcXid.xid-state"/>
-  <binding client="FcXAResourceManager.subscribe" 
-           server="this.subscribe"/>
-  <binding client="FcXAResourceManager.tx-state" 
-           server="this.tx-state"/>
-         
-  <template-controller desc="compositeTemplate" />
-</definition>
Index: gotm-jts/src/fractal/org/objectweb/gotm/lib/TpResourceManager.fractal
diff -u /dev/null 
gotm-jts/src/fractal/org/objectweb/gotm/lib/TpResourceManager.fractal:1.1
--- /dev/null   Mon Jul 11 10:27:09 2005
+++ gotm-jts/src/fractal/org/objectweb/gotm/lib/TpResourceManager.fractal     
  Mon Jul 11 10:27:08 2005
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC 
+          "-//objectweb.org//DTD Fractal ADL 2.0//EN" 
+          "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
+
+<definition name="org.objectweb.gotm.lib.TpResourceManager">
+  <interface name="synchronization" role="server"
+        signature="org.objectweb.gotm.lib.resource.ResourceManager"/>
+  <interface name="xa-resource" role="server"
+        signature="org.objectweb.gotm.lib.resource.ResourceManager"/>
+  <interface name="subscribe" role="client"
+        signature="org.objectweb.transaction.api.event.SubscribeFeature"/>
+  <interface name="tx-state" role="client"
+        
signature="org.objectweb.transaction.api.transaction.TransactionState"/>
+
+  <component name="FcSynchronizationManager" 
+       definition="org.objectweb.gotm.lib.resource.TpResourceManagerImpl"/>
+  <component name="FcSynchronizationActions"
+       
definition="org.objectweb.gotm.lib.jta.TpSynchronizationActionProvider"/>
+
+  <component name="FcXAResourceManager" 
+       definition="org.objectweb.gotm.lib.resource.TpResourceManagerImpl"/>
+  <component name="FcXAResourceActions"
+       
definition="org.objectweb.gotm.lib.jta.xa.TpXAResourceActionProvider"/>
+  <component name="FcXidProvider"
+       definition="org.objectweb.gotm.lib.jta.xa.TpXidProvider"/>
+<!--
+  <component name="FcThread"
+       definition="org.objectweb.util.thread.comp.TpThreadManager(10,100)"/>
+  <binding client="FcSynchronizationManager.runnable-manager"
+           server="FcThread.runnable-manager"/>
+  <binding client="FcXAResourceManager.runnable-manager"
+           server="FcThread.runnable-manager"/>
+-->
+
+  <binding client="this.synchronization" 
+           server="FcSynchronizationManager.resource"/>
+  <binding client="FcSynchronizationManager.action-provider"
+           server="FcSynchronizationActions.action-provider"/>
+  <binding client="FcSynchronizationManager.subscribe" 
+           server="this.subscribe"/>
+  <binding client="FcSynchronizationManager.tx-state" 
+           server="this.tx-state"/>
+
+  <binding client="this.xa-resource" 
+           server="FcXAResourceManager.resource"/>
+  <binding client="FcXAResourceManager.action-provider"
+           server="FcXAResourceActions.action-provider"/>
+  <binding client="FcXAResourceActions.xid-provider" 
+           server="FcXidProvider.xid-provider"/>
+  <binding client="FcXAResourceManager.subscribe" 
+           server="this.subscribe"/>
+  <binding client="FcXAResourceManager.tx-state" 
+           server="this.tx-state"/>
+         
+  <template-controller desc="compositeTemplate" />
+</definition>
Index: gotm-jts/src/fractal/org/objectweb/gotm/lib/TpTransaction.fractal
diff -u /dev/null 
gotm-jts/src/fractal/org/objectweb/gotm/lib/TpTransaction.fractal:1.1
--- /dev/null   Mon Jul 11 10:27:09 2005
+++ gotm-jts/src/fractal/org/objectweb/gotm/lib/TpTransaction.fractal   Mon 
Jul 11 10:27:08 2005
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC 
+          "-//objectweb.org//DTD Fractal ADL 2.0//EN"
+          "classpath://org/objectweb/fractal/adl/xml/standard.dtd">
+
+<definition name="org.objectweb.gotm.lib.TpTransaction" 
arguments="validation">
+  <interface name="tx-state" role="server" 
+        
signature="org.objectweb.transaction.api.transaction.TransactionState"/>
+  <interface name="tx-status" role="server" 
+        
signature="org.objectweb.transaction.api.transaction.TransactionStatusFeature"/>
+  <interface name="process-twopc" role="server"
+        
signature="org.objectweb.transaction.api.coordination.CoordinationFeature"/>
+  <interface name="process-rollback" role="server"
+        
signature="org.objectweb.transaction.api.coordination.CoordinationFeature"/>
+  <interface name="subscribe" role="server"
+        signature="org.objectweb.transaction.api.event.SubscribeFeature"/>
+  <interface name="timeout-attr" role="server"
+        signature="org.objectweb.gotm.lib.coordination.TimeoutAttribute"/>
+
+  <component name="TransactionState"
+       
definition="org.objectweb.gotm.lib.transaction.TpTransactionStateAuto"/>
+  <component name="EventBus"
+       definition="org.objectweb.gotm.lib.event.TpEventBus"/>
+  <component name="ValidationProcotol"
+       definition="${validation}"/>
+  <component name="Timeout"
+       definition="org.objectweb.gotm.lib.coordination.TpTimeoutImpl"/>
+  <component name="FcXidProvider"
+       definition="org.objectweb.gotm.lib.jta.xa.TpXidProvider"/>
+
+  <binding client="this.tx-state"         
server="TransactionState.tx-state"/>
+  <binding client="this.tx-status"        
server="TransactionState.tx-status"/>
+  <binding client="this.process-twopc"    
server="ValidationProcotol.commit"/>
+  <binding client="this.process-rollback" server="ValidationProcotol.abort"/>
+  <binding client="this.subscribe"        server="EventBus.subscribe"/>
+  <binding client="this.timeout-attr"     server="Timeout.timeout-attr"/>
+
+  <binding client="TransactionState.publish" server="EventBus.sync-publish"/>
+
+  <binding client="ValidationProcotol.sync-publish"  
server="EventBus.sync-publish"/>
+  <binding client="ValidationProcotol.async-publish" 
server="EventBus.async-publish"/>
+  <binding client="ValidationProcotol.tx-state"      
server="TransactionState.tx-state"/>
+  <binding client="ValidationProcotol.xid-provider"  
server="FcXidProvider.xid-provider"/>
+
+  <binding client="Timeout.subscribe"     server="EventBus.subscribe"/>
+  <binding client="Timeout.coord-process" server="ValidationProcotol.abort"/>
+
+  <template-controller desc="compositeTemplate"/>
+</definition>
Index: gotm-jts/src/fractal/org/objectweb/gotm/lib/TpTransactionImpl.fractal
diff -u 
gotm-jts/src/fractal/org/objectweb/gotm/lib/TpTransactionImpl.fractal:1.2 
gotm-jts/src/fractal/org/objectweb/gotm/lib/TpTransactionImpl.fractal:removed
--- gotm-jts/src/fractal/org/objectweb/gotm/lib/TpTransactionImpl.fractal:1.2 
  Mon May 23 13:21:00 2005
+++ gotm-jts/src/fractal/org/objectweb/gotm/lib/TpTransactionImpl.fractal     
  Mon Jul 11 10:27:09 2005
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE definition PUBLIC 
-          "-//objectweb.org//DTD Fractal ADL 2.0//EN"
-          "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
-
-<definition name="org.objectweb.gotm.lib.TpTransactionImpl">
-  <interface name="tx-state" role="server" 
-        
signature="org.objectweb.transaction.api.transaction.TransactionState"/>
-  <interface name="tx-status" role="server" 
-        
signature="org.objectweb.transaction.api.transaction.TransactionStatusFeature"/>
-  <interface name="process-twopc" role="server"
-        
signature="org.objectweb.transaction.api.coordination.CoordinationFeature"/>
-  <interface name="process-rollback" role="server"
-        
signature="org.objectweb.transaction.api.coordination.CoordinationFeature"/>
-  <interface name="subscribe" role="server"
-        signature="org.objectweb.transaction.api.event.SubscribeFeature"/>
-
-
-  <component name="TransactionState"
-       definition="org.objectweb.gotm.lib.TpManagerImpl"/>
-  <component name="EventBus"
-       definition="org.objectweb.gotm.lib.event.TpEventBus"/>
-  <component name="ValidationProcotol"
-       definition="org.objectweb.gotm.lib.coordination.Tp2PC"/>
-  <component name="AutoAbort"
-       
definition="org.objectweb.gotm.lib.coordination.TpAutoAbortImpl(100)"/>
-
-  <binding client="this.tx-state"         
server="TransactionState.tx-state"/>
-  <binding client="this.tx-status"        
server="TransactionState.tx-status"/>
-  <binding client="this.subscribe"        server="EventBus.subscribe"/>
-  <binding client="this.process-twopc"    
server="ValidationProcotol.commit"/>
-  <binding client="this.process-rollback" server="ValidationProcotol.abort"/>
-
-  <binding client="TransactionState.publish" server="EventBus.publish"/>
-
-  <binding client="ValidationProcotol.publish"   server="EventBus.publish"/>
-  <binding client="ValidationProcotol.tx-state"  
server="TransactionState.tx-state"/>
-
-  <binding client="AutoAbort.subscribe"     server="EventBus.subscribe"/>
-  <binding client="AutoAbort.coord-process" 
server="ValidationProcotol.abort"/>
-
-  <template-controller desc="compositeTemplate"/>
-</definition>
Index: 
gotm-jts/src/java/org/objectweb/gotm/lib/jta/SynchronizationActionProvider.java
diff -u 
gotm-jts/src/java/org/objectweb/gotm/lib/jta/SynchronizationActionProvider.java:1.1
 
gotm-jts/src/java/org/objectweb/gotm/lib/jta/SynchronizationActionProvider.java:1.2
--- 
gotm-jts/src/java/org/objectweb/gotm/lib/jta/SynchronizationActionProvider.java:1.1
 Mon Jul  4 15:02:10 2005
+++ 
gotm-jts/src/java/org/objectweb/gotm/lib/jta/SynchronizationActionProvider.java
     Mon Jul 11 10:27:08 2005
@@ -22,7 +22,7 @@
  Contributor(s): ______________________________________.
 
  ---------------------------------------------------------------------
- $Id: SynchronizationActionProvider.java,v 1.1 2005/07/04 13:02:10 rouvoy 
Exp $
+ $Id: SynchronizationActionProvider.java,v 1.2 2005/07/11 08:27:08 rouvoy 
Exp $
  ====================================================================*/
 package org.objectweb.gotm.lib.jta;
 
@@ -39,12 +39,12 @@
 import org.objectweb.transaction.lib.transaction.TransactionStatusRolledBack;
 
 /**
- * Implementation of a <code>ResourceWithPool</code> for the 
+ * Implementation of a <code>ResourceManagerWithPool</code> for the 
  * <code>Synchronization</code> object.
  * @author <a href="mailto:Romain.Rouvoy@xxxxxxx";>Romain Rouvoy</a>
  * @created 22 déc. 2004
- * @modified $Date: 2005/07/04 13:02:10 $
- * @version $Revision: 1.1 $
+ * @modified $Date: 2005/07/11 08:27:08 $
+ * @version $Revision: 1.2 $
  * @fractal.itf name="sync-action-provider" 
signature="org.objectweb.gotm.lib.resource.ActionProvider"
  */
 public class SynchronizationActionProvider 
@@ -84,26 +84,15 @@
     }
     
     /* (non-Javadoc)
-     * @see org.objectweb.gotm.lib.event.SubscribablePrimitive#getEvents()
-     */
-    public int[] getEvents() {
-        return new int[] {
-                TransactionStatusPrepared.status.hashCode(),
-                TransactionStatusCommitted.status.hashCode(),
-                TransactionStatusRolledBack.status.hashCode()
-        };
-    }
-
-    /* (non-Javadoc)
      * @see 
org.objectweb.gotm.lib.resource.ResourceManagerImpl#declareActions()
      */
     protected Map declareActions() {
         Map a = new HashMap();
-        a.put(TransactionStatusPrepared.status.getValue(),
+        a.put(TransactionStatusPrepared.status,
                 new BeforeCompletion());
-        a.put(TransactionStatusCommitted.status.getValue(),
+        a.put(TransactionStatusCommitted.status,
                 new AfterCompletion(Status.STATUS_COMMITTED));
-        a.put(TransactionStatusRolledBack.status.getValue(),
+        a.put(TransactionStatusRolledBack.status,
                 new AfterCompletion(Status.STATUS_ROLLEDBACK));
         return a;
     }
Index: gotm-jts/src/java/org/objectweb/gotm/lib/jta/TransactionImpl.java
diff -u gotm-jts/src/java/org/objectweb/gotm/lib/jta/TransactionImpl.java:1.8 
gotm-jts/src/java/org/objectweb/gotm/lib/jta/TransactionImpl.java:1.9
--- gotm-jts/src/java/org/objectweb/gotm/lib/jta/TransactionImpl.java:1.8     
  Mon Jul  4 17:59:58 2005
+++ gotm-jts/src/java/org/objectweb/gotm/lib/jta/TransactionImpl.java   Mon 
Jul 11 10:27:08 2005
@@ -22,33 +22,41 @@
  Contributor(s): ______________________________________.
  
  ---------------------------------------------------------------------
- $Id: TransactionImpl.java,v 1.8 2005/07/04 15:59:58 rouvoy Exp $
+ $Id: TransactionImpl.java,v 1.9 2005/07/11 08:27:08 rouvoy Exp $
  ====================================================================*/
 
 package org.objectweb.gotm.lib.jta;
 
+import java.util.HashMap;
+
+import javax.transaction.NotSupportedException;
+import javax.transaction.RollbackException;
 import javax.transaction.Synchronization;
+import javax.transaction.SystemException;
 import javax.transaction.Transaction;
 import javax.transaction.UserTransaction;
 import javax.transaction.xa.XAResource;
 
 import org.objectweb.fractal.lib.BindablePrimitive;
+import org.objectweb.gotm.lib.coordination.TimeoutAttribute;
 import org.objectweb.gotm.lib.event.EventConverter;
 import org.objectweb.gotm.lib.resource.ResourceManager;
-import org.objectweb.gotm.lib.transaction.StatusNotAllowedException;
+import org.objectweb.gotm.lib.transaction.InvalidStateException;
+import org.objectweb.gotm.lib.transaction.InvalidTransitionException;
 import org.objectweb.transaction.api.coordination.CoordinationFeature;
-import 
org.objectweb.transaction.api.transaction.TransactionActivationFeature;
-import 
org.objectweb.transaction.api.transaction.TransactionInterruptionFeature;
 import org.objectweb.transaction.api.transaction.TransactionState;
+import org.objectweb.transaction.api.transaction.TransactionStatus;
 import 
org.objectweb.transaction.lib.transaction.TransactionStatusMarkedRollback;
+import org.objectweb.transaction.lib.transaction.TransactionStatusRolledBack;
+import 
org.objectweb.transaction.lib.transaction.TransactionStatusRollingBack;
 import 
org.objectweb.transaction.lib.transaction.TransactionStatusTransactionActive;
 
 /**
  * Adapter for the Java Transaction API (JTA).
  * @author <a href="mailto:Romain.Rouvoy@xxxxxxx";>Romain Rouvoy</a>
  * @created 24 déc. 2004
- * @modified $Date: 2005/07/04 15:59:58 $
- * @version $Revision: 1.8 $
+ * @modified $Date: 2005/07/11 08:27:08 $
+ * @version $Revision: 1.9 $
  * @fractal.itf name="transaction" signature="javax.transaction.Transaction"
  * @fractal.itf name="user-transaction" 
signature="javax.transaction.UserTransaction"
  * @fractal.itf name="commit" role="client" 
signature="org.objectweb.transaction.api.coordination.CoordinationFeature"
@@ -57,182 +65,206 @@
  * @fractal.itf name="xa-resource" role="client" 
signature="org.objectweb.gotm.lib.resource.ResourceManager"
  * @fractal.itf name="tx-state" role="client" 
signature="org.objectweb.transaction.api.transaction.TransactionState"
  * @fractal.itf name="status-converter" role="client" 
signature="org.objectweb.gotm.lib.event.EventConverter"
+ * @fractal.itf name="timeout-attr" role="client" 
signature="org.objectweb.gotm.lib.coordination.TimeoutAttribute"
  */
-public class TransactionImpl 
-     extends BindablePrimitive
-  implements Transaction, 
-             UserTransaction 
-{
+public class TransactionImpl
+        extends BindablePrimitive
+        implements Transaction, UserTransaction {
     /** Fractal ADL Identifier for the <code>COMMIT</code> interface. */
     public static final String COMMIT = "commit";
+
     /** Fractal ADL Identifier for the <code>ROLLBACK</code> interface. */
     public static final String ROLLBACK = "rollback";
+
     /** Fractal ADL Identifier for the <code>SYNCHRONIZATION</code> 
interface. */
-    public static final String SYNCHRONIZATION ="synchronization" ;
+    public static final String SYNCHRONIZATION = "synchronization";
+
     /** Fractal ADL Identifier for the <code>RESOURCE</code> interface. */
     public static final String RESOURCE = "xa-resource";
+
     /** Fractal ADL Identifier for the <code>STATUS_CONVERTER</code> 
interface. */
     public static final String STATUS_CONVERTER = "status-converter";
 
-    //private ResourceWithPool sync = new SynchronizationActionProvider();
-    
+    //private ResourceManagerWithPool sync = new 
SynchronizationActionProvider();
+
     /* (non-Javadoc)
      * @see org.objectweb.fractal.api.control.BindingController#listFc()
      */
     public String[] clientFc() {
-        return new String[] {
-                TransactionActivationFeature.TX_ACTIVATION,
-                COMMIT,ROLLBACK,
-                TransactionInterruptionFeature.TRANSACTION_INTERRUPTION,
-                TransactionState.TRANSACTION_STATE,
-                SYNCHRONIZATION,
-                RESOURCE,
-                STATUS_CONVERTER
-        };
+        return new String[] { COMMIT, ROLLBACK,
+                TransactionState.TRANSACTION_STATE, SYNCHRONIZATION, 
RESOURCE,
+                STATUS_CONVERTER, TimeoutAttribute.TIMEOUT_ATTRIBUTE };
     }
-    
-    
+
     /**
      * @return the commit coordination process.
      */
     protected CoordinationFeature getTxCommit() {
         return (CoordinationFeature) fcBindings.get(COMMIT);
     }
-    
+
     /**
      * @return the rollback coordination process.
      */
     protected CoordinationFeature getTxRollback() {
         return (CoordinationFeature) fcBindings.get(ROLLBACK);
     }
-    
+
     /**
      * @return Returns the txState.
      */
     protected TransactionState getTxState() {
-        return (TransactionState) 
fcBindings.get(TransactionState.TRANSACTION_STATE);
+        return (TransactionState) fcBindings
+                .get(TransactionState.TRANSACTION_STATE);
     }
-    
+
     /**
      * @return Returns the syncEnlist.
      */
     protected ResourceManager getSynchronization() {
         return (ResourceManager) fcBindings.get(SYNCHRONIZATION);
     }
-    
+
     /**
      * @return Returns the resEnlist.
      */
     protected ResourceManager getResource() {
         return (ResourceManager) fcBindings.get(RESOURCE);
     }
-    
+
     /**
      * @return Returns the event converter.
      */
     protected EventConverter getStatusConverter() {
         return (EventConverter) fcBindings.get(STATUS_CONVERTER);
     }
-    
+
+    protected TimeoutAttribute getTimeout() {
+        return (TimeoutAttribute) fcBindings
+                .get(TimeoutAttribute.TIMEOUT_ATTRIBUTE);
+    }
+
     /* (non-Javadoc)
      * @see javax.transaction.Transaction#commit()
      */
-    public void commit()
-        throws SecurityException, IllegalStateException
-    {
+    public void commit() throws SecurityException, IllegalStateException {
         try {
-            getTxCommit().process();
-        } catch (StatusNotAllowedException e) {
+            getTxCommit().process(new HashMap());
+        } catch (InvalidStateException e) {
             throw new IllegalStateException(e);
         }
     }
-    
+
     /* (non-Javadoc)
      * @see 
javax.transaction.Transaction#delistResource(javax.transaction.xa.XAResource, 
int)
      */
     public boolean delistResource(XAResource arg0, int arg1)
-        throws IllegalStateException 
-    {
-        
+            throws IllegalStateException, SystemException {
         try {
             getResource().delResource(arg0);
             return true;
-        } catch (StatusNotAllowedException e) {
+        } catch (InvalidStateException e) {
             throw new IllegalStateException(e);
+        } catch (InvalidTransitionException e) {
+            throw new SystemException(e.getMessage());
         }
     }
-    
+
     /* (non-Javadoc)
      * @see 
javax.transaction.Transaction#enlistResource(javax.transaction.xa.XAResource)
      */
     public boolean enlistResource(XAResource arg0)
-        throws IllegalStateException 
-    {
+            throws IllegalStateException, SystemException, RollbackException 
{
         try {
             getResource().addResource(arg0);
             return true;
-        } catch (StatusNotAllowedException e) {
+        } catch (InvalidStateException e) {
+            TransactionStatus[] rollback = new TransactionStatus[] {
+                    TransactionStatusMarkedRollback.status,
+                    TransactionStatusRolledBack.status,
+                    TransactionStatusRollingBack.status };
+            if (getTxState().checkStatus(rollback))
+                throw new RollbackException(
+                        "Transaction is marked for Rollback.");
             throw new IllegalStateException(e);
+        } catch (InvalidTransitionException e) {
+            throw new SystemException(e.getMessage());
         }
     }
-    
+
     /* (non-Javadoc)
      * @see javax.transaction.Transaction#getStatus()
      */
-    public int getStatus() {
-        return getStatusConverter().toValue(getTxState().getStatus()) ;
+    public int getStatus() throws SystemException {
+        try {
+            return getStatusConverter().toValue(getTxState().getStatus());
+        } catch (InvalidTransitionException e) {
+            throw new SystemException(e.getMessage());
+        }
     }
-    
+
     /* (non-Javadoc)
      * @see 
javax.transaction.Transaction#registerSynchronization(javax.transaction.Synchronization)
      */
     public void registerSynchronization(Synchronization arg0)
-        throws IllegalStateException 
-    {
+            throws IllegalStateException, RollbackException, SystemException 
{
         try {
             getSynchronization().addResource(arg0);
-        } catch (StatusNotAllowedException e) {
+        } catch (InvalidStateException e) {
+            TransactionStatus[] rollback = new TransactionStatus[] {
+                    TransactionStatusMarkedRollback.status,
+                    TransactionStatusRolledBack.status,
+                    TransactionStatusRollingBack.status };
+            if (getTxState().checkStatus(rollback))
+                throw new RollbackException(
+                        "Transaction is marked for Rollback.");
             throw new IllegalStateException(e);
+        } catch (InvalidTransitionException e) {
+            throw new SystemException(e.getMessage());
         }
     }
-    
+
     /* (non-Javadoc)
      * @see javax.transaction.Transaction#rollback()
      */
-    public void rollback() 
-        throws IllegalStateException
-    {
+    public void rollback() throws IllegalStateException {
         try {
-            getTxRollback().process() ;
-        } catch (StatusNotAllowedException e) {
+            getTxRollback().process(new HashMap());
+        } catch (InvalidTransitionException e) {
             throw new IllegalStateException(e);
         }
     }
-    
+
     /* (non-Javadoc)
      * @see javax.transaction.Transaction#setRollbackOnly()
      */
-    public void setRollbackOnly()
-        throws IllegalStateException 
-    {
+    public void setRollbackOnly() throws IllegalStateException {
         try {
             getTxState().setStatus(TransactionStatusMarkedRollback.status);
-        } catch (StatusNotAllowedException e) {
+        } catch (InvalidTransitionException e) {
             throw new IllegalStateException(e);
-        }            
+        }
     }
-    
+
     /* (non-Javadoc)
      * @see javax.transaction.UserTransaction#begin()
      */
-    public void begin() {
-        getTxState().setStatus(TransactionStatusTransactionActive.status);
+    public void begin() throws NotSupportedException {
+        try {
+            
getTxState().setStatus(TransactionStatusTransactionActive.status);
+        } catch (InvalidTransitionException e) {
+            throw new NotSupportedException("Transaction Already Active.");
+        }
     }
-    
+
     /* (non-Javadoc)
      * @see javax.transaction.UserTransaction#setTransactionTimeout(int)
      */
-    public void setTransactionTimeout(int arg0) {
-        // To complete
+    public void setTransactionTimeout(int arg0) throws SystemException {
+        try {
+            getTimeout().setTimeout(arg0);
+        } catch (InvalidStateException e) {
+            throw new SystemException(e.getMessage());
+        }
     }
-}
+}
\ No newline at end of file
Index: gotm-jts/src/java/org/objectweb/gotm/lib/jta/XAFlagsConverter.java
diff -u 
gotm-jts/src/java/org/objectweb/gotm/lib/jta/XAFlagsConverter.java:1.3 
gotm-jts/src/java/org/objectweb/gotm/lib/jta/XAFlagsConverter.java:removed
--- gotm-jts/src/java/org/objectweb/gotm/lib/jta/XAFlagsConverter.java:1.3    
  Wed Feb 23 18:39:45 2005
+++ gotm-jts/src/java/org/objectweb/gotm/lib/jta/XAFlagsConverter.java  Mon 
Jul 11 10:27:09 2005
@@ -1,85 +0,0 @@
-/*====================================================================
-
-GoTM: GoTM is an open Transaction Monitor
-Copyright (C) 2000-2004 INRIA & USTL - LIFL - GOAL
-Contact: gotm-team@xxxxxxxxxxxxx
-
-This library 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 any later version.
-
-This library 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 library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
-USA
-
-Initial developer(s): Romain Rouvoy.
-Contributor(s): .
-
----------------------------------------------------------------------
-$Id: XAFlagsConverter.java,v 1.3 2005/02/23 17:39:45 rouvoy Exp $
-====================================================================*/
-
-package org.objectweb.gotm.lib.jta;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.transaction.xa.XAResource;
-
-import org.objectweb.gotm.lib.event.EventConverter;
-import org.objectweb.transaction.api.event.Event;
-import org.objectweb.transaction.lib.transaction.TransactionStatusCommitting;
-import 
org.objectweb.transaction.lib.transaction.TransactionStatusRollingBack;
-
-/**
- * @author <a href="mailto:Romain.Rouvoy@xxxxxxx";>Romain Rouvoy</a>
- * @created 6 janv. 2005
- * @modified $Date: 2005/02/23 17:39:45 $
- * @version $Revision: 1.3 $
- * @fractal.itf
- */
-public class XAFlagsConverter    
-  implements EventConverter 
-{
-    /** <code>values</code> . */
-    private Map values ;
-    
-    /**
-     * Default Constructor.
-     */
-    public XAFlagsConverter() {
-        setValues(new HashMap());
-        getValues().put(TransactionStatusCommitting.status,
-                        new Integer(XAResource.TMSUCCESS));
-        getValues().put(TransactionStatusRollingBack.status,
-                        new Integer(XAResource.TMFAIL));
-    }
-    
-    /**
-     * @return Returns the values.
-     */
-    protected Map getValues() {
-        return this.values;
-    }
-
-    /**
-     * @param values The values to set.
-     */
-    protected void setValues(Map values) {
-        this.values = values;
-    }
-
-    /* (non-Javadoc)
-     * @see 
org.objectweb.gotm.lib.jta.EventConverter#toValue(org.objectweb.transaction.api.event.Event)
-     */
-    public int toValue(Event evt) {
-        return ((Integer)getValues().get(evt)).intValue();
-    }
-}
Index: 
gotm-jts/src/java/org/objectweb/gotm/lib/jta/XAResourceActionProvider.java
diff -u 
gotm-jts/src/java/org/objectweb/gotm/lib/jta/XAResourceActionProvider.java:1.1
 
gotm-jts/src/java/org/objectweb/gotm/lib/jta/XAResourceActionProvider.java:removed
--- 
gotm-jts/src/java/org/objectweb/gotm/lib/jta/XAResourceActionProvider.java:1.1
      Mon Jul  4 15:02:10 2005
+++ 
gotm-jts/src/java/org/objectweb/gotm/lib/jta/XAResourceActionProvider.java  
Mon Jul 11 10:27:09 2005
@@ -1,153 +0,0 @@
-/*====================================================================
-
-ObjectWeb GoTM project - http://gotm.objectweb.org
-Contact: gotm@xxxxxxxxxxxxx
-
-This library 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 any later version.
-
-This library 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 library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
-USA
-
-Initial developer(s): Romain Rouvoy.
-Contributor(s): ______________________________________.
-
----------------------------------------------------------------------
-$Id: XAResourceActionProvider.java,v 1.1 2005/07/04 13:02:10 rouvoy Exp $
-====================================================================*/
-package org.objectweb.gotm.lib.jta;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.transaction.xa.XAException;
-import javax.transaction.xa.XAResource;
-import javax.transaction.xa.Xid;
-
-import org.objectweb.gotm.lib.resource.AbstractActionProvider;
-import org.objectweb.gotm.lib.resource.Action;
-import org.objectweb.transaction.api.resource.ResourceVote;
-import org.objectweb.transaction.api.xid.XidState;
-import org.objectweb.transaction.lib.resource.ResourceEventCommit;
-import org.objectweb.transaction.lib.resource.ResourceEventRollback;
-import org.objectweb.transaction.lib.resource.ResourceEventVote;
-import org.objectweb.transaction.lib.resource.ResourceVoteCommit;
-import org.objectweb.transaction.lib.resource.ResourceVoteReadOnly;
-import org.objectweb.transaction.lib.resource.ResourceVoteRollback;
-import org.objectweb.transaction.lib.transaction.TransactionStatusCommitted;
-import org.objectweb.transaction.lib.transaction.TransactionStatusRolledBack;
-import 
org.objectweb.transaction.lib.transaction.TransactionStatusTransactionActive;
-
-
-/**
- * @author <a href="mailto:Romain.Rouvoy@xxxxxxx";>Romain Rouvoy</a>
- * @created 3 janv. 2005
- * @modified $Date: 2005/07/04 13:02:10 $
- * @version $Revision: 1.1 $
- * @fractal.itf name="xa-action-provider" 
signature="org.objectweb.gotm.lib.resource.ActionProvider"
- * @fractal.itf name="xid-state" role="client" 
signature="org.objectweb.transaction.api.xid.XidState"
- */
-public class XAResourceActionProvider 
-     extends AbstractActionProvider
-{
-    /** Fractal ADL Identifier for the <code>XA_RESOURCE</code> interface.*/
-    public static final String XA_RESOURCE = "xa-resource";
-    
-    protected String[] clientFc() {
-        return new String[] {
-                XidState.XID_STATE
-        };
-    }
-    
-    /**
-     * @return the associated XID.
-     */
-    protected XidState getXid() {
-        return (XidState) fcBindings.get(XidState.XID_STATE);
-    }
-    
-    /* (non-Javadoc)
-     * @see org.objectweb.gotm.lib.resource.ActionProvider#getEvents()
-     */
-    public int[] getEvents() {
-        return new int[] {
-                TransactionStatusTransactionActive.status.hashCode(),
-                TransactionStatusRolledBack.status.hashCode(),
-                TransactionStatusCommitted.status.hashCode(),
-                ResourceEventVote.event.hashCode(),
-                ResourceEventCommit.event.hashCode(),
-                ResourceEventRollback.event.hashCode()
-        };
-    }
-
-    /* (non-Javadoc)
-     * @see 
org.objectweb.gotm.lib.resource.ResourceManagerImpl#declareActions()
-     */
-    protected Map declareActions() {
-        Map a = new HashMap();
-        a.put(TransactionStatusTransactionActive.status.getValue(), new 
StartAction());
-        a.put(TransactionStatusRolledBack.status.getValue(), new 
StopAction(XAResource.TMFAIL));
-        a.put(TransactionStatusCommitted.status.getValue(), new 
StopAction(XAResource.TMSUCCESS));
-        a.put(ResourceEventVote.event.getValue(), new PrepareAction());
-        a.put(ResourceEventCommit.event.getValue(), new CommitAction());
-        a.put(ResourceEventRollback.event.getValue(), new RollbackAction());
-        return a;
-    }
-    
-    private final class StartAction implements Action {
-        public void execute(Map context, Object resource) throws Exception {
-            Xid xid = null;
-            ((XAResource)resource).start(xid,XAResource.TMNOFLAGS);
-        }
-    }
-    private static final class StopAction implements Action {
-        private int status ;
-        /**
-         * @param status
-         */
-        public StopAction(int status) {this.status = status;}
-        /* (non-Javadoc)
-         * @see 
org.objectweb.gotm.lib.resource.Action#execute(java.util.Map, 
java.lang.Object)
-         */
-        public void execute(Map context, Object resource) throws Exception {
-            ((XAResource)resource).end(null,this.status);
-        }
-    }
-    private final class PrepareAction implements Action {
-        protected void vote(ResourceVote evt, Map ctx) {
-            ((List)ctx.get(evt)).add(XAResourceActionProvider.this);
-        }
-        public void execute(Map context, Object resource) throws Exception {
-            try {
-                int vote = ((XAResource)resource).prepare(null);
-                if (vote == XAResource.XA_OK)
-                   vote(ResourceVoteCommit.vote, context);
-                else
-                    vote(ResourceVoteReadOnly.vote, context);
-            } catch (XAException e) {
-                vote(ResourceVoteRollback.vote, context);
-                throw e;
-            }            
-        }
-    }
-    private final class CommitAction implements Action {
-        public void execute(Map context, Object resource) throws Exception {
-            ((XAResource)resource).commit(null,true);
-        }
-    }
-    private final class RollbackAction implements Action {
-        public void execute(Map context, Object resource) throws Exception {
-            ((XAResource)resource).rollback(null);
-        }
-    }
-}
Index: 
gotm-jts/src/java/org/objectweb/gotm/lib/jta/xa/XAResourceActionProvider.java
diff -u /dev/null 
gotm-jts/src/java/org/objectweb/gotm/lib/jta/xa/XAResourceActionProvider.java:1.1
--- /dev/null   Mon Jul 11 10:27:09 2005
+++ 
gotm-jts/src/java/org/objectweb/gotm/lib/jta/xa/XAResourceActionProvider.java 
      Mon Jul 11 10:27:08 2005
@@ -0,0 +1,189 @@
+/*====================================================================
+
+ ObjectWeb GoTM project - http://gotm.objectweb.org
+ Contact: gotm@xxxxxxxxxxxxx
+
+ This library 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 any later version.
+
+ This library 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 library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
+ USA
+
+ Initial developer(s): Romain Rouvoy.
+ Contributor(s): ______________________________________.
+
+ ---------------------------------------------------------------------
+ $Id: XAResourceActionProvider.java,v 1.1 2005/07/11 08:27:08 rouvoy Exp $
+ ====================================================================*/
+package org.objectweb.gotm.lib.jta.xa;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.transaction.xa.XAException;
+import javax.transaction.xa.XAResource;
+import javax.transaction.xa.Xid;
+
+import org.objectweb.gotm.lib.resource.AbstractActionProvider;
+import org.objectweb.gotm.lib.resource.Action;
+import org.objectweb.gotm.lib.xid.XidFeature;
+import org.objectweb.transaction.api.resource.ResourceVote;
+import org.objectweb.transaction.lib.resource.ResourceEventCommit;
+import org.objectweb.transaction.lib.resource.ResourceEventRollback;
+import org.objectweb.transaction.lib.resource.ResourceEventVote;
+import org.objectweb.transaction.lib.resource.ResourceVoteCommit;
+import org.objectweb.transaction.lib.resource.ResourceVoteReadOnly;
+import org.objectweb.transaction.lib.resource.ResourceVoteRollback;
+import org.objectweb.transaction.lib.transaction.TransactionStatusCommitted;
+import 
org.objectweb.transaction.lib.transaction.TransactionStatusNoTransaction;
+import org.objectweb.transaction.lib.transaction.TransactionStatusRolledBack;
+import 
org.objectweb.transaction.lib.transaction.TransactionStatusTransactionActive;
+
+/**
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx";>Romain Rouvoy</a>
+ * @created 3 janv. 2005
+ * @modified $Date: 2005/07/11 08:27:08 $
+ * @version $Revision: 1.1 $
+ * @fractal.itf name="xa-action-provider"
+ *              signature="org.objectweb.gotm.lib.resource.ActionProvider"
+ * @fractal.itf name="xid-provider" role="client" 
signature="org.objectweb.gotm.lib.xid.XidFeature"
+ */
+public class XAResourceActionProvider
+        extends AbstractActionProvider {
+    /* (non-Javadoc)
+     * @see org.objectweb.fractal.lib.BindablePrimitive#clientFc()
+     */
+    protected String[] clientFc() {
+        return new String[] { XidFeature.XID_PROVIDER };
+    }
+
+    /**
+     * @return the associated XID.
+     */
+    protected Xid getXid() {
+        return ((XidFeature) fcBindings.get(XidFeature.XID_PROVIDER)).xid();
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see 
org.objectweb.gotm.lib.resource.ResourceManagerImpl#declareActions()
+     */
+    protected Map declareActions() {
+        Map a = new HashMap();
+        a.put(TransactionStatusTransactionActive.status, new StartAction(
+                XAResource.TMNOFLAGS));
+        a.put(TransactionStatusRolledBack.status, new StopAction(
+                XAResource.TMFAIL));
+        a.put(TransactionStatusCommitted.status, new StopAction(
+                XAResource.TMSUCCESS));
+        a.put(TransactionStatusNoTransaction.status, new StopAction(
+                XAResource.TMSUSPEND));
+        a.put(ResourceEventVote.event, new PrepareAction());
+        a.put(ResourceEventCommit.event, new CommitAction());
+        a.put(ResourceEventRollback.event, new RollbackAction());
+        return a;
+    }
+
+    private final class StartAction
+            implements Action {
+        private int flag;
+
+        /**
+         * @param flag 
+         */
+        public StartAction(int flag) {
+            this.flag = flag;
+        }
+
+        /* (non-Javadoc)
+         * @see 
org.objectweb.gotm.lib.resource.Action#execute(java.util.Map, 
java.lang.Object)
+         */
+        public void execute(Map context, Object resource) throws Exception {
+            ((XAResource) resource).start(getXid(), this.flag);
+        }
+    }
+
+    private final class StopAction
+            implements Action {
+        private int status;
+
+        /**
+         * @param status
+         */
+        public StopAction(int status) {
+            this.status = status;
+        }
+
+        /*
+         * (non-Javadoc)
+         * 
+         * @see org.objectweb.gotm.lib.resource.Action#execute(java.util.Map,
+         *      java.lang.Object)
+         */
+        public void execute(Map context, Object resource) throws Exception {
+            ((XAResource) resource).end(getXid(), this.status);
+        }
+    }
+
+    private final class PrepareAction
+            implements Action {
+        /**
+         * @param evt
+         * @param ctx
+         * @param resource 
+         */
+        protected void vote(ResourceVote evt, Map ctx, Object resource) {
+            ((List) ctx.get(evt)).add(resource);
+        }
+
+        /* (non-Javadoc)
+         * @see 
org.objectweb.gotm.lib.resource.Action#execute(java.util.Map, 
java.lang.Object)
+         */
+        public void execute(Map context, Object resource) throws Exception {
+            try {
+                int vote = ((XAResource) resource).prepare(getXid());
+                if (vote == XAResource.XA_OK)
+                    vote(ResourceVoteCommit.vote, context, resource);
+                else
+                    vote(ResourceVoteReadOnly.vote, context, resource);
+            } catch (XAException e) {
+                vote(ResourceVoteRollback.vote, context, resource);
+                throw e;
+            }
+        }
+    }
+
+    private final class CommitAction
+            implements Action {
+        /* (non-Javadoc)
+         * @see 
org.objectweb.gotm.lib.resource.Action#execute(java.util.Map, 
java.lang.Object)
+         */
+        public void execute(Map context, Object resource) throws Exception {
+            if (context.get("onePhase") == Boolean.TRUE)
+                ((XAResource) resource).commit(getXid(), true);
+            else
+                ((XAResource) resource).commit(getXid(), false);
+        }
+    }
+
+    private final class RollbackAction
+            implements Action {
+        /* (non-Javadoc)
+         * @see 
org.objectweb.gotm.lib.resource.Action#execute(java.util.Map, 
java.lang.Object)
+         */
+        public void execute(Map context, Object resource) throws Exception {
+            ((XAResource) resource).rollback(getXid());
+        }
+    }
+}
Index: gotm-jts/src/java/org/objectweb/gotm/lib/jta/xa/XidProvider.java
diff -u /dev/null 
gotm-jts/src/java/org/objectweb/gotm/lib/jta/xa/XidProvider.java:1.1
--- /dev/null   Mon Jul 11 10:27:09 2005
+++ gotm-jts/src/java/org/objectweb/gotm/lib/jta/xa/XidProvider.java    Mon 
Jul 11 10:27:08 2005
@@ -0,0 +1,102 @@
+/*====================================================================
+
+GoTM: GoTM is an open Transaction Monitor
+Copyright (C) 2003-2005 INRIA - Jacquard & USTL - LIFL - GOAL
+Contact: gotm-team@xxxxxxxxxxxxx
+
+This library 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 any later version.
+
+This library 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 library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
+USA
+
+Initial developer(s): Romain Rouvoy.
+Contributor(s): .
+
+---------------------------------------------------------------------
+$Id: XidProvider.java,v 1.1 2005/07/11 08:27:08 rouvoy Exp $
+====================================================================*/
+package org.objectweb.gotm.lib.jta.xa;
+
+import javax.transaction.xa.Xid;
+
+import org.objectweb.fractal.api.control.CacheController;
+import org.objectweb.fractal.lib.LoggablePrimitive;
+import org.objectweb.gotm.lib.xid.XidFeature;
+import org.objectweb.gotm.lib.xid.XidImpl;
+import org.objectweb.transaction.api.xid.XidState;
+
+/**
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx";>Romain Rouvoy</a>
+ * @created 5 juil. 2005
+ * @modified $Date: 2005/07/11 08:27:08 $
+ * @version $Revision: 1.1 $
+ * @fractal.itf
+ */
+public class XidProvider
+        extends LoggablePrimitive 
+        implements XidFeature, CacheController {
+
+    /**
+     * <code>GOTM_FORMAT_ID</code> for the GoTM library.
+     */
+    public static final int GOTM_FORMAT_ID = 0xBB14;
+    
+    protected static int count = 1;
+    
+    protected Xid xid = null ;
+    
+    /* (non-Javadoc)
+     * @see org.objectweb.fractal.api.control.CacheController#getCacheState()
+     */
+    public String getCacheState() { return null; }
+
+    /* (non-Javadoc)
+     * @see org.objectweb.fractal.api.control.CacheController#initFc()
+     */
+    public void initFc() {
+        long uuid;
+
+        synchronized (getClass()) {
+            uuid = System.currentTimeMillis() * 1024 + count;
+            count++;
+        }
+        
+        // compute gtrid
+        String s =
+            Long.toHexString(uuid);
+        //                + "_"
+        //                + Long.toHexString(ipAddr)
+        //                + "_"
+        //                + serverName;
+        if (s.length() > XidState.BQUAL_LENGTH_MAX) {
+            s = s.substring(0, XidState.BQUAL_LENGTH_MAX);
+        }
+        // XXX bqual is equal to gtrid in this constructor
+        this.xid = new XidImpl(GOTM_FORMAT_ID,s.getBytes(),s.getBytes());
+    }
+
+    /* (non-Javadoc)
+     * @see org.objectweb.fractal.api.control.CacheController#clearFc()
+     */
+    public void clearFc() {
+        this.xid = null ;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.objectweb.gotm.lib.jta.xa.XidFeature#create()
+     */
+    public Xid xid() {
+        if (this.xid == null) initFc();
+        return this.xid;
+    }
+}
Index: gotm-jts/test/java/org/objectweb/gotm/jts/xa/XABoolean.java
diff -u gotm-jts/test/java/org/objectweb/gotm/jts/xa/XABoolean.java:1.3 
gotm-jts/test/java/org/objectweb/gotm/jts/xa/XABoolean.java:1.4
--- gotm-jts/test/java/org/objectweb/gotm/jts/xa/XABoolean.java:1.3     Wed 
Feb 23 18:39:47 2005
+++ gotm-jts/test/java/org/objectweb/gotm/jts/xa/XABoolean.java Mon Jul 11 
10:27:08 2005
@@ -1,7 +1,7 @@
 /*
  * @(#) XABoolean.java
  *
- * JOTM: Java Open Transaction Manager 
+ * JOTM: Java Open Transaction LoggerManager 
  *
  *
  * This module was orginally developed by 
@@ -41,7 +41,7 @@
  * @author  Christophe Ney
  * Created on Oct 15, 2001  
  
*-----------------------------------------------------------------------------
- * $Id: XABoolean.java,v 1.3 2005/02/23 17:39:47 rouvoy Exp $
+ * $Id: XABoolean.java,v 1.4 2005/07/11 08:27:08 rouvoy Exp $
  
*-----------------------------------------------------------------------------
  */
 package org.objectweb.gotm.jts.xa;
Index: gotm-jts/test/java/org/objectweb/gotm/jts/xa/XAInteger.java
diff -u gotm-jts/test/java/org/objectweb/gotm/jts/xa/XAInteger.java:1.3 
gotm-jts/test/java/org/objectweb/gotm/jts/xa/XAInteger.java:1.4
--- gotm-jts/test/java/org/objectweb/gotm/jts/xa/XAInteger.java:1.3     Wed 
Feb 23 18:39:47 2005
+++ gotm-jts/test/java/org/objectweb/gotm/jts/xa/XAInteger.java Mon Jul 11 
10:27:08 2005
@@ -1,7 +1,7 @@
 /*
  * @(#) XAInteger.java
  *
- * JOTM: Java Open Transaction Manager 
+ * JOTM: Java Open Transaction LoggerManager 
  *
  *
  * This module was orginally developed by 
@@ -41,7 +41,7 @@
  * @author  Christophe Ney
  * Created on Oct 15, 2001 * 
  
*-----------------------------------------------------------------------------
- * $Id: XAInteger.java,v 1.3 2005/02/23 17:39:47 rouvoy Exp $
+ * $Id: XAInteger.java,v 1.4 2005/07/11 08:27:08 rouvoy Exp $
  
*-----------------------------------------------------------------------------
  */
 package org.objectweb.gotm.jts.xa;



<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 2006-2007, OW2 Consortium | contact | webmaster.