OW2 Consortium
Search OW2 Mail Archive: 

Advanced Search - Powered by Google


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

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

CVS update of gotm/src (7 files)


    Date: Thursday, December 22, 2005 @ 11:45:57
  Author: rouvoy
    Path: /cvsroot/gotm/gotm/src

   Added: java/org/objectweb/gotm/lib/message/PublishSyncParallel.java
Modified: fractal/org/objectweb/gotm/lib/logging/FcLogManagerHOWL.fractal
          fractal/org/objectweb/gotm/lib/message/FcEventBusPool.fractal
          fractal/org/objectweb/gotm/lib/message/FcEventBusThread.fractal
          java/org/objectweb/gotm/lib/logging/LoggerProvider.java
          java/org/objectweb/gotm/lib/message/PublishASyncThread.java
 Removed: java/org/objectweb/gotm/lib/message/PublishState.java

* Updating the ACOM example.


-----------------------------------------------------------------+
 fractal/org/objectweb/gotm/lib/logging/FcLogManagerHOWL.fractal |    4 
 fractal/org/objectweb/gotm/lib/message/FcEventBusPool.fractal   |   27 ++--
 fractal/org/objectweb/gotm/lib/message/FcEventBusThread.fractal |   26 ++--
 java/org/objectweb/gotm/lib/logging/LoggerProvider.java         |    5 
 java/org/objectweb/gotm/lib/message/PublishASyncThread.java     |   18 --
 java/org/objectweb/gotm/lib/message/PublishState.java           |   37 ------
 java/org/objectweb/gotm/lib/message/PublishSyncParallel.java    |   61 
++++++++++
 7 files changed, 98 insertions(+), 80 deletions(-)


Index: 
gotm/src/fractal/org/objectweb/gotm/lib/logging/FcLogManagerHOWL.fractal
diff -u 
gotm/src/fractal/org/objectweb/gotm/lib/logging/FcLogManagerHOWL.fractal:1.4 
gotm/src/fractal/org/objectweb/gotm/lib/logging/FcLogManagerHOWL.fractal:1.5
--- 
gotm/src/fractal/org/objectweb/gotm/lib/logging/FcLogManagerHOWL.fractal:1.4  
      Tue Nov 22 13:35:01 2005
+++ gotm/src/fractal/org/objectweb/gotm/lib/logging/FcLogManagerHOWL.fractal  
  Thu Dec 22 11:45:56 2005
@@ -19,11 +19,11 @@
        definition="org.objectweb.gotm.lib.logging.FcSimpleLogger"/>
 
   <binding client="this.write-force"                 
server="FcForceLogger.write-log"/>
-  <binding client="FcForceLogger.logger-provider"    
server="FcProvider.logger-provider"/>
+  <binding client="FcForceLogger.howlogger-provider" 
server="FcProvider.howlogger-provider"/>
   <binding client="FcForceLogger.reference-provider" 
server="this.reference-provider"/>
 
   <binding client="this.write-no-force"                
server="FcNoForceLogger.write-log"/>
-  <binding client="FcNoForceLogger.logger-provider"    
server="FcProvider.logger-provider"/>
+  <binding client="FcNoForceLogger.howlogger-provider" 
server="FcProvider.howlogger-provider"/>
   <binding client="FcNoForceLogger.reference-provider" 
server="this.reference-provider"/>
 
   <binding client="this.write-empty" server="FcEmptyLogger.write-log"/>
Index: gotm/src/fractal/org/objectweb/gotm/lib/message/FcEventBusPool.fractal
diff -u 
gotm/src/fractal/org/objectweb/gotm/lib/message/FcEventBusPool.fractal:1.3 
gotm/src/fractal/org/objectweb/gotm/lib/message/FcEventBusPool.fractal:1.4
--- 
gotm/src/fractal/org/objectweb/gotm/lib/message/FcEventBusPool.fractal:1.3  
Fri Dec 16 17:03:22 2005
+++ gotm/src/fractal/org/objectweb/gotm/lib/message/FcEventBusPool.fractal    
  Thu Dec 22 11:45:57 2005
@@ -5,22 +5,23 @@
 
 <definition name="org.objectweb.gotm.lib.message.FcEventBusThread" 
          extends="org.objectweb.gotm.lib.message.FcEventBusAbstract">
-  <component name="FcSyncPublish"
+  <component name="Sync"
        definition="org.objectweb.gotm.lib.message.FcPublishSyncThread"/>
-  <component name="FcASyncPublish"
+  <component name="Async"
        definition="org.objectweb.gotm.lib.message.FcPublishASyncPool"/>
-  <component name="FcThreadPool"
+  <component name="Pool"
        definition="org.objectweb.util.thread.comp.FcThreadManager(10,100)"/>
   
-  <binding client="this.publish-sync" 
-           server="FcSyncPublish.publish"/>
-  <binding client="FcSyncPublish.subscriber-provider" 
-           server="MessageDelegate.subscriber-provider"/>
+  <binding client="this.publish-sync"  server="SyncCheck.publish"/>
+  <binding client="SyncCheck.graph"    server="State.graph"/>
+  <binding client="SyncCheck.delegate" server="Sync.publish"/>
+  <binding client="Sync.subscriber-provider" 
+           server="Subscribers.subscriber-provider"/>
 
-  <binding client="this.publish-async" 
-           server="FcASyncPublish.publish"/>
-  <binding client="FcASyncPublish.subscriber-provider" 
-           server="MessageDelegate.subscriber-provider"/>
-  <binding client="FcASyncPublish.runnable-manager"
-           server="FcThreadPool.runnable-manager"/>
+  <binding client="this.publish-async"     server="AsyncCheck.publish"/>
+  <binding client="AsyncCheck.graph"       server="State.graph"/>
+  <binding client="AsyncCheck.delegate"    server="Async.publish"/>
+  <binding client="Async.runnable-manager" server="Pool.runnable-manager"/>
+  <binding client="Async.subscriber-provider" 
+           server="Subscribers.subscriber-provider"/>
 </definition>
\ No newline at end of file
Index: 
gotm/src/fractal/org/objectweb/gotm/lib/message/FcEventBusThread.fractal
diff -u 
gotm/src/fractal/org/objectweb/gotm/lib/message/FcEventBusThread.fractal:1.3 
gotm/src/fractal/org/objectweb/gotm/lib/message/FcEventBusThread.fractal:1.4
--- 
gotm/src/fractal/org/objectweb/gotm/lib/message/FcEventBusThread.fractal:1.3  
      Fri Dec 16 17:03:22 2005
+++ gotm/src/fractal/org/objectweb/gotm/lib/message/FcEventBusThread.fractal  
  Thu Dec 22 11:45:57 2005
@@ -5,18 +5,24 @@
 
 <definition name="org.objectweb.gotm.lib.message.FcEventBusThread" 
          extends="org.objectweb.gotm.lib.message.FcEventBusAbstract">
-  <component name="FcSyncPublish"
+  <component name="SyncCheck"
+       definition="org.objectweb.gotm.lib.state.FcPublishChecker"/>
+  <component name="Sync"
        definition="org.objectweb.gotm.lib.message.FcPublishSyncThread"/>
-  <component name="FcASyncPublish"
+  <component name="AsyncCheck"
+       definition="org.objectweb.gotm.lib.state.FcPublishChecker"/>
+  <component name="Async"
        definition="org.objectweb.gotm.lib.message.FcPublishASyncThread"/>
   
-  <binding client="this.publish-sync" 
-           server="FcSyncPublish.publish"/>
-  <binding client="FcSyncPublish.subscriber-provider" 
-           server="MessageDelegate.subscriber-provider"/>
+  <binding client="this.publish-sync"  server="SyncCheck.publish"/>
+  <binding client="SyncCheck.graph"    server="State.graph"/>
+  <binding client="SyncCheck.delegate" server="Sync.publish"/>
+  <binding client="Sync.subscriber-provider" 
+           server="Subscribers.subscriber-provider"/>
 
-  <binding client="this.publish-async" 
-           server="FcASyncPublish.publish"/>
-  <binding client="FcASyncPublish.subscriber-provider" 
-           server="MessageDelegate.subscriber-provider"/>
+  <binding client="this.publish-async"  server="AsyncCheck.publish"/>
+  <binding client="AsyncCheck.graph"    server="State.graph"/>
+  <binding client="AsyncCheck.delegate" server="Async.publish"/>
+  <binding client="Async.subscriber-provider" 
+           server="Subscribers.subscriber-provider"/>
 </definition>
\ No newline at end of file
Index: gotm/src/java/org/objectweb/gotm/lib/logging/LoggerProvider.java
diff -u gotm/src/java/org/objectweb/gotm/lib/logging/LoggerProvider.java:1.2 
gotm/src/java/org/objectweb/gotm/lib/logging/LoggerProvider.java:1.3
--- gotm/src/java/org/objectweb/gotm/lib/logging/LoggerProvider.java:1.2      
  Fri Dec 16 17:03:22 2005
+++ gotm/src/java/org/objectweb/gotm/lib/logging/LoggerProvider.java    Thu 
Dec 22 11:45:57 2005
@@ -17,7 +17,7 @@
 Initial developer(s): Romain Rouvoy (romain.rouvoy@xxxxxxx)
 Contributor(s): .
 
--------------------------------------------------------------------------------
-$Id: LoggerProvider.java,v 1.2 2005/12/16 16:03:22 rouvoy Exp $
+$Id: LoggerProvider.java,v 1.3 2005/12/22 10:45:57 rouvoy Exp $
 
==============================================================================*/
 package org.objectweb.gotm.lib.logging;
 
@@ -26,7 +26,8 @@
 
 /**
  * @author <a href="mailto:Romain.Rouvoy@xxxxxxx";>Romain Rouvoy</a>
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
+ * @fractal.itf name="howlogger-provider"
  */
 public interface LoggerProvider
         extends Feature {
Index: gotm/src/java/org/objectweb/gotm/lib/message/PublishASyncThread.java
diff -u 
gotm/src/java/org/objectweb/gotm/lib/message/PublishASyncThread.java:1.3 
gotm/src/java/org/objectweb/gotm/lib/message/PublishASyncThread.java:1.4
--- gotm/src/java/org/objectweb/gotm/lib/message/PublishASyncThread.java:1.3  
  Tue Dec 20 11:49:28 2005
+++ gotm/src/java/org/objectweb/gotm/lib/message/PublishASyncThread.java      
  Thu Dec 22 11:45:57 2005
@@ -17,20 +17,17 @@
 Initial developer(s): Romain Rouvoy (romain.rouvoy@xxxxxxx)
 Contributor(s): .
 
--------------------------------------------------------------------------------
-$Id: PublishASyncThread.java,v 1.3 2005/12/20 10:49:28 rouvoy Exp $
+$Id: PublishASyncThread.java,v 1.4 2005/12/22 10:45:57 rouvoy Exp $
 
==============================================================================*/
 package org.objectweb.gotm.lib.message;
 
-import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.Map;
 
-import org.objectweb.gotm.GoTMException;
 import org.objectweb.transaction.api.message.PublishFeature;
 
 /**
  * @author <a href="mailto:Romain.Rouvoy@xxxxxxx";>Romain Rouvoy</a>
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
  */
 public class PublishASyncThread
         extends PublishSyncThread {
@@ -41,21 +38,10 @@
     public void notify(String topic, Map context) {
         if (this.logger.isLoggable(DEBUG))
             this.logger.log(DEBUG, "Notification of the " + topic + " 
topic.");
-        ArrayList actions = new ArrayList();
         PublishFeature[] obs = this.subscriberProvider.getTopic(topic);
         for (int i=0;i<obs.length;i++) {
             Thread action = new NotifyAction(obs[i], topic, context);
-            actions.add(action);
             action.start();
         }
-        for (Iterator i = actions.iterator(); i.hasNext();) {
-            try {
-                ((Thread) i.next()).join();
-            } catch (InterruptedException e) {
-                if (this.logger.isLoggable(ERROR)) 
-                    this.logger.log(ERROR, "Failure during asynchronous 
notification of the "+topic+" topic: ", e);
-                throw new GoTMException(e);
-            }
-        }
     }
 }
\ No newline at end of file
Index: gotm/src/java/org/objectweb/gotm/lib/message/PublishState.java
diff -u gotm/src/java/org/objectweb/gotm/lib/message/PublishState.java:1.2 
gotm/src/java/org/objectweb/gotm/lib/message/PublishState.java:removed
--- gotm/src/java/org/objectweb/gotm/lib/message/PublishState.java:1.2  Fri 
Dec 16 17:03:22 2005
+++ gotm/src/java/org/objectweb/gotm/lib/message/PublishState.java      Thu 
Dec 22 11:45:57 2005
@@ -1,37 +0,0 @@
-/*==============================================================================
-GoTM - Copyright (C) 2000-2006 INRIA - Jacquard & USTL - LIFL - GOAL
-GoTM is an open Transaction Monitor (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 (romain.rouvoy@xxxxxxx)
-Contributor(s): .
---------------------------------------------------------------------------------
-$Id: PublishState.java,v 1.2 2005/12/16 16:03:22 rouvoy Exp $
-==============================================================================*/
-package org.objectweb.gotm.lib.message;
-
-import org.objectweb.gotm.ComponentImpl;
-import org.objectweb.transaction.api.message.PublishFeature;
-
-/**
- * @author <a href="mailto:Romain.Rouvoy@xxxxxxx";>Romain Rouvoy</a>
- * @version $Revision: 1.2 $
- */
-public abstract class PublishState
-        extends ComponentImpl {
-    /**
-     * @fractal.bc
-     */
-    protected PublishFeature publish;
-}
\ No newline at end of file
Index: gotm/src/java/org/objectweb/gotm/lib/message/PublishSyncParallel.java
diff -u /dev/null 
gotm/src/java/org/objectweb/gotm/lib/message/PublishSyncParallel.java:1.1
--- /dev/null   Thu Dec 22 11:45:57 2005
+++ gotm/src/java/org/objectweb/gotm/lib/message/PublishSyncParallel.java     
  Thu Dec 22 11:45:57 2005
@@ -0,0 +1,61 @@
+/*==============================================================================
+GoTM - Copyright (C) 2000-2006 INRIA - Jacquard & USTL - LIFL - GOAL
+GoTM is an open Transaction Monitor (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 (romain.rouvoy@xxxxxxx)
+Contributor(s): .
+--------------------------------------------------------------------------------
+$Id: PublishSyncParallel.java,v 1.1 2005/12/22 10:45:57 rouvoy Exp $
+==============================================================================*/
+package org.objectweb.gotm.lib.message;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.objectweb.gotm.GoTMException;
+import org.objectweb.transaction.api.message.PublishFeature;
+
+/**
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx";>Romain Rouvoy</a>
+ * @version $Revision: 1.1 $
+ */
+public class PublishSyncParallel
+        extends PublishSyncThread {
+    /*
+     * (non-Javadoc)
+     * @see 
org.objectweb.transaction.api.message.PublishFeature#notify(org.objectweb.transaction.api.message.Event,java.util.Map)
+     */
+    public void notify(String topic, Map context) {
+        if (this.logger.isLoggable(DEBUG))
+            this.logger.log(DEBUG, "Notification of the " + topic + " 
topic.");
+        ArrayList actions = new ArrayList();
+        PublishFeature[] obs = this.subscriberProvider.getTopic(topic);
+        for (int i=0;i<obs.length;i++) {
+            Thread action = new NotifyAction(obs[i], topic, context);
+            actions.add(action);
+            action.start();
+        }
+        for (Iterator i = actions.iterator(); i.hasNext();) {
+            try {
+                ((Thread) i.next()).join();
+            } catch (InterruptedException e) {
+                if (this.logger.isLoggable(ERROR)) 
+                    this.logger.log(ERROR, "Failure during asynchronous 
notification of the "+topic+" topic: ", e);
+                throw new GoTMException(e);
+            }
+        }
+    }
+}
\ No newline at end of file



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

Reply via email to:

Powered by MHonArc.

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