Mail Archive Home | gotm-commits List | August 2005 Index
| <-- Date Index --> | <-- Thread Index --> |
Date: Friday, August 5, 2005 @ 17:06:29
Author: rouvoy
Path: /cvsroot/gotm/gotm
Added: src/fractal/org/objectweb/gotm/lib/event/TpEventBusAbstract.fractal
src/fractal/org/objectweb/gotm/lib/event/TpEventBusPool.fractal
src/fractal/org/objectweb/gotm/lib/event/TpEventBusSimple.fractal
src/fractal/org/objectweb/gotm/lib/event/TpEventBusThread.fractal
src/fractal/org/objectweb/gotm/lib/logging/TpLogManagerHOWL.fractal
src/fractal/org/objectweb/gotm/lib/protocol/Tp2PC.fractal
src/fractal/org/objectweb/gotm/lib/protocol/Tp2PCAbstract.fractal
src/fractal/org/objectweb/gotm/lib/protocol/Tp2PCNoLog.fractal
src/fractal/org/objectweb/gotm/lib/protocol/Tp2PCPA.fractal
src/fractal/org/objectweb/gotm/lib/protocol/Tp2PCPC.fractal
src/java/org/objectweb/gotm/lib/CurrentManagerAbstract.java
src/java/org/objectweb/gotm/lib/StaticCurrentManager.java
src/java/org/objectweb/gotm/lib/context/CommitProtocolAwareness.java
src/java/org/objectweb/gotm/lib/context/Configurable.java
src/java/org/objectweb/gotm/lib/context/ConfigurableCurrentManager.java
src/java/org/objectweb/gotm/lib/context/ContextAwareness.java
src/java/org/objectweb/gotm/lib/context/ContextAwarenessImpl.java
src/java/org/objectweb/gotm/lib/event/PublishASyncPool.java
Modified: .settings/org.eclipse.core.resources.prefs
src/fractal/org/objectweb/gotm/lib/coordination/TpCommitEngine.fractal
src/java/org/objectweb/gotm/Gotm.java
src/java/org/objectweb/gotm/lib/CurrentManager.java
src/java/org/objectweb/gotm/lib/coordination/AbortFeature.java
src/java/org/objectweb/gotm/lib/coordination/CommitFeature.java
src/java/org/objectweb/gotm/lib/coordination/TimeoutImpl.java
src/java/org/objectweb/gotm/lib/coordination/TwoPCFeature.java
src/java/org/objectweb/gotm/lib/event/PublishASyncThread.java
src/java/org/objectweb/gotm/lib/event/PublishSimple.java
src/java/org/objectweb/gotm/lib/event/PublishSyncThread.java
src/java/org/objectweb/gotm/lib/event/SubscribablePrimitive.java
src/java/org/objectweb/gotm/lib/logging/HOWLoggerProvider.java
src/java/org/objectweb/gotm/lib/logging/SimpleLogger.java
src/java/org/objectweb/gotm/lib/resource/ActionProviderAbstract.java
src/java/org/objectweb/gotm/lib/resource/ResourceManagerASync.java
src/java/org/objectweb/gotm/lib/resource/ResourceManagerAbstract.java
src/java/org/objectweb/gotm/lib/resource/ResourceManagerImpl.java
src/java/org/objectweb/gotm/lib/transaction/TransactionStateAuto.java
src/java/org/objectweb/gotm/lib/transaction/TransactionStateImpl.java
Removed: src/fractal/org/objectweb/gotm/lib/coordination/Tp2PC.fractal
src/fractal/org/objectweb/gotm/lib/event/TpEventBus.fractal
src/fractal/org/objectweb/gotm/lib/event/TpEventBusWithPool.fractal
src/fractal/org/objectweb/gotm/lib/event/TpEventBusWithThread.fractal
src/fractal/org/objectweb/gotm/lib/logging/TpLoggingHOWL.fractal
src/java/org/objectweb/gotm/lib/CurrentHandler.java
src/java/org/objectweb/gotm/lib/event/PublishThreadPool.java
fractal-import:
* Updating Fractal & Julia jars.
fractal-pool:
* Adding support for merge optimization with the Cache controller.
gotm:
* Adding HOWL Logging support,
* Implementing 2PC, 2PCPC & 2PCPA commit protocols,
* Adding various configuration of the Event Engine,
* Adding support for configurable current manager.
gotm-jts:
* Improving JTS implementation,
* Adding JTS JUnit tests as example,
* Adding Benchmarks (JTS, 2PC, Adaptive PC) as example.
-------------------------------------------------------------------------+
.settings/org.eclipse.core.resources.prefs |
17
src/fractal/org/objectweb/gotm/lib/coordination/Tp2PC.fractal |
44 --
src/fractal/org/objectweb/gotm/lib/coordination/TpCommitEngine.fractal |
17
src/fractal/org/objectweb/gotm/lib/event/TpEventBus.fractal |
35 -
src/fractal/org/objectweb/gotm/lib/event/TpEventBusAbstract.fractal |
21
src/fractal/org/objectweb/gotm/lib/event/TpEventBusPool.fractal |
27 +
src/fractal/org/objectweb/gotm/lib/event/TpEventBusSimple.fractal |
18
src/fractal/org/objectweb/gotm/lib/event/TpEventBusThread.fractal |
23 +
src/fractal/org/objectweb/gotm/lib/event/TpEventBusWithPool.fractal |
26 -
src/fractal/org/objectweb/gotm/lib/event/TpEventBusWithThread.fractal |
21
src/fractal/org/objectweb/gotm/lib/logging/TpLogManagerHOWL.fractal |
37 +
src/fractal/org/objectweb/gotm/lib/logging/TpLoggingHOWL.fractal |
36 -
src/fractal/org/objectweb/gotm/lib/protocol/Tp2PC.fractal |
19
src/fractal/org/objectweb/gotm/lib/protocol/Tp2PCAbstract.fractal |
45 ++
src/fractal/org/objectweb/gotm/lib/protocol/Tp2PCNoLog.fractal |
18
src/fractal/org/objectweb/gotm/lib/protocol/Tp2PCPA.fractal |
19
src/fractal/org/objectweb/gotm/lib/protocol/Tp2PCPC.fractal |
19
src/java/org/objectweb/gotm/Gotm.java |
53 +-
src/java/org/objectweb/gotm/lib/CurrentHandler.java |
216 ----------
src/java/org/objectweb/gotm/lib/CurrentManager.java |
21
src/java/org/objectweb/gotm/lib/CurrentManagerAbstract.java |
185 ++++++++
src/java/org/objectweb/gotm/lib/StaticCurrentManager.java |
99 ++++
src/java/org/objectweb/gotm/lib/context/CommitProtocolAwareness.java |
114 +++++
src/java/org/objectweb/gotm/lib/context/Configurable.java |
52 ++
src/java/org/objectweb/gotm/lib/context/ConfigurableCurrentManager.java |
162 +++++++
src/java/org/objectweb/gotm/lib/context/ContextAwareness.java |
55 ++
src/java/org/objectweb/gotm/lib/context/ContextAwarenessImpl.java |
92 ++++
src/java/org/objectweb/gotm/lib/coordination/AbortFeature.java |
12
src/java/org/objectweb/gotm/lib/coordination/CommitFeature.java |
12
src/java/org/objectweb/gotm/lib/coordination/TimeoutImpl.java |
10
src/java/org/objectweb/gotm/lib/coordination/TwoPCFeature.java |
22 -
src/java/org/objectweb/gotm/lib/event/PublishASyncPool.java |
104 ++++
src/java/org/objectweb/gotm/lib/event/PublishASyncThread.java |
130 ++----
src/java/org/objectweb/gotm/lib/event/PublishSimple.java |
12
src/java/org/objectweb/gotm/lib/event/PublishSyncThread.java |
124 +++--
src/java/org/objectweb/gotm/lib/event/PublishThreadPool.java |
106 ----
src/java/org/objectweb/gotm/lib/event/SubscribablePrimitive.java |
8
src/java/org/objectweb/gotm/lib/logging/HOWLoggerProvider.java |
64 +-
src/java/org/objectweb/gotm/lib/logging/SimpleLogger.java |
8
src/java/org/objectweb/gotm/lib/resource/ActionProviderAbstract.java |
8
src/java/org/objectweb/gotm/lib/resource/ResourceManagerASync.java |
9
src/java/org/objectweb/gotm/lib/resource/ResourceManagerAbstract.java |
30 -
src/java/org/objectweb/gotm/lib/resource/ResourceManagerImpl.java |
7
src/java/org/objectweb/gotm/lib/transaction/TransactionStateAuto.java |
9
src/java/org/objectweb/gotm/lib/transaction/TransactionStateImpl.java |
10
45 files changed, 1434 insertions(+), 742 deletions(-)
Index: gotm/.settings/org.eclipse.core.resources.prefs
diff -u gotm/.settings/org.eclipse.core.resources.prefs:1.4
gotm/.settings/org.eclipse.core.resources.prefs:1.5
--- gotm/.settings/org.eclipse.core.resources.prefs:1.4 Mon Jul 11 10:27:04
2005
+++ gotm/.settings/org.eclipse.core.resources.prefs Fri Aug 5 17:06:29
2005
@@ -1,8 +1,13 @@
-#Fri Jul 08 18:16:18 CEST 2005
+#Mon Aug 01 16:01:41 CEST 2005
eclipse.preferences.version=1
-encoding//src/fractal/org/objectweb/gotm/lib/coordination/Tp2PC.fractal=ISO-8859-1
encoding//src/fractal/org/objectweb/gotm/lib/coordination/TpCommitEngine.fractal=ISO-8859-1
-encoding//src/fractal/org/objectweb/gotm/lib/event/TpEventBus.fractal=ISO-8859-1
-encoding//src/fractal/org/objectweb/gotm/lib/event/TpEventBusWithPool.fractal=ISO-8859-1
-encoding//src/fractal/org/objectweb/gotm/lib/event/TpEventBusWithThread.fractal=ISO-8859-1
-encoding//src/fractal/org/objectweb/gotm/lib/logging/TpLoggingHOWL.fractal=ISO-8859-1
+encoding//src/fractal/org/objectweb/gotm/lib/event/TpEventBusAbstract.fractal=ISO-8859-1
+encoding//src/fractal/org/objectweb/gotm/lib/event/TpEventBusPool.fractal=ISO-8859-1
+encoding//src/fractal/org/objectweb/gotm/lib/event/TpEventBusSimple.fractal=ISO-8859-1
+encoding//src/fractal/org/objectweb/gotm/lib/event/TpEventBusThread.fractal=ISO-8859-1
+encoding//src/fractal/org/objectweb/gotm/lib/logging/TpLogManagerHOWL.fractal=ISO-8859-1
+encoding//src/fractal/org/objectweb/gotm/lib/protocol/Tp2PC.fractal=ISO-8859-1
+encoding//src/fractal/org/objectweb/gotm/lib/protocol/Tp2PCAbstract.fractal=ISO-8859-1
+encoding//src/fractal/org/objectweb/gotm/lib/protocol/Tp2PCNoLog.fractal=ISO-8859-1
+encoding//src/fractal/org/objectweb/gotm/lib/protocol/Tp2PCPA.fractal=ISO-8859-1
+encoding//src/fractal/org/objectweb/gotm/lib/protocol/Tp2PCPC.fractal=ISO-8859-1
Index: gotm/src/fractal/org/objectweb/gotm/lib/coordination/Tp2PC.fractal
diff -u
gotm/src/fractal/org/objectweb/gotm/lib/coordination/Tp2PC.fractal:1.5
gotm/src/fractal/org/objectweb/gotm/lib/coordination/Tp2PC.fractal:removed
--- gotm/src/fractal/org/objectweb/gotm/lib/coordination/Tp2PC.fractal:1.5
Mon Jul 18 16:33:35 2005
+++ gotm/src/fractal/org/objectweb/gotm/lib/coordination/Tp2PC.fractal Fri
Aug 5 17:06:30 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.coordination.Tp2PC">
- <interface name="commit" role="server"
-
signature="org.objectweb.transaction.api.coordination.CoordinationFeature"/>
- <interface name="abort" role="server"
-
signature="org.objectweb.transaction.api.coordination.CoordinationFeature"/>
-
- <interface name="tx-state" role="client"
-
signature="org.objectweb.transaction.api.transaction.TransactionState"/>
- <interface name="sync-publish" role="client"
- signature="org.objectweb.transaction.api.event.PublishFeature"/>
- <interface name="async-publish" role="client"
- signature="org.objectweb.transaction.api.event.PublishFeature"/>
- <interface name="force" role="client"
- signature="org.objectweb.transaction.api.logging.LoggerFeature"/>
- <interface name="no-force" role="client"
- signature="org.objectweb.transaction.api.logging.LoggerFeature"/>
- <interface name="empty" role="client"
- signature="org.objectweb.transaction.api.logging.LoggerFeature"/>
-
- <component name="FcCommitEngine"
- definition="org.objectweb.gotm.lib.coordination.TpCommitEngine"/>
-
- <binding client="this.commit" server="FcCommitEngine.commit"/>
- <binding client="this.abort" server="FcCommitEngine.abort"/>
-
- <binding client="FcCommitEngine.tx-state" server="this.tx-state"/>
-
- <binding client="FcCommitEngine.commit-decision"
server="this.sync-publish"/>
- <binding client="FcCommitEngine.prepare-decision"
server="this.sync-publish"/>
- <binding client="FcCommitEngine.abort-decision"
server="this.sync-publish"/>
-
- <binding client="FcCommitEngine.init-log" server="this.empty"/>
- <binding client="FcCommitEngine.commit-log" server="this.empty"/>
- <binding client="FcCommitEngine.abort-log" server="this.empty"/>
- <binding client="FcCommitEngine.commit-end-log" server="this.empty"/>
- <binding client="FcCommitEngine.abort-end-log" server="this.empty"/>
-
- <template-controller desc="compositeTemplate" />
-</definition>
Index:
gotm/src/fractal/org/objectweb/gotm/lib/coordination/TpCommitEngine.fractal
diff -u
gotm/src/fractal/org/objectweb/gotm/lib/coordination/TpCommitEngine.fractal:1.2
gotm/src/fractal/org/objectweb/gotm/lib/coordination/TpCommitEngine.fractal:1.3
---
gotm/src/fractal/org/objectweb/gotm/lib/coordination/TpCommitEngine.fractal:1.2
Mon Jul 18 16:33:35 2005
+++
gotm/src/fractal/org/objectweb/gotm/lib/coordination/TpCommitEngine.fractal
Fri Aug 5 17:06:29 2005
@@ -4,13 +4,19 @@
"classpath://org/objectweb/fractal/adl/xml/basic.dtd">
<definition name="org.objectweb.gotm.lib.coordination.TpCommitEngine">
+ <interface name="commit-one" role="server"
+
signature="org.objectweb.transaction.api.coordination.CoordinationFeature"/>
<interface name="commit" role="server"
signature="org.objectweb.transaction.api.coordination.CoordinationFeature"/>
<interface name="abort" role="server"
signature="org.objectweb.transaction.api.coordination.CoordinationFeature"/>
+ <interface name="timeout-attr" role="server"
+ signature="org.objectweb.gotm.lib.coordination.TimeoutAttribute"/>
<interface name="tx-state" role="client"
signature="org.objectweb.transaction.api.transaction.TransactionState"/>
+ <interface name="timeout-subscribe" role="client"
+ signature="org.objectweb.transaction.api.event.SubscribeFeature"/>
<interface name="prepare-decision" role="client"
signature="org.objectweb.transaction.api.event.PublishFeature"/>
<interface name="commit-decision" role="client"
@@ -28,6 +34,8 @@
<interface name="abort-end-log" role="client"
signature="org.objectweb.transaction.api.logging.LoggerFeature"/>
+ <component name="Timeout"
+ definition="org.objectweb.gotm.lib.coordination.TpTimeoutImpl"/>
<component name="Fc2PC"
definition="org.objectweb.gotm.lib.coordination.TpTwoPCFeature"/>
<component name="FcCommit"
@@ -35,8 +43,10 @@
<component name="FcAbort"
definition="org.objectweb.gotm.lib.coordination.TpAbortFeature"/>
- <binding client="this.commit" server="Fc2PC.coord-process"/>
- <binding client="this.abort" server="FcAbort.coord-process"/>
+ <binding client="this.commit-one" server="FcCommit.coord-process"/>
+ <binding client="this.commit" server="Fc2PC.coord-process"/>
+ <binding client="this.abort" server="FcAbort.coord-process"/>
+ <binding client="this.timeout-attr" server="Timeout.timeout-attr"/>
<binding client="Fc2PC.commit" server="FcCommit.coord-process"/>
<binding client="Fc2PC.tx-state" server="this.tx-state"/>
@@ -55,5 +65,8 @@
<binding client="FcAbort.begin-log" server="this.abort-log"/>
<binding client="FcAbort.end-log" server="this.abort-end-log"/>
+ <binding client="Timeout.subscribe" server="this.timeout-subscribe"/>
+ <binding client="Timeout.coord-process" server="FcAbort.coord-process"/>
+
<template-controller desc="compositeTemplate" />
</definition>
Index: gotm/src/fractal/org/objectweb/gotm/lib/event/TpEventBus.fractal
diff -u gotm/src/fractal/org/objectweb/gotm/lib/event/TpEventBus.fractal:1.2
gotm/src/fractal/org/objectweb/gotm/lib/event/TpEventBus.fractal:removed
--- gotm/src/fractal/org/objectweb/gotm/lib/event/TpEventBus.fractal:1.2
Mon Jul 11 10:27:05 2005
+++ gotm/src/fractal/org/objectweb/gotm/lib/event/TpEventBus.fractal Fri
Aug 5 17:06:30 2005
@@ -1,35 +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.event.TpEventBus">
- <interface name="subscribe" role="server"
- signature="org.objectweb.transaction.api.event.SubscribeFeature"/>
- <interface name="sync-publish" role="server"
- signature="org.objectweb.transaction.api.event.PublishFeature"/>
- <interface name="async-publish" role="server"
- signature="org.objectweb.transaction.api.event.PublishFeature"/>
-
- <component name="FcSubscribers"
- definition="org.objectweb.gotm.lib.event.TpSubscriberPool"/>
- <component name="FcSyncPublish"
- definition="org.objectweb.gotm.lib.event.TpPublishSimple"/>
- <component name="FcASyncPublish"
- definition="org.objectweb.gotm.lib.event.TpPublishASyncThread"/>
-
- <binding client="this.subscribe"
- server="FcSubscribers.subscribe"/>
-
- <binding client="this.sync-publish"
- server="FcSyncPublish.publish"/>
- <binding client="FcSyncPublish.subscriber-provider"
- server="FcSubscribers.subscriber-provider"/>
-
- <binding client="this.async-publish"
- server="FcASyncPublish.publish"/>
- <binding client="FcASyncPublish.subscriber-provider"
- server="FcSubscribers.subscriber-provider"/>
-
- <template-controller desc="compositeTemplate" />
-</definition>
Index:
gotm/src/fractal/org/objectweb/gotm/lib/event/TpEventBusAbstract.fractal
diff -u /dev/null
gotm/src/fractal/org/objectweb/gotm/lib/event/TpEventBusAbstract.fractal:1.1
--- /dev/null Fri Aug 5 17:06:30 2005
+++ gotm/src/fractal/org/objectweb/gotm/lib/event/TpEventBusAbstract.fractal
Fri Aug 5 17:06:28 2005
@@ -0,0 +1,21 @@
+<?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.event.TpEventBusAbstract">
+ <interface name="subscribe" role="server"
+ signature="org.objectweb.transaction.api.event.SubscribeFeature"/>
+ <interface name="sync-publish" role="server"
+ signature="org.objectweb.transaction.api.event.PublishFeature"/>
+ <interface name="async-publish" role="server"
+ signature="org.objectweb.transaction.api.event.PublishFeature"/>
+
+ <component name="FcSubscribers"
+ definition="org.objectweb.gotm.lib.event.TpSubscriberPool"/>
+
+ <binding client="this.subscribe"
+ server="FcSubscribers.subscribe"/>
+
+ <template-controller desc="compositeTemplate" />
+</definition>
Index: gotm/src/fractal/org/objectweb/gotm/lib/event/TpEventBusPool.fractal
diff -u /dev/null
gotm/src/fractal/org/objectweb/gotm/lib/event/TpEventBusPool.fractal:1.1
--- /dev/null Fri Aug 5 17:06:30 2005
+++ gotm/src/fractal/org/objectweb/gotm/lib/event/TpEventBusPool.fractal
Fri Aug 5 17:06:28 2005
@@ -0,0 +1,27 @@
+<?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.event.TpEventBusThread"
extends="org.objectweb.gotm.lib.event.TpEventBusAbstract">
+ <component name="FcSyncPublish"
+ definition="org.objectweb.gotm.lib.event.TpPublishSyncThread"/>
+ <component name="FcASyncPublish"
+ definition="org.objectweb.gotm.lib.event.TpPublishASyncPool"/>
+ <component name="FcThreadPool"
+ definition="org.objectweb.util.thread.comp.TpThreadManager(10,100)"/>
+
+ <binding client="this.sync-publish"
+ server="FcSyncPublish.publish"/>
+ <binding client="FcSyncPublish.subscriber-provider"
+ server="FcSubscribers.subscriber-provider"/>
+
+ <binding client="this.async-publish"
+ server="FcASyncPublish.publish"/>
+ <binding client="FcASyncPublish.subscriber-provider"
+ server="FcSubscribers.subscriber-provider"/>
+ <binding client="FcASyncPublish.runnable-manager"
+ server="FcThreadPool.runnable-manager"/>
+
+ <template-controller desc="compositeTemplate" />
+</definition>
\ No newline at end of file
Index: gotm/src/fractal/org/objectweb/gotm/lib/event/TpEventBusSimple.fractal
diff -u /dev/null
gotm/src/fractal/org/objectweb/gotm/lib/event/TpEventBusSimple.fractal:1.1
--- /dev/null Fri Aug 5 17:06:30 2005
+++ gotm/src/fractal/org/objectweb/gotm/lib/event/TpEventBusSimple.fractal
Fri Aug 5 17:06:28 2005
@@ -0,0 +1,18 @@
+<?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.event.TpEventBusSimple"
extends="org.objectweb.gotm.lib.event.TpEventBusAbstract">
+ <component name="FcSyncPublish"
+ definition="org.objectweb.gotm.lib.event.TpPublishSimple"/>
+
+ <binding client="this.async-publish"
+ server="FcSyncPublish.publish"/>
+ <binding client="this.sync-publish"
+ server="FcSyncPublish.publish"/>
+ <binding client="FcSyncPublish.subscriber-provider"
+ server="FcSubscribers.subscriber-provider"/>
+
+ <template-controller desc="compositeTemplate" />
+</definition>
Index: gotm/src/fractal/org/objectweb/gotm/lib/event/TpEventBusThread.fractal
diff -u /dev/null
gotm/src/fractal/org/objectweb/gotm/lib/event/TpEventBusThread.fractal:1.1
--- /dev/null Fri Aug 5 17:06:30 2005
+++ gotm/src/fractal/org/objectweb/gotm/lib/event/TpEventBusThread.fractal
Fri Aug 5 17:06:28 2005
@@ -0,0 +1,23 @@
+<?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.event.TpEventBusThread"
extends="org.objectweb.gotm.lib.event.TpEventBusAbstract">
+ <component name="FcSyncPublish"
+ definition="org.objectweb.gotm.lib.event.TpPublishSyncThread"/>
+ <component name="FcASyncPublish"
+ definition="org.objectweb.gotm.lib.event.TpPublishASyncThread"/>
+
+ <binding client="this.sync-publish"
+ server="FcSyncPublish.publish"/>
+ <binding client="FcSyncPublish.subscriber-provider"
+ server="FcSubscribers.subscriber-provider"/>
+
+ <binding client="this.async-publish"
+ server="FcASyncPublish.publish"/>
+ <binding client="FcASyncPublish.subscriber-provider"
+ server="FcSubscribers.subscriber-provider"/>
+
+ <template-controller desc="compositeTemplate" />
+</definition>
Index:
gotm/src/fractal/org/objectweb/gotm/lib/event/TpEventBusWithPool.fractal
diff -u
gotm/src/fractal/org/objectweb/gotm/lib/event/TpEventBusWithPool.fractal:1.1
gotm/src/fractal/org/objectweb/gotm/lib/event/TpEventBusWithPool.fractal:removed
---
gotm/src/fractal/org/objectweb/gotm/lib/event/TpEventBusWithPool.fractal:1.1
Mon May 23 13:20:54 2005
+++ gotm/src/fractal/org/objectweb/gotm/lib/event/TpEventBusWithPool.fractal
Fri Aug 5 17:06:30 2005
@@ -1,26 +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.TpCoordinatorImpl">
- <interface name="subscribe" role="server"
- signature="org.objectweb.transaction.api.event.SubscribeFeature"/>
- <interface name="publish" role="server"
- signature="org.objectweb.transaction.api.event.PublishFeature"/>
-
- <component name="FcTopics"
- definition="org.objectweb.gotm.lib.event.TpEventEngineThreadPool"/>
- <component name="FcThread"
- definition="org.objectweb.util.thread.comp.TpThreadManager(10,100)"/>
-
- <binding client="FcTopics.runnable-manager"
- server="FcThread.runnable-manager"/>
-
- <binding client="this.subscribe"
- server="FcTopics.subscribe"/>
- <binding client="this.publish"
- server="FcTopics.publish"/>
-
- <template-controller desc="compositeTemplate" />
-</definition>
Index:
gotm/src/fractal/org/objectweb/gotm/lib/event/TpEventBusWithThread.fractal
diff -u
gotm/src/fractal/org/objectweb/gotm/lib/event/TpEventBusWithThread.fractal:1.1
gotm/src/fractal/org/objectweb/gotm/lib/event/TpEventBusWithThread.fractal:removed
---
gotm/src/fractal/org/objectweb/gotm/lib/event/TpEventBusWithThread.fractal:1.1
Mon May 23 13:20:54 2005
+++
gotm/src/fractal/org/objectweb/gotm/lib/event/TpEventBusWithThread.fractal
Fri Aug 5 17:06:30 2005
@@ -1,21 +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.TpCoordinatorImpl">
- <interface name="subscribe" role="server"
- signature="org.objectweb.transaction.api.event.SubscribeFeature"/>
- <interface name="publish" role="server"
- signature="org.objectweb.transaction.api.event.PublishFeature"/>
-
- <component name="FcTopics"
- definition="org.objectweb.gotm.lib.event.TpEventEngineSimple"/>
-
- <binding client="this.subscribe"
- server="FcTopics.subscribe"/>
- <binding client="this.publish"
- server="FcTopics.publish"/>
-
- <template-controller desc="compositeTemplate" />
-</definition>
Index:
gotm/src/fractal/org/objectweb/gotm/lib/logging/TpLogManagerHOWL.fractal
diff -u /dev/null
gotm/src/fractal/org/objectweb/gotm/lib/logging/TpLogManagerHOWL.fractal:1.1
--- /dev/null Fri Aug 5 17:06:30 2005
+++ gotm/src/fractal/org/objectweb/gotm/lib/logging/TpLogManagerHOWL.fractal
Fri Aug 5 17:06:28 2005
@@ -0,0 +1,37 @@
+<?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.logging.TpLogManagerHOWL"
arguments="file,dir">
+ <interface name="force" role="server"
+ signature="org.objectweb.transaction.api.logging.LoggerFeature"/>
+ <interface name="no-force" role="server"
+ signature="org.objectweb.transaction.api.logging.LoggerFeature"/>
+ <interface name="empty" role="server"
+ signature="org.objectweb.transaction.api.logging.LoggerFeature"/>
+
+ <interface name="xid-provider" role="client"
+ signature="org.objectweb.gotm.lib.xid.XidFeature"/>
+
+ <component name="FcProvider"
+
definition="org.objectweb.gotm.lib.logging.TpHOWLoggerProvider(${file},${dir})"/>
+ <component name="FcForceLogger"
+ definition="org.objectweb.gotm.lib.logging.TpGenericLogger(true)"/>
+ <component name="FcNoForceLogger"
+ definition="org.objectweb.gotm.lib.logging.TpGenericLogger(false)"/>
+ <component name="FcEmptyLogger"
+ definition="org.objectweb.gotm.lib.logging.TpSimpleLogger"/>
+
+ <binding client="this.force"
server="FcForceLogger.log"/>
+ <binding client="FcForceLogger.logger-provider"
server="FcProvider.logger-provider"/>
+ <binding client="FcForceLogger.xid-provider"
server="this.xid-provider"/>
+
+ <binding client="this.no-force"
server="FcNoForceLogger.log"/>
+ <binding client="FcNoForceLogger.logger-provider"
server="FcProvider.logger-provider"/>
+ <binding client="FcNoForceLogger.xid-provider"
server="this.xid-provider"/>
+
+ <binding client="this.empty" server="FcEmptyLogger.log"/>
+
+ <template-controller desc="compositeTemplate" />
+</definition>
Index: gotm/src/fractal/org/objectweb/gotm/lib/logging/TpLoggingHOWL.fractal
diff -u
gotm/src/fractal/org/objectweb/gotm/lib/logging/TpLoggingHOWL.fractal:1.2
gotm/src/fractal/org/objectweb/gotm/lib/logging/TpLoggingHOWL.fractal:removed
--- gotm/src/fractal/org/objectweb/gotm/lib/logging/TpLoggingHOWL.fractal:1.2
Mon Jul 18 09:30:10 2005
+++ gotm/src/fractal/org/objectweb/gotm/lib/logging/TpLoggingHOWL.fractal
Fri Aug 5 17:06:30 2005
@@ -1,36 +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.logging.TpLoggingHOWL">
- <interface name="force" role="server"
- signature="org.objectweb.transaction.api.logging.LoggerFeature"/>
- <interface name="no-force" role="server"
- signature="org.objectweb.transaction.api.logging.LoggerFeature"/>
- <interface name="empty" role="server"
- signature="org.objectweb.transaction.api.logging.LoggerFeature"/>
- <interface name="xid-provider" role="client"
- signature="org.objectweb.gotm.lib.xid.XidFeature"/>
-
- <component name="FcProvider"
-
definition="org.objectweb.gotm.lib.logging.TpHOWLoggerProvider(log.txt,output)"/>
- <component name="FcForceLogger"
- definition="org.objectweb.gotm.lib.logging.TpGenericLogger(true)"/>
- <component name="FcNoForceLogger"
- definition="org.objectweb.gotm.lib.logging.TpGenericLogger(false)"/>
- <component name="FcEmptyLogger"
- definition="org.objectweb.gotm.lib.logging.TpSimpleLogger"/>
-
- <binding client="this.force"
server="FcForceLogger.log"/>
- <binding client="FcForceLogger.logger-provider"
server="FcProvider.logger-provider"/>
- <binding client="FcForceLogger.xid-provider"
server="this.xid-provider"/>
-
- <binding client="this.no-force"
server="FcNoForceLogger.log"/>
- <binding client="FcNoForceLogger.logger-provider"
server="FcProvider.logger-provider"/>
- <binding client="FcNoForceLogger.xid-provider"
server="this.xid-provider"/>
-
- <binding client="this.empty" server="FcEmptyLogger.log"/>
-
- <template-controller desc="compositeTemplate" />
-</definition>
Index: gotm/src/fractal/org/objectweb/gotm/lib/protocol/Tp2PC.fractal
diff -u /dev/null
gotm/src/fractal/org/objectweb/gotm/lib/protocol/Tp2PC.fractal:1.1
--- /dev/null Fri Aug 5 17:06:30 2005
+++ gotm/src/fractal/org/objectweb/gotm/lib/protocol/Tp2PC.fractal Fri
Aug 5 17:06:28 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/basic.dtd">
+
+<definition name="org.objectweb.gotm.lib.protocol.Tp2PC"
extends="org.objectweb.gotm.lib.protocol.Tp2PCAbstract">
+
+ <binding client="this.commit-decision" server="this.sync-publish"/>
+ <binding client="this.abort-decision" server="this.sync-publish"/>
+
+ <binding client="this.init-log" server="this.empty"/>
+ <binding client="this.vote-log" server="this.force"/>
+ <binding client="this.commit-log" server="this.force"/>
+ <binding client="this.commit-ack-log" server="this.force"/>
+ <binding client="this.commit-end-log" server="this.no-force"/>
+ <binding client="this.abort-log" server="this.force"/>
+ <binding client="this.abort-ack-log" server="this.force"/>
+ <binding client="this.abort-end-log" server="this.no-force"/>
+</definition>
Index: gotm/src/fractal/org/objectweb/gotm/lib/protocol/Tp2PCAbstract.fractal
diff -u /dev/null
gotm/src/fractal/org/objectweb/gotm/lib/protocol/Tp2PCAbstract.fractal:1.1
--- /dev/null Fri Aug 5 17:06:30 2005
+++ gotm/src/fractal/org/objectweb/gotm/lib/protocol/Tp2PCAbstract.fractal
Fri Aug 5 17:06:28 2005
@@ -0,0 +1,45 @@
+<?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.protocol.Tp2PCAbstract">
+ <interface name="prepare-decision" role="server"
+ signature="org.objectweb.transaction.api.event.PublishFeature"/>
+ <interface name="commit-decision" role="server"
+ signature="org.objectweb.transaction.api.event.PublishFeature"/>
+ <interface name="abort-decision" role="server"
+ signature="org.objectweb.transaction.api.event.PublishFeature"/>
+ <interface name="init-log" role="server"
+ signature="org.objectweb.transaction.api.logging.LoggerFeature"/>
+ <interface name="commit-log" role="server"
+ signature="org.objectweb.transaction.api.logging.LoggerFeature"/>
+ <interface name="abort-log" role="server"
+ signature="org.objectweb.transaction.api.logging.LoggerFeature"/>
+ <interface name="commit-end-log" role="server"
+ signature="org.objectweb.transaction.api.logging.LoggerFeature"/>
+ <interface name="abort-end-log" role="server"
+ signature="org.objectweb.transaction.api.logging.LoggerFeature"/>
+ <interface name="vote-log" role="server"
+ signature="org.objectweb.transaction.api.logging.LoggerFeature"/>
+ <interface name="commit-ack-log" role="server"
+ signature="org.objectweb.transaction.api.logging.LoggerFeature"/>
+ <interface name="abort-ack-log" role="server"
+ signature="org.objectweb.transaction.api.logging.LoggerFeature"/>
+
+ <interface name="sync-publish" role="client"
+ signature="org.objectweb.transaction.api.event.PublishFeature"/>
+ <interface name="async-publish" role="client"
+ signature="org.objectweb.transaction.api.event.PublishFeature"/>
+ <interface name="force" role="client"
+ signature="org.objectweb.transaction.api.logging.LoggerFeature"/>
+ <interface name="no-force" role="client"
+ signature="org.objectweb.transaction.api.logging.LoggerFeature"/>
+ <interface name="empty" role="client"
+ signature="org.objectweb.transaction.api.logging.LoggerFeature"/>
+
+
+ <binding client="this.prepare-decision" server="this.sync-publish"/>
+
+ <template-controller desc="compositeTemplate" />
+</definition>
\ No newline at end of file
Index: gotm/src/fractal/org/objectweb/gotm/lib/protocol/Tp2PCNoLog.fractal
diff -u /dev/null
gotm/src/fractal/org/objectweb/gotm/lib/protocol/Tp2PCNoLog.fractal:1.1
--- /dev/null Fri Aug 5 17:06:30 2005
+++ gotm/src/fractal/org/objectweb/gotm/lib/protocol/Tp2PCNoLog.fractal Fri
Aug 5 17:06:28 2005
@@ -0,0 +1,18 @@
+<?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.protocol.Tp2PCNoLog"
extends="org.objectweb.gotm.lib.protocol.Tp2PCAbstract">
+ <binding client="this.commit-decision" server="this.sync-publish"/>
+ <binding client="this.abort-decision" server="this.sync-publish"/>
+
+ <binding client="this.init-log" server="this.empty"/>
+ <binding client="this.commit-log" server="this.empty"/>
+ <binding client="this.abort-log" server="this.empty"/>
+ <binding client="this.commit-end-log" server="this.empty"/>
+ <binding client="this.abort-end-log" server="this.empty"/>
+ <binding client="this.vote-log" server="this.empty"/>
+ <binding client="this.commit-ack-log" server="this.empty"/>
+ <binding client="this.abort-ack-log" server="this.empty"/>
+</definition>
Index: gotm/src/fractal/org/objectweb/gotm/lib/protocol/Tp2PCPA.fractal
diff -u /dev/null
gotm/src/fractal/org/objectweb/gotm/lib/protocol/Tp2PCPA.fractal:1.1
--- /dev/null Fri Aug 5 17:06:30 2005
+++ gotm/src/fractal/org/objectweb/gotm/lib/protocol/Tp2PCPA.fractal Fri
Aug 5 17:06:28 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/basic.dtd">
+
+<definition name="org.objectweb.gotm.lib.protocol.Tp2PCPA"
extends="org.objectweb.gotm.lib.protocol.Tp2PCAbstract">
+
+ <binding client="this.commit-decision" server="this.sync-publish"/>
+ <binding client="this.abort-decision" server="this.async-publish"/>
+
+ <binding client="this.init-log" server="this.empty"/>
+ <binding client="this.vote-log" server="this.force"/>
+ <binding client="this.commit-log" server="this.force"/>
+ <binding client="this.commit-ack-log" server="this.force"/>
+ <binding client="this.commit-end-log" server="this.no-force"/>
+ <binding client="this.abort-log" server="this.empty"/>
+ <binding client="this.abort-ack-log" server="this.no-force"/>
+ <binding client="this.abort-end-log" server="this.empty"/>
+</definition>
Index: gotm/src/fractal/org/objectweb/gotm/lib/protocol/Tp2PCPC.fractal
diff -u /dev/null
gotm/src/fractal/org/objectweb/gotm/lib/protocol/Tp2PCPC.fractal:1.1
--- /dev/null Fri Aug 5 17:06:30 2005
+++ gotm/src/fractal/org/objectweb/gotm/lib/protocol/Tp2PCPC.fractal Fri
Aug 5 17:06:28 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/basic.dtd">
+
+<definition name="org.objectweb.gotm.lib.protocol.Tp2PCPC"
extends="org.objectweb.gotm.lib.protocol.Tp2PCAbstract">
+
+ <binding client="this.commit-decision" server="this.async-publish"/>
+ <binding client="this.abort-decision" server="this.sync-publish"/>
+
+ <binding client="this.init-log" server="this.force"/>
+ <binding client="this.vote-log" server="this.force"/>
+ <binding client="this.commit-log" server="this.force"/>
+ <binding client="this.commit-ack-log" server="this.no-force"/>
+ <binding client="this.commit-end-log" server="this.empty"/>
+ <binding client="this.abort-log" server="this.empty"/>
+ <binding client="this.abort-ack-log" server="this.force"/>
+ <binding client="this.abort-end-log" server="this.no-force"/>
+</definition>
Index: gotm/src/java/org/objectweb/gotm/Gotm.java
diff -u gotm/src/java/org/objectweb/gotm/Gotm.java:1.5
gotm/src/java/org/objectweb/gotm/Gotm.java:1.6
--- gotm/src/java/org/objectweb/gotm/Gotm.java:1.5 Mon Jul 18 09:30:11
2005
+++ gotm/src/java/org/objectweb/gotm/Gotm.java Fri Aug 5 17:06:29 2005
@@ -23,47 +23,50 @@
Contributor(s): .
---------------------------------------------------------------------
- $Id: Gotm.java,v 1.5 2005/07/18 07:30:11 rouvoy Exp $
+ $Id: Gotm.java,v 1.6 2005/08/05 15:06:29 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm;
import java.util.Map;
+import java.util.logging.Logger;
import org.objectweb.fractal.adl.Factory;
import org.objectweb.fractal.adl.FactoryFactory;
import org.objectweb.fractal.api.Component;
import org.objectweb.fractal.api.Interface;
import org.objectweb.fractal.api.NoSuchInterfaceException;
+import org.objectweb.fractal.api.control.IllegalLifeCycleException;
import org.objectweb.fractal.util.Fractal;
/**
* Constructor class
*
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
- * @version $Revision: 1.5 $
+ * @version $Revision: 1.6 $
*/
public class Gotm {
- /** <code>cache</code> . */
- protected static Component cache ;
-
/**
* @param desc
* @param context
* @return instance of component created.
*/
- public static Component create(String desc, Map context) {
- if (cache != null) return cache;
+ public static final Component create(String desc, Map context) {
+ Component component ;
try {
Factory f =
FactoryFactory.getFactory(FactoryFactory.FRACTAL_BACKEND);
- cache = (Component) f.newComponent(desc, context);
- Fractal.getLifeCycleController(cache).startFc();
- return cache;
+ component = (Component) f.newComponent(desc, context);
} catch (Exception e) {
- System.err.println(e);
+ Logger.getLogger("GoTM-Factory").severe("Failure when creating
component");
throw new GoTMException(e);
}
+ try {
+ Fractal.getLifeCycleController(component).startFc();
+ } catch (Exception e) {
+ Logger.getLogger("GoTM-Factory").fine("No LifeCycle controller
available");
+ }
+ return component;
}
/**
@@ -72,13 +75,37 @@
* @param itf
* @return interface named itf of the created component.
*/
- public static Interface create(String desc, Map context, String itf) {
+ public static final Interface create(String desc, Map context, String
itf) {
Component c = create(desc,context);
try {
return (Interface) c.getFcInterface(itf);
} catch (NoSuchInterfaceException e) {
+ Logger.getLogger("GoTM-Factory").severe("Failure when when
retrieving "+itf+" interface");
+ throw new GoTMException(e);
+ }
+ }
+
+ /**
+ * @param i
+ * the service to stop.
+ */
+ public static final void stop(Interface i) {
+ stop(i.getFcItfOwner());
+ }
+
+ /**
+ * @param c
+ * the component to stop.
+ */
+ public static final void stop(Component c) {
+ try {
+ Fractal.getLifeCycleController(c).stopFc();
+ } catch (IllegalLifeCycleException e) {
+ System.err.println(e);
+ throw new GoTMException(e);
+ } catch (NoSuchInterfaceException e) {
System.err.println(e);
throw new GoTMException(e);
}
}
-}
+}
\ No newline at end of file
Index: gotm/src/java/org/objectweb/gotm/lib/CurrentHandler.java
diff -u gotm/src/java/org/objectweb/gotm/lib/CurrentHandler.java:1.5
gotm/src/java/org/objectweb/gotm/lib/CurrentHandler.java:removed
--- gotm/src/java/org/objectweb/gotm/lib/CurrentHandler.java:1.5 Mon
Jul 18 09:30:11 2005
+++ gotm/src/java/org/objectweb/gotm/lib/CurrentHandler.java Fri Aug 5
17:06:30 2005
@@ -1,216 +0,0 @@
-/*====================================================================
-
- 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: CurrentHandler.java,v 1.5 2005/07/18 07:30:11 rouvoy Exp $
- ====================================================================*/
-package org.objectweb.gotm.lib;
-
-import java.util.Stack;
-
-import org.objectweb.fractal.api.Component;
-import org.objectweb.fractal.api.NoSuchInterfaceException;
-import org.objectweb.fractal.api.control.IllegalCacheException;
-import org.objectweb.fractal.api.control.IllegalLifeCycleException;
-import org.objectweb.fractal.api.control.LifeCycleController;
-import org.objectweb.fractal.api.factory.Factory;
-import org.objectweb.fractal.api.factory.InstantiationException;
-import org.objectweb.fractal.lib.BindablePrimitive;
-import org.objectweb.fractal.pool.util.FcCache;
-import org.objectweb.fractal.util.Fractal;
-
-/**
- * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
- * @created 1 févr. 2005
- * @modified $Date: 2005/07/18 07:30:11 $
- * @version $Revision: 1.5 $
- * @fractal.itf name="factory" role="client"
- * signature="org.objectweb.fractal.api.Component"
- */
-public class CurrentHandler
- extends BindablePrimitive
- implements CurrentManager, LifeCycleController {
- /** Fractal ADL Identifier for the <code>FACTORY</code> interface. */
- public static final String FACTORY = "factory";
-
- /** <code>current</code> . */
- private Component current = null;
-
- private Stack stack = new Stack();
-
- /*
- * (non-Javadoc)
- *
- * @see org.objectweb.fractal.lib.BindablePrimitive#clientFc()
- */
- protected String[] clientFc() {
- return new String[] { FACTORY };
- }
-
- /**
- * @return the transaction factory.
- */
- private Factory getFactory() {
- Component cpt = (Component) fcBindings.get(FACTORY);
- try {
- return (Factory) cpt.getFcInterface("factory");
- } catch (NoSuchInterfaceException e) {
- if (getLogger().isLoggable(ERROR))
- getLogger().log(ERROR, e.getMessage());
- return null;
- }
- }
-
- /**
- * @param c
- */
- private void backToStack(Component c) {
- try {
- FcCache.getCacheController(c).clearFc();
- } catch (IllegalCacheException e) {
- if (getLogger().isLoggable(ERROR))
- getLogger().log(ERROR, e);
- } catch (NoSuchInterfaceException e) {
- if (getLogger().isLoggable(ERROR))
- getLogger().log(ERROR, e);
- }
- if (getLogger().isLoggable(DEBUG))
- getLogger().log(DEBUG,"Storing the component instance into the
stack.");
- this.stack.push(c);
- }
-
- /**
- * @return a component coming from the stack.
- */
- private Component loadFromStack() {
- Component loaded = null;
- if (this.stack.isEmpty()) {
- if (getLogger().isLoggable(DEBUG))
- getLogger().log(DEBUG, "Creating a new instance of cached
component.");
- try {
- loaded = getFactory().newFcInstance();
- Fractal.getLifeCycleController(loaded).startFc();
- } catch (InstantiationException e) {
- if (getLogger().isLoggable(ERROR))
- getLogger().log(ERROR, e);
- } catch (IllegalLifeCycleException e) {
- if (getLogger().isLoggable(ERROR))
- getLogger().log(ERROR, e);
- } catch (NoSuchInterfaceException e) {
- if (getLogger().isLoggable(ERROR))
- getLogger().log(ERROR, e);
- }
- } else {
- if (getLogger().isLoggable(DEBUG))
- getLogger().log(DEBUG, "Loading an existing instance of
cached component.");
- loaded = (Component) this.stack.pop();
- try {
- FcCache.getCacheController(loaded).initFc();
- } catch (IllegalCacheException e) {
- if (getLogger().isLoggable(ERROR))
- getLogger().log(ERROR, e);
- } catch (NoSuchInterfaceException e) {
- if (getLogger().isLoggable(ERROR))
- getLogger().log(ERROR, e);
- }
- }
- return loaded;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
org.objectweb.fractal.api.control.LifeCycleController#getFcState()
- */
- public String getFcState() { return null; }
-
- /*
- * (non-Javadoc)
- *
- * @see org.objectweb.fractal.api.control.LifeCycleController#startFc()
- */
- public void startFc() {
- backToStack(loadFromStack());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.objectweb.fractal.api.control.LifeCycleController#stopFc()
- */
- public void stopFc() {
- try {
- Fractal.getLifeCycleController(this.current).stopFc();
- } catch (IllegalLifeCycleException e) {
- if (getLogger().isLoggable(ERROR))
- getLogger().log(ERROR, e.getMessage());
- } catch (NoSuchInterfaceException e) {
- if (getLogger().isLoggable(ERROR))
- getLogger().log(ERROR, e.getMessage());
- }
- this.stack.clear();
- }
-
- /* (non-Javadoc)
- * @see org.objectweb.gotm.lib.CurrentManager#loadCurrent()
- */
- public void loadCurrent() {
- this.current = loadFromStack();
- }
-
- /* (non-Javadoc)
- * @see org.objectweb.gotm.lib.CurrentManager#checkCurrent()
- */
- public boolean checkCurrent() {
- return this.current != null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.objectweb.gotm.lib.CurrentManager#getCurrentFc()
- */
- public Component getCurrentFc() {
- return this.current;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
org.objectweb.gotm.lib.CurrentManager#setCurrentFc(org.objectweb.fractal.api.Component)
- */
- public void setCurrentFc(Component c) {
- this.current = c;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.objectweb.gotm.lib.CurrentManager#clearCurrentFc()
- */
- public void clearCurrentFc() {
- backToStack(this.current);
- this.current = null;
- }
-}
\ No newline at end of file
Index: gotm/src/java/org/objectweb/gotm/lib/CurrentManager.java
diff -u gotm/src/java/org/objectweb/gotm/lib/CurrentManager.java:1.2
gotm/src/java/org/objectweb/gotm/lib/CurrentManager.java:1.3
--- gotm/src/java/org/objectweb/gotm/lib/CurrentManager.java:1.2 Mon
Jul 18 09:30:11 2005
+++ gotm/src/java/org/objectweb/gotm/lib/CurrentManager.java Fri Aug 5
17:06:29 2005
@@ -23,7 +23,7 @@
Contributor(s): .
---------------------------------------------------------------------
- $Id: CurrentManager.java,v 1.2 2005/07/18 07:30:11 rouvoy Exp $
+ $Id: CurrentManager.java,v 1.3 2005/08/05 15:06:29 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm.lib;
@@ -32,36 +32,39 @@
/**
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
* @created 1 févr. 2005
- * @modified $Date: 2005/07/18 07:30:11 $
- * @version $Revision: 1.2 $
- * @fractal.itf name="current"
+ * @modified $Date: 2005/08/05 15:06:29 $
+ * @version $Revision: 1.3 $
+ * @fractal.itf name="current-manager"
*/
public interface CurrentManager {
+ /** Fractal ADL Identifier for the <code>CurrentManager</code>
interface. */
+ static final String CURRENT_MANAGER = "current-manager";
+
/**
* Loads a current object.
*/
- public void loadCurrent();
+ void loadCurrent();
/**
* Checks if a current is allocated.
* @return true if a current is available.
*/
- public boolean checkCurrent();
+ boolean checkCurrent();
/**
* Provides the instance of the current component handled.
* @return the current component (null if no current).
*/
- public Component getCurrentFc();
+ Component getCurrentFc();
/**
* Defines the current instance of the current component.
* @param current the instance to set.
*/
- public void setCurrentFc(Component current);
+ void setCurrentFc(Component current);
/**
* Clear the instance of the current component.
*/
- public void clearCurrentFc();
+ void clearCurrentFc();
}
\ No newline at end of file
Index: gotm/src/java/org/objectweb/gotm/lib/CurrentManagerAbstract.java
diff -u /dev/null
gotm/src/java/org/objectweb/gotm/lib/CurrentManagerAbstract.java:1.1
--- /dev/null Fri Aug 5 17:06:30 2005
+++ gotm/src/java/org/objectweb/gotm/lib/CurrentManagerAbstract.java Fri
Aug 5 17:06:29 2005
@@ -0,0 +1,185 @@
+/*====================================================================
+
+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: CurrentManagerAbstract.java,v 1.1 2005/08/05 15:06:29 rouvoy Exp $
+====================================================================*/
+package org.objectweb.gotm.lib;
+
+import java.util.Stack;
+
+import org.objectweb.fractal.api.Component;
+import org.objectweb.fractal.api.NoSuchInterfaceException;
+import org.objectweb.fractal.api.control.IllegalCacheException;
+import org.objectweb.fractal.api.control.IllegalLifeCycleException;
+import org.objectweb.fractal.api.control.LifeCycleController;
+import org.objectweb.fractal.lib.BindablePrimitive;
+import org.objectweb.fractal.pool.util.FcCache;
+import org.objectweb.fractal.util.Fractal;
+
+/**
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @created 4 août 2005
+ * @modified $Date: 2005/08/05 15:06:29 $
+ * @version $Revision: 1.1 $
+ * @fractal.itf
+ */
+public abstract class CurrentManagerAbstract
+ extends BindablePrimitive
+ implements CurrentManager, LifeCycleController {
+
+ /** <code>current</code> . */
+ private Component current = null;
+
+ /**
+ * @return the stack to store recyclable transactions.
+ */
+ protected abstract Stack stack() ;
+
+ /**
+ * @return the transaction factory.
+ */
+ protected abstract Component create() ;
+
+ /**
+ * @param c
+ */
+ private void backToStack(Component c) {
+ try {
+ FcCache.getCacheController(c).clearFc();
+ } catch (IllegalCacheException e) {
+ if (getLogger().isLoggable(ERROR))
+ getLogger().log(ERROR, e);
+ } catch (NoSuchInterfaceException e) {
+ if (getLogger().isLoggable(ERROR))
+ getLogger().log(ERROR, e);
+ }
+ if (getLogger().isLoggable(DEBUG))
+ getLogger().log(DEBUG,"Storing the component instance into the
stack.");
+ stack().push(c);
+ }
+
+ /**
+ * @return a component coming from the stack.
+ */
+ private Component loadFromStack() {
+ Component loaded = null;
+ if (stack().isEmpty()) {
+ if (getLogger().isLoggable(DEBUG))
+ getLogger().log(DEBUG, "Creating a new instance of cached
component.");
+ loaded = create();
+ } else {
+ if (getLogger().isLoggable(DEBUG))
+ getLogger().log(DEBUG, "Loading an existing instance of
cached component.");
+ loaded = (Component) stack().pop();
+ try {
+ FcCache.getCacheController(loaded).initFc();
+ } catch (IllegalCacheException e) {
+ if (getLogger().isLoggable(ERROR))
+ getLogger().log(ERROR, e);
+ } catch (NoSuchInterfaceException e) {
+ if (getLogger().isLoggable(ERROR))
+ getLogger().log(ERROR, e);
+ }
+ }
+ return loaded;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
org.objectweb.fractal.api.control.LifeCycleController#getFcState()
+ */
+ public String getFcState() { return null; }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.objectweb.fractal.api.control.LifeCycleController#startFc()
+ */
+ public void startFc() {
+ backToStack(loadFromStack());
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.objectweb.fractal.api.control.LifeCycleController#stopFc()
+ */
+ public void stopFc() {
+ try {
+ if (this.current != null)
+ Fractal.getLifeCycleController(this.current).stopFc();
+ } catch (IllegalLifeCycleException e) {
+ if (getLogger().isLoggable(ERROR))
+ getLogger().log(ERROR, e.getMessage());
+ } catch (NoSuchInterfaceException e) {
+ if (getLogger().isLoggable(ERROR))
+ getLogger().log(ERROR, e.getMessage());
+ }
+ stack().clear();
+ }
+
+ /* (non-Javadoc)
+ * @see org.objectweb.gotm.lib.CurrentManager#loadCurrent()
+ */
+ public void loadCurrent() {
+ this.current = loadFromStack();
+ }
+
+ /* (non-Javadoc)
+ * @see org.objectweb.gotm.lib.CurrentManager#checkCurrent()
+ */
+ public boolean checkCurrent() {
+ return this.current != null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.objectweb.gotm.lib.CurrentManager#getCurrentFc()
+ */
+ public Component getCurrentFc() {
+ return this.current;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
org.objectweb.gotm.lib.CurrentManager#setCurrentFc(org.objectweb.fractal.api.Component)
+ */
+ public void setCurrentFc(Component c) {
+ this.current = c;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.objectweb.gotm.lib.CurrentManager#clearCurrentFc()
+ */
+ public void clearCurrentFc() {
+ backToStack(this.current);
+ this.current = null;
+ }
+}
\ No newline at end of file
Index: gotm/src/java/org/objectweb/gotm/lib/StaticCurrentManager.java
diff -u /dev/null
gotm/src/java/org/objectweb/gotm/lib/StaticCurrentManager.java:1.1
--- /dev/null Fri Aug 5 17:06:30 2005
+++ gotm/src/java/org/objectweb/gotm/lib/StaticCurrentManager.java Fri
Aug 5 17:06:29 2005
@@ -0,0 +1,99 @@
+/*====================================================================
+
+ 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: StaticCurrentManager.java,v 1.1 2005/08/05 15:06:29 rouvoy Exp $
+ ====================================================================*/
+package org.objectweb.gotm.lib;
+
+import java.util.Stack;
+
+import org.objectweb.fractal.api.Component;
+import org.objectweb.fractal.api.NoSuchInterfaceException;
+import org.objectweb.fractal.api.control.IllegalLifeCycleException;
+import org.objectweb.fractal.api.factory.Factory;
+import org.objectweb.fractal.api.factory.InstantiationException;
+import org.objectweb.fractal.util.Fractal;
+
+/**
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @created 1 févr. 2005
+ * @modified $Date: 2005/08/05 15:06:29 $
+ * @version $Revision: 1.1 $
+ * @fractal.itf name="factory" role="client"
+ * signature="org.objectweb.fractal.api.Component"
+ */
+public class StaticCurrentManager
+ extends CurrentManagerAbstract {
+ /** Fractal ADL Identifier for the <code>FACTORY</code> interface. */
+ public static final String FACTORY = "factory";
+
+ private Stack stack = new Stack();
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.objectweb.fractal.lib.BindablePrimitive#clientFc()
+ */
+ protected String[] clientFc() {
+ return new String[] { FACTORY };
+ }
+
+ /**
+ * @return the transaction factory.
+ */
+ protected Component create() {
+ Factory factory = null;
+ try {
+ Component cpt = (Component) fcBindings.get(FACTORY);
+ factory = (Factory) cpt.getFcInterface("factory");
+ } catch (NoSuchInterfaceException e) {
+ if (getLogger().isLoggable(ERROR))
+ getLogger().log(ERROR, e.getMessage());
+ return null;
+ }
+ Component component = null;
+ try {
+ component = factory.newFcInstance();
+ Fractal.getLifeCycleController(component).startFc();
+ } catch (InstantiationException e) {
+ if (getLogger().isLoggable(ERROR))
+ getLogger().log(ERROR, e);
+ } catch (IllegalLifeCycleException e) {
+ if (getLogger().isLoggable(ERROR))
+ getLogger().log(ERROR, e);
+ } catch (NoSuchInterfaceException e) {
+ if (getLogger().isLoggable(ERROR))
+ getLogger().log(ERROR, e);
+ }
+ return component;
+ }
+
+ /**
+ * @return the stack used to store components.
+ */
+ protected Stack stack() {
+ return this.stack;
+ }
+}
\ No newline at end of file
Index:
gotm/src/java/org/objectweb/gotm/lib/context/CommitProtocolAwareness.java
diff -u /dev/null
gotm/src/java/org/objectweb/gotm/lib/context/CommitProtocolAwareness.java:1.1
--- /dev/null Fri Aug 5 17:06:30 2005
+++ gotm/src/java/org/objectweb/gotm/lib/context/CommitProtocolAwareness.java
Fri Aug 5 17:06:29 2005
@@ -0,0 +1,114 @@
+/*====================================================================
+
+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: CommitProtocolAwareness.java,v 1.1 2005/08/05 15:06:29 rouvoy Exp $
+====================================================================*/
+package org.objectweb.gotm.lib.context;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import org.objectweb.transaction.api.event.Event;
+import org.objectweb.transaction.lib.transaction.TransactionStatusCommitted;
+import org.objectweb.transaction.lib.transaction.TransactionStatusRolledBack;
+
+/**
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @created 3 août 2005
+ * @modified $Date: 2005/08/05 15:06:29 $
+ * @version $Revision: 1.1 $
+ * @fractal.itf
+ */
+public class CommitProtocolAwareness
+ extends ContextAwarenessImpl {
+ /** <code>WINDOW</code> size of the window of visibility. */
+ public static final int WINDOW = 40;
+ /** <code>WARM</code> warm up. */
+ public static final int WARM = 40 ;
+
+ private final Map conf2pc = new HashMap();
+ private final Map conf2pcpc = new HashMap();
+ private final Map conf2pcpa = new HashMap();
+ private Map current = conf2pc;
+ /**
+ *
+ */
+ public CommitProtocolAwareness() {
+ conf2pc.put("communication",
"org.objectweb.gotm.lib.event.TpEventBusThread");
+ conf2pc.put("protocol","org.objectweb.gotm.lib.protocol.Tp2PC");
+ conf2pcpc.put("communication",
"org.objectweb.gotm.lib.event.TpEventBusThread");
+ conf2pcpc.put("protocol","org.objectweb.gotm.lib.protocol.Tp2PCPC");
+ conf2pcpa.put("communication",
"org.objectweb.gotm.lib.event.TpEventBusThread");
+ conf2pcpa.put("protocol","org.objectweb.gotm.lib.protocol.Tp2PCPA");
+ }
+
+ /* (non-Javadoc)
+ * @see org.objectweb.gotm.lib.event.SubscribablePrimitive#getEvents()
+ */
+ public Event[] getEvents() {
+ return new Event[] {
+ TransactionStatusCommitted.status,
+ TransactionStatusRolledBack.status
+ };
+ }
+
+ private int count(List l, Event e) {
+ int count = 0;
+ int stop=0;
+ for (Iterator i = l.iterator() ; i.hasNext() ;) {
+ if (i.next()==e) count++;
+ if (++stop>=WINDOW) break;
+ }
+ return count;
+ }
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.gotm.lib.context.ContextAwarenessImpl#getConfiguration(java.util.LinkedList)
+ */
+ protected Map getConfiguration(LinkedList topics) {
+ if (topics.size()<WARM) {
+ System.out.println("[T="+topics.size()+"]==> No adaptatation
during warm up!");
+ return null;
+ }
+ int commit = count(topics,TransactionStatusCommitted.status);
+ int abort = count(topics,TransactionStatusRolledBack.status);
+ int dec = (100*commit)/(commit+abort);
+ if (dec <= 62 && current!=conf2pcpa) {
+ System.out.println("[T="+topics.size()+"]==> Switching to the
2PCPA commit protocol ("+dec+"<=62)("+(commit)+"|"+(commit+abort)+")...");
+ this.current = conf2pcpa;
+ return conf2pcpa;
+ }
+ if (dec >= 47 && current!=conf2pcpc) {
+ System.out.println("[T="+topics.size()+"]==> Switching to the
2PCPC commit protocol ("+dec+">=47)("+(commit)+"|"+(commit+abort)+")...");
+ this.current = conf2pcpc;
+ return conf2pcpc;
+ }
+ System.out.println("[T="+topics.size()+"]==> No adaptation is
required ("+dec+")("+(commit)+"|"+(commit+abort)+")");
+ return null;
+ }
+}
Index: gotm/src/java/org/objectweb/gotm/lib/context/Configurable.java
diff -u /dev/null
gotm/src/java/org/objectweb/gotm/lib/context/Configurable.java:1.1
--- /dev/null Fri Aug 5 17:06:30 2005
+++ gotm/src/java/org/objectweb/gotm/lib/context/Configurable.java Fri
Aug 5 17:06:29 2005
@@ -0,0 +1,52 @@
+/*====================================================================
+
+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: Configurable.java,v 1.1 2005/08/05 15:06:29 rouvoy Exp $
+====================================================================*/
+package org.objectweb.gotm.lib.context;
+
+import java.util.Map;
+
+import org.objectweb.transaction.api.Feature;
+
+/**
+ * Interface to apply dynamic reconfigurable.
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @created 3 août 2005
+ * @modified $Date: 2005/08/05 15:06:29 $
+ * @version $Revision: 1.1 $
+ * @fractal.itf name="configurable"
+ */
+public interface Configurable
+ extends Feature {
+ /** Fractal ADL Identifier for the <code>Configurable</code> interface.
*/
+ static final String CONFIGURABLE ="configurable";
+
+ /**
+ * Apply a new configuration
+ * @param configuration the new configuration.
+ */
+ void reconfigure(Map configuration);
+}
Index:
gotm/src/java/org/objectweb/gotm/lib/context/ConfigurableCurrentManager.java
diff -u /dev/null
gotm/src/java/org/objectweb/gotm/lib/context/ConfigurableCurrentManager.java:1.1
--- /dev/null Fri Aug 5 17:06:30 2005
+++
gotm/src/java/org/objectweb/gotm/lib/context/ConfigurableCurrentManager.java
Fri Aug 5 17:06:29 2005
@@ -0,0 +1,162 @@
+/*====================================================================
+
+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: ConfigurableCurrentManager.java,v 1.1 2005/08/05 15:06:29 rouvoy Exp $
+====================================================================*/
+package org.objectweb.gotm.lib.context;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Stack;
+
+import org.objectweb.fractal.api.Component;
+import org.objectweb.fractal.api.NoSuchInterfaceException;
+import org.objectweb.fractal.api.control.IllegalLifeCycleException;
+import org.objectweb.fractal.api.factory.Factory;
+import org.objectweb.fractal.api.factory.InstantiationException;
+import org.objectweb.fractal.util.Fractal;
+import org.objectweb.gotm.Gotm;
+import org.objectweb.gotm.lib.CurrentManagerAbstract;
+import org.objectweb.transaction.api.event.SubscribeFeature;
+
+/**
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @created 3 août 2005
+ * @modified $Date: 2005/08/05 15:06:29 $
+ * @version $Revision: 1.1 $
+ * @fractal.itf name="context-awareness" role="client"
signature="org.objectweb.gotm.lib.context.ContextAwareness"
+ */
+public class ConfigurableCurrentManager
+extends CurrentManagerAbstract
+ implements Configurable {
+
+ /** <code>TX_DESC</code> . */
+ public static final String TX_DESC =
"org.objectweb.gotm.lib.JtsTransaction";
+ protected Map stacks = new HashMap();
+ protected Map tx_factories = new HashMap();
+ protected Map pending = new HashMap();
+ protected Map configuration ;
+
+ /**
+ * Constructor.
+ */
+ public ConfigurableCurrentManager() {
+ this.pending.put("communication",
"org.objectweb.gotm.lib.event.TpEventBusThread");
+ this.pending.put("protocol","org.objectweb.gotm.lib.protocol.Tp2PC");
+ this.configuration = this.pending;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.objectweb.fractal.lib.BindablePrimitive#clientFc()
+ */
+ protected String[] clientFc() {
+ return new String[] { ContextAwareness.CONTEXT_AWARENESS };
+ }
+
+ protected final ContextAwareness getContext() {
+ return (ContextAwareness)
fcBindings.get(ContextAwareness.CONTEXT_AWARENESS);
+ }
+
+ /**
+ * @return the transaction factory.
+ */
+ protected Component create() {
+ Factory factory = (Factory)
this.tx_factories.get(this.configuration);
+ if (factory == null) {
+ System.out.println("[Current] Creating factory for configuration
"+this.configuration);
+ factory = (Factory) Gotm.create(TX_DESC, this.configuration,
"factory");
+ this.tx_factories.put(this.configuration, factory);
+ }
+ Component component = null;
+ try {
+ System.out.println("[Current] Creating a new transaction
instance...");
+ component = factory.newFcInstance();
+ Fractal.getLifeCycleController(component).startFc();
+ } catch (InstantiationException e) {
+ if (getLogger().isLoggable(ERROR))
+ getLogger().log(ERROR, e);
+ } catch (IllegalLifeCycleException e) {
+ if (getLogger().isLoggable(ERROR))
+ getLogger().log(ERROR, e);
+ } catch (NoSuchInterfaceException e) {
+ if (getLogger().isLoggable(ERROR))
+ getLogger().log(ERROR, e);
+ }
+ return component;
+ }
+
+ /* (non-Javadoc)
+ * @see org.objectweb.gotm.lib.CurrentManagerAbstract#loadFromStack()
+ */
+ public void loadCurrent() {
+ this.configuration = this.pending;
+ super.loadCurrent();
+ try {
+ SubscribeFeature sub = (SubscribeFeature)
getCurrentFc().getFcInterface(SubscribeFeature.SUBSCRIBE_FEATURE);
+ sub.subscribe(getContext().getEvents(),
getContext().getPublish());
+ } catch (NoSuchInterfaceException e) {
+ if (getLogger().isLoggable(ERROR))
+ getLogger().log(ERROR, e);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.gotm.lib.CurrentManagerAbstract#backToStack(org.objectweb.fractal.api.Component)
+ */
+ public void clearCurrentFc() {
+ try {
+ SubscribeFeature sub = (SubscribeFeature)
getCurrentFc().getFcInterface(SubscribeFeature.SUBSCRIBE_FEATURE);
+ sub.unsubscribe(getContext().getEvents(),
getContext().getPublish());
+ } catch (NoSuchInterfaceException e) {
+ if (getLogger().isLoggable(ERROR))
+ getLogger().log(ERROR, e);
+ }
+ super.clearCurrentFc();
+ }
+
+ /**
+ * @return the stack used to store components.
+ */
+ protected Stack stack() {
+ Stack stack = (Stack) this.stacks.get(this.configuration);
+ if (stack == null) {
+ System.out.println("[Current] Creating new stack for
configuration "+this.configuration);
+ stack = new Stack();
+ this.stacks.put(this.configuration, stack);
+ }
+ return stack;
+ }
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.gotm.lib.context.Configurable#reconfigure(java.util.Map)
+ */
+ public void reconfigure(Map configuration1) {
+ if (configuration1 != null) {
+ this.pending = configuration1;
+ }
+ }
+}
Index: gotm/src/java/org/objectweb/gotm/lib/context/ContextAwareness.java
diff -u /dev/null
gotm/src/java/org/objectweb/gotm/lib/context/ContextAwareness.java:1.1
--- /dev/null Fri Aug 5 17:06:30 2005
+++ gotm/src/java/org/objectweb/gotm/lib/context/ContextAwareness.java Fri
Aug 5 17:06:29 2005
@@ -0,0 +1,55 @@
+/*====================================================================
+
+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: ContextAwareness.java,v 1.1 2005/08/05 15:06:29 rouvoy Exp $
+====================================================================*/
+package org.objectweb.gotm.lib.context;
+
+import org.objectweb.transaction.api.Feature;
+import org.objectweb.transaction.api.event.Event;
+import org.objectweb.transaction.api.event.PublishFeature;
+
+/**
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @created 3 août 2005
+ * @modified $Date: 2005/08/05 15:06:29 $
+ * @version $Revision: 1.1 $
+ * @fractal.itf name="context-awareness"
+ */
+public interface ContextAwareness
+ extends Feature {
+ /** Fractal ADL Identifier for the <code>ContextAwareness</code>
interface. */
+ static final String CONTEXT_AWARENESS = "context-awareness";
+
+ /**
+ * @return the list of observable events.
+ */
+ Event[] getEvents();
+
+ /**
+ * @return the publish feature.
+ */
+ PublishFeature getPublish();
+}
Index: gotm/src/java/org/objectweb/gotm/lib/context/ContextAwarenessImpl.java
diff -u /dev/null
gotm/src/java/org/objectweb/gotm/lib/context/ContextAwarenessImpl.java:1.1
--- /dev/null Fri Aug 5 17:06:30 2005
+++ gotm/src/java/org/objectweb/gotm/lib/context/ContextAwarenessImpl.java
Fri Aug 5 17:06:29 2005
@@ -0,0 +1,92 @@
+/*====================================================================
+
+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: ContextAwarenessImpl.java,v 1.1 2005/08/05 15:06:29 rouvoy Exp $
+====================================================================*/
+package org.objectweb.gotm.lib.context;
+
+import java.util.LinkedList;
+import java.util.Map;
+
+import org.objectweb.fractal.lib.BindablePrimitive;
+import org.objectweb.transaction.api.event.Event;
+import org.objectweb.transaction.api.event.PublishFeature;
+
+/**
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @created 3 août 2005
+ * @modified $Date: 2005/08/05 15:06:29 $
+ * @version $Revision: 1.1 $
+ * @fractal.itf name="configurable" role="client"
signature="org.objectweb.gotm.lib.context.Configurable"
+ */
+public abstract class ContextAwarenessImpl
+extends BindablePrimitive
+implements PublishFeature, ContextAwareness
+{
+ /** <code>REFRESH</code> . */
+ public static final int REFRESH = 20 ;
+
+ private final int refresh = REFRESH ;
+ private LinkedList occurrences = new LinkedList();
+
+ /* (non-Javadoc)
+ * @see org.objectweb.fractal.lib.BindablePrimitive#clientFc()
+ */
+ protected String[] clientFc() {
+ return new String[] {Configurable.CONFIGURABLE};
+ }
+
+ protected Configurable getConfigurable() {
+ return (Configurable) fcBindings.get(Configurable.CONFIGURABLE);
+ }
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.transaction.api.event.PublishFeature#notify(org.objectweb.transaction.api.event.Event,
java.util.Map)
+ */
+ public void notify(Event topic, Map context) {
+ occurrences.addFirst(topic);
+ if (occurrences.size()%refresh == 0)
+ getConfigurable().reconfigure(getConfiguration(occurrences));
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.objectweb.gotm.lib.context.ContextAwareness#getPublish()
+ */
+ public PublishFeature getPublish() {
+ return this;
+ }
+
+ /**
+ * @return list of events to observe.
+ */
+ public abstract Event[] getEvents();
+
+ /**
+ * @param topics
+ * @return the new confiuration to use.
+ */
+ protected abstract Map getConfiguration(LinkedList topics);
+}
\ No newline at end of file
Index: gotm/src/java/org/objectweb/gotm/lib/coordination/AbortFeature.java
diff -u
gotm/src/java/org/objectweb/gotm/lib/coordination/AbortFeature.java:1.4
gotm/src/java/org/objectweb/gotm/lib/coordination/AbortFeature.java:1.5
--- gotm/src/java/org/objectweb/gotm/lib/coordination/AbortFeature.java:1.4
Mon Jul 18 16:33:36 2005
+++ gotm/src/java/org/objectweb/gotm/lib/coordination/AbortFeature.java Fri
Aug 5 17:06:29 2005
@@ -23,7 +23,7 @@
Contributor(s): .
---------------------------------------------------------------------
-$Id: AbortFeature.java,v 1.4 2005/07/18 14:33:36 rouvoy Exp $
+$Id: AbortFeature.java,v 1.5 2005/08/05 15:06:29 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm.lib.coordination;
@@ -37,7 +37,7 @@
/**
* Implementation of the cancel process.
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
* @fractal.itf
*/
public class AbortFeature
@@ -47,12 +47,12 @@
* @see
org.objectweb.transaction.api.coordination.CoordinationFeature#process(java.util.Map)
*/
public void process(Map context) {
- if (getLogger().isLoggable(DEBUG))
- getLogger().log(DEBUG,"Processing Abort...");
-
getBeginLog().log(TransactionStatusRollingBack.status.getLabel().getBytes());
+// if (getLogger().isLoggable(DEBUG))
+// getLogger().log(DEBUG,"Processing Abort...");
getTxState().setStatus(TransactionStatusRollingBack.status);
+
getBeginLog().log(TransactionStatusRollingBack.status.getLabel().getBytes());
getPublisher().notify(ResourceEventRollback.event,context);
-
getEndLog().log(TransactionStatusRolledBack.status.getLabel().getBytes());
getTxState().setStatus(TransactionStatusRolledBack.status);
+
getEndLog().log(TransactionStatusRolledBack.status.getLabel().getBytes());
}
}
Index: gotm/src/java/org/objectweb/gotm/lib/coordination/CommitFeature.java
diff -u
gotm/src/java/org/objectweb/gotm/lib/coordination/CommitFeature.java:1.5
gotm/src/java/org/objectweb/gotm/lib/coordination/CommitFeature.java:1.6
--- gotm/src/java/org/objectweb/gotm/lib/coordination/CommitFeature.java:1.5
Mon Jul 18 16:33:36 2005
+++ gotm/src/java/org/objectweb/gotm/lib/coordination/CommitFeature.java
Fri Aug 5 17:06:29 2005
@@ -23,7 +23,7 @@
Contributor(s): .
---------------------------------------------------------------------
- $Id: CommitFeature.java,v 1.5 2005/07/18 14:33:36 rouvoy Exp $
+ $Id: CommitFeature.java,v 1.6 2005/08/05 15:06:29 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm.lib.coordination;
@@ -42,7 +42,7 @@
/**
* One phase validation process.
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
- * @version $Revision: 1.5 $
+ * @version $Revision: 1.6 $
* @fractal.itf name="abort" role="client"
signature="org.objectweb.transaction.api.coordination.CoordinationFeature"
*/
public class CommitFeature
@@ -66,7 +66,7 @@
/**
* @return the cancel interface
*/
- protected CoordinationFeature abort() {
+ protected final CoordinationFeature abort() {
return (CoordinationFeature) fcBindings.get(ABORT);
}
@@ -74,14 +74,14 @@
* @see
org.objectweb.transaction.api.coordination.CoordinationFeature#process(java.util.Map)
*/
public void process(Map context) {
- if (getLogger().isLoggable(DEBUG))
- getLogger().log(DEBUG,"Processing Commit...");
+// if (getLogger().isLoggable(DEBUG))
+// getLogger().log(DEBUG,"Processing Commit...");
try {
getTxState().setStatus(TransactionStatusCommitting.status);
getBeginLog().log(TransactionStatusCommitting.status.getLabel().getBytes());
getPublisher().notify(ResourceEventCommit.event,context);
-
getEndLog().log(TransactionStatusCommitted.status.getLabel().getBytes());
getTxState().setStatus(TransactionStatusCommitted.status);
+
getEndLog().log(TransactionStatusCommitted.status.getLabel().getBytes());
} catch (InvalidTransitionException e) {
if (getLogger().isLoggable(DEBUG))
getLogger().log(DEBUG,"Commit Feature: "+e.getMessage());
Index: gotm/src/java/org/objectweb/gotm/lib/coordination/TimeoutImpl.java
diff -u
gotm/src/java/org/objectweb/gotm/lib/coordination/TimeoutImpl.java:1.2
gotm/src/java/org/objectweb/gotm/lib/coordination/TimeoutImpl.java:1.3
--- gotm/src/java/org/objectweb/gotm/lib/coordination/TimeoutImpl.java:1.2
Mon Jul 18 09:30:11 2005
+++ gotm/src/java/org/objectweb/gotm/lib/coordination/TimeoutImpl.java Fri
Aug 5 17:06:29 2005
@@ -23,7 +23,7 @@
Contributor(s): .
---------------------------------------------------------------------
- $Id: TimeoutImpl.java,v 1.2 2005/07/18 07:30:11 rouvoy Exp $
+ $Id: TimeoutImpl.java,v 1.3 2005/08/05 15:06:29 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm.lib.coordination;
@@ -47,7 +47,7 @@
/**
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
* @fractal.itf name="coord-process" role="client"
signature="org.objectweb.transaction.api.coordination.CoordinationFeature"
*/
public class TimeoutImpl
@@ -96,12 +96,12 @@
};
}
- protected CoordinationFeature getTerminator() {
+ protected final CoordinationFeature getTerminator() {
return (CoordinationFeature)
fcBindings.get(CoordinationFeature.PROCESS_FEATURE);
}
/* (non-Javadoc)
- * @see
org.objectweb.gotm.lib.coordination.TimeoutAttribute#setTimeout(int)
+ * @see org.objectweb.gotm.lib.protocol.TimeoutAttribute#setTimeout(int)
*/
public void setTimeout(int delay) {
this.timeout = delay ;
@@ -109,7 +109,7 @@
}
/* (non-Javadoc)
- * @see org.objectweb.gotm.lib.coordination.TimeoutAttribute#getTimeout()
+ * @see org.objectweb.gotm.lib.protocol.TimeoutAttribute#getTimeout()
*/
public int getTimeout() {
return this.timeout;
Index: gotm/src/java/org/objectweb/gotm/lib/coordination/TwoPCFeature.java
diff -u
gotm/src/java/org/objectweb/gotm/lib/coordination/TwoPCFeature.java:1.5
gotm/src/java/org/objectweb/gotm/lib/coordination/TwoPCFeature.java:1.6
--- gotm/src/java/org/objectweb/gotm/lib/coordination/TwoPCFeature.java:1.5
Mon Jul 18 16:33:36 2005
+++ gotm/src/java/org/objectweb/gotm/lib/coordination/TwoPCFeature.java Fri
Aug 5 17:06:29 2005
@@ -23,15 +23,13 @@
Contributor(s): .
---------------------------------------------------------------------
- $Id: TwoPCFeature.java,v 1.5 2005/07/18 14:33:36 rouvoy Exp $
+ $Id: TwoPCFeature.java,v 1.6 2005/08/05 15:06:29 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm.lib.coordination;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
import java.util.Map;
+import java.util.Vector;
import org.objectweb.gotm.lib.transaction.InvalidTransitionException;
import org.objectweb.transaction.api.coordination.CoordinationFeature;
@@ -49,8 +47,8 @@
* Implementation of a Two-Phase Commit Protocol.
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
* @created 5 janv. 2005
- * @modified $Date: 2005/07/18 14:33:36 $
- * @version $Revision: 1.5 $
+ * @modified $Date: 2005/08/05 15:06:29 $
+ * @version $Revision: 1.6 $
* @fractal.itf name="commit" role="client"
signature="org.objectweb.transaction.api.coordination.CoordinationFeature"
*/
public class TwoPCFeature
@@ -83,16 +81,16 @@
* @see
org.objectweb.transaction.api.coordination.CoordinationFeature#process(java.util.Map)
*/
public void process(Map context) {
- if (getLogger().isLoggable(DEBUG))
- getLogger().log(DEBUG,"Processing Atomic 2 Phases
Validation...");
+// if (getLogger().isLoggable(DEBUG))
+// getLogger().log(DEBUG,"Processing Atomic 2 Phases
Validation...");
try {
getBeginLog().log(TransactionStatusPrepared.status.getLabel().getBytes());
getTxState().setStatus(TransactionStatusPreparing.status);
- context.put(ResourceVoteRollback.vote,
Collections.synchronizedList(new ArrayList()));
- context.put(ResourceVoteCommit.vote,
Collections.synchronizedList(new ArrayList()));
- context.put(ResourceVoteReadOnly.vote,
Collections.synchronizedList(new ArrayList()));
+ context.put(ResourceVoteRollback.vote, new Vector());
+ context.put(ResourceVoteCommit.vote, new Vector());
+ context.put(ResourceVoteReadOnly.vote, new Vector());
getPublisher().notify(ResourceEventVote.event, context);
- List enf_rollback = (List)
context.get(ResourceVoteRollback.vote);
+ Vector enf_rollback = (Vector)
context.get(ResourceVoteRollback.vote);
getTxState().setStatus(TransactionStatusPrepared.status);
if (enf_rollback.size() == 0) {
commit().process(context);
Index: gotm/src/java/org/objectweb/gotm/lib/event/PublishASyncPool.java
diff -u /dev/null
gotm/src/java/org/objectweb/gotm/lib/event/PublishASyncPool.java:1.1
--- /dev/null Fri Aug 5 17:06:30 2005
+++ gotm/src/java/org/objectweb/gotm/lib/event/PublishASyncPool.java Fri
Aug 5 17:06:29 2005
@@ -0,0 +1,104 @@
+/*====================================================================
+
+ 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: PublishASyncPool.java,v 1.1 2005/08/05 15:06:29 rouvoy Exp $
+ ====================================================================*/
+
+package org.objectweb.gotm.lib.event;
+
+import java.util.Iterator;
+import java.util.Map;
+
+import org.objectweb.fractal.lib.BindablePrimitive;
+import org.objectweb.transaction.api.event.Event;
+import org.objectweb.transaction.api.event.PublishFeature;
+import org.objectweb.util.thread.api.RunnableManager;
+
+/**
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @created 5 janv. 2005
+ * @modified $Date: 2005/08/05 15:06:29 $
+ * @version $Revision: 1.1 $
+ * @fractal.itf name="runnable-manager" role="client"
signature="org.objectweb.util.thread.api.RunnableManager"
+ * @fractal.itf name="subscriber-provider" role="client"
signature="org.objectweb.gotm.lib.event.SubscriberProvider"
+ */
+public class PublishASyncPool
+extends BindablePrimitive
+implements PublishFeature
+{
+ /* (non-Javadoc)
+ * @see org.objectweb.fractal.lib.BindablePrimitive#clientFc()
+ */
+ protected String[] clientFc() {
+ return new String[] {SubscriberProvider.SUBSCRIBER_PROVIDER,
RunnableManager.RUNNABLE_MANAGER};
+ }
+
+ /**
+ * @return the runnable manager bound to the current component
+ */
+ protected final RunnableManager getRunnableManager() {
+ return (RunnableManager)
fcBindings.get(RunnableManager.RUNNABLE_MANAGER);
+ }
+
+ /**
+ * @return the subscriber provider.
+ */
+ protected SubscriberProvider getProvider() {
+ return (SubscriberProvider)
fcBindings.get(SubscriberProvider.SUBSCRIBER_PROVIDER);
+ }
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.gotm.lib.topic.PublishFeature#notify(java.lang.String,
java.util.Map)
+ */
+ public void notify(Event topic, Map context) {
+ if (getLogger().isLoggable(DEBUG))
+ getLogger().log(DEBUG,"Notification of the "+topic+" topic.");
+ for (Iterator i = getProvider().getTopic(topic).iterator();
i.hasNext();)
+ getRunnableManager().submitRunnable(new
NotifyAction((PublishFeature)i.next(),topic,context));
+ }
+
+ private final class NotifyAction implements Runnable {
+ private Event topic ;
+ private Map context ;
+ private PublishFeature subscriber ;
+ /**
+ * @param subscriber
+ * @param topic
+ * @param context
+ */
+ public NotifyAction(PublishFeature subscriber, Event topic, Map
context) {
+ this.topic = topic ;
+ this.context = context ;
+ this.subscriber = subscriber;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Runnable#run()
+ */
+ public void run() {
+ this.subscriber.notify(this.topic,this.context);
+ }
+ }
+}
Index: gotm/src/java/org/objectweb/gotm/lib/event/PublishASyncThread.java
diff -u
gotm/src/java/org/objectweb/gotm/lib/event/PublishASyncThread.java:1.2
gotm/src/java/org/objectweb/gotm/lib/event/PublishASyncThread.java:1.3
--- gotm/src/java/org/objectweb/gotm/lib/event/PublishASyncThread.java:1.2
Mon Jul 18 09:30:11 2005
+++ gotm/src/java/org/objectweb/gotm/lib/event/PublishASyncThread.java Fri
Aug 5 17:06:29 2005
@@ -1,102 +1,74 @@
/*====================================================================
-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: PublishASyncThread.java,v 1.2 2005/07/18 07:30:11 rouvoy Exp $
-====================================================================*/
+ 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: PublishASyncThread.java,v 1.3 2005/08/05 15:06:29 rouvoy Exp $
+ ====================================================================*/
package org.objectweb.gotm.lib.event;
import java.util.Iterator;
import java.util.Map;
+import java.util.Vector;
-import org.objectweb.fractal.lib.BindablePrimitive;
+import org.objectweb.gotm.GoTMException;
import org.objectweb.transaction.api.event.Event;
import org.objectweb.transaction.api.event.PublishFeature;
/**
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
* @created 11 juil. 2005
- * @modified $Date: 2005/07/18 07:30:11 $
- * @version $Revision: 1.2 $
- * @fractal.itf name="subscriber-provider" role="client"
signature="org.objectweb.gotm.lib.event.SubscriberProvider"
+ * @modified $Date: 2005/08/05 15:06:29 $
+ * @version $Revision: 1.3 $
+ * @fractal.itf
*/
public class PublishASyncThread
- extends BindablePrimitive
- implements PublishFeature {
- /* (non-Javadoc)
- * @see org.objectweb.fractal.lib.BindablePrimitive#clientFc()
- */
- protected String[] clientFc() {
- return new String[] {SubscriberProvider.SUBSCRIBER_PROVIDER};
- }
-
- /**
- * @return the subscriber provider.
- */
- protected SubscriberProvider getProvider() {
- return (SubscriberProvider)
fcBindings.get(SubscriberProvider.SUBSCRIBER_PROVIDER);
- }
-
+ extends PublishSyncThread {
- /* (non-Javadoc)
- * @see
org.objectweb.transaction.api.event.PublishFeature#notify(org.objectweb.transaction.api.event.Event,
java.util.Map)
+ /*
+ * (non-Javadoc)
+ *
+ * @see
org.objectweb.transaction.api.event.PublishFeature#notify(org.objectweb.transaction.api.event.Event,
+ * java.util.Map)
*/
public void notify(Event topic, Map context) {
if (getLogger().isLoggable(DEBUG))
- getLogger().log(DEBUG,"Notification of the "+topic+" topic.");
+ getLogger().log(DEBUG, "Notification of the " + topic + "
topic.");
+ Vector actions = new Vector();
for (Iterator i = getProvider().getTopic(topic).iterator();
i.hasNext();) {
- (new
NotifyAction((PublishFeature)i.next(),topic,context)).start();
+ Thread action = new NotifyAction((PublishFeature) i.next(),
topic,
+ context);
+ actions.add(action);
+ action.start();
}
- }
-
- /**
- * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
- * @created 11 juil. 2005
- * @modified $Date: 2005/07/18 07:30:11 $
- * @version $Revision: 1.2 $
- * @fractal.itf
- */
- protected final class NotifyAction extends Thread {
- private Event topic ;
- private Map context ;
- private PublishFeature suscriber ;
- /**
- * @param suscriber
- * @param topic
- * @param context
- */
- public NotifyAction(PublishFeature suscriber, Event topic, Map
context) {
- this.topic = topic ;
- this.context = context ;
- this.suscriber = suscriber;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Runnable#run()
- */
- public void run() {
- this.suscriber.notify(this.topic,this.context);
+ for (Iterator i = actions.iterator(); i.hasNext();) {
+ try {
+ ((Thread) i.next()).join();
+ } catch (InterruptedException e) {
+ if (getLogger().isLoggable(ERROR))
+ getLogger().log(ERROR, e);
+ throw new GoTMException(e);
+ }
}
}
-}
+}
\ No newline at end of file
Index: gotm/src/java/org/objectweb/gotm/lib/event/PublishSimple.java
diff -u gotm/src/java/org/objectweb/gotm/lib/event/PublishSimple.java:1.2
gotm/src/java/org/objectweb/gotm/lib/event/PublishSimple.java:1.3
--- gotm/src/java/org/objectweb/gotm/lib/event/PublishSimple.java:1.2 Mon
Jul 18 16:33:35 2005
+++ gotm/src/java/org/objectweb/gotm/lib/event/PublishSimple.java Fri
Aug 5 17:06:29 2005
@@ -23,7 +23,7 @@
Contributor(s): .
---------------------------------------------------------------------
- $Id: PublishSimple.java,v 1.2 2005/07/18 14:33:35 rouvoy Exp $
+ $Id: PublishSimple.java,v 1.3 2005/08/05 15:06:29 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm.lib.event;
@@ -37,8 +37,8 @@
/**
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
* @created 12 janv. 2005
- * @modified $Date: 2005/07/18 14:33:35 $
- * @version $Revision: 1.2 $
+ * @modified $Date: 2005/08/05 15:06:29 $
+ * @version $Revision: 1.3 $
* @fractal.itf name="subscriber-provider" role="client"
signature="org.objectweb.gotm.lib.event.SubscriberProvider"
*/
public class PublishSimple
@@ -55,7 +55,7 @@
/**
* @return the subscriber provider.
*/
- protected SubscriberProvider getProvider() {
+ protected final SubscriberProvider getProvider() {
return (SubscriberProvider)
fcBindings.get(SubscriberProvider.SUBSCRIBER_PROVIDER);
}
@@ -66,8 +66,8 @@
* java.util.Map)
*/
public void notify(Event topic, Map context) {
- if (getLogger().isLoggable(DEBUG))
- getLogger().log(DEBUG, "Notifying of topic " + topic + " to
"+getProvider().getTopic(topic).size()+" subscriber(s)");
+// if (getLogger().isLoggable(DEBUG))
+// getLogger().log(DEBUG, "Notifying of topic " + topic + " to
"+getProvider().getTopic(topic).size()+" subscriber(s)");
for (Iterator i = getProvider().getTopic(topic).iterator();
i.hasNext();)
((PublishFeature) i.next()).notify(topic, context);
}
Index: gotm/src/java/org/objectweb/gotm/lib/event/PublishSyncThread.java
diff -u gotm/src/java/org/objectweb/gotm/lib/event/PublishSyncThread.java:1.1
gotm/src/java/org/objectweb/gotm/lib/event/PublishSyncThread.java:1.2
--- gotm/src/java/org/objectweb/gotm/lib/event/PublishSyncThread.java:1.1
Mon Jul 11 10:27:04 2005
+++ gotm/src/java/org/objectweb/gotm/lib/event/PublishSyncThread.java Fri
Aug 5 17:06:29 2005
@@ -1,36 +1,36 @@
/*====================================================================
- 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: PublishSyncThread.java,v 1.1 2005/07/11 08:27:04 rouvoy Exp $
- ====================================================================*/
+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: PublishSyncThread.java,v 1.2 2005/08/05 15:06:29 rouvoy Exp $
+====================================================================*/
package org.objectweb.gotm.lib.event;
import java.util.Iterator;
import java.util.Map;
-import java.util.Vector;
+import org.objectweb.fractal.lib.BindablePrimitive;
import org.objectweb.gotm.GoTMException;
import org.objectweb.transaction.api.event.Event;
import org.objectweb.transaction.api.event.PublishFeature;
@@ -38,32 +38,40 @@
/**
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
* @created 11 juil. 2005
- * @modified $Date: 2005/07/11 08:27:04 $
- * @version $Revision: 1.1 $
- * @fractal.itf
+ * @modified $Date: 2005/08/05 15:06:29 $
+ * @version $Revision: 1.2 $
+ * @fractal.itf name="subscriber-provider" role="client"
signature="org.objectweb.gotm.lib.event.SubscriberProvider"
*/
public class PublishSyncThread
- extends PublishASyncThread {
+ extends BindablePrimitive
+ implements PublishFeature {
+ /* (non-Javadoc)
+ * @see org.objectweb.fractal.lib.BindablePrimitive#clientFc()
+ */
+ protected String[] clientFc() {
+ return new String[] {SubscriberProvider.SUBSCRIBER_PROVIDER};
+ }
+
+ /**
+ * @return the subscriber provider.
+ */
+ protected SubscriberProvider getProvider() {
+ return (SubscriberProvider)
fcBindings.get(SubscriberProvider.SUBSCRIBER_PROVIDER);
+ }
+
- /*
- * (non-Javadoc)
- *
- * @see
org.objectweb.transaction.api.event.PublishFeature#notify(org.objectweb.transaction.api.event.Event,
- * java.util.Map)
+ /* (non-Javadoc)
+ * @see
org.objectweb.transaction.api.event.PublishFeature#notify(org.objectweb.transaction.api.event.Event,
java.util.Map)
*/
public void notify(Event topic, Map context) {
- if (getLogger().isLoggable(DEBUG))
- getLogger().log(DEBUG, "Notification of the " + topic + "
topic.");
- Vector actions = new Vector();
+// if (getLogger().isLoggable(DEBUG))
+// getLogger().log(DEBUG,"Notification of the "+topic+" topic.");
for (Iterator i = getProvider().getTopic(topic).iterator();
i.hasNext();) {
Thread action = new NotifyAction((PublishFeature) i.next(),
topic,
context);
- actions.add(action);
action.start();
- }
- for (Iterator i = actions.iterator(); i.hasNext();) {
try {
- ((Thread) i.next()).join();
+ action.join();
} catch (InterruptedException e) {
if (getLogger().isLoggable(ERROR))
getLogger().log(ERROR, e);
@@ -71,4 +79,34 @@
}
}
}
-}
\ No newline at end of file
+
+ /**
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @created 11 juil. 2005
+ * @modified $Date: 2005/08/05 15:06:29 $
+ * @version $Revision: 1.2 $
+ * @fractal.itf
+ */
+ protected final class NotifyAction extends Thread {
+ private Event topic ;
+ private Map context ;
+ private PublishFeature suscriber ;
+ /**
+ * @param suscriber
+ * @param topic
+ * @param context
+ */
+ public NotifyAction(PublishFeature suscriber, Event topic, Map
context) {
+ this.topic = topic ;
+ this.context = context ;
+ this.suscriber = suscriber;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Runnable#run()
+ */
+ public void run() {
+ this.suscriber.notify(this.topic,this.context);
+ }
+ }
+}
Index: gotm/src/java/org/objectweb/gotm/lib/event/PublishThreadPool.java
diff -u gotm/src/java/org/objectweb/gotm/lib/event/PublishThreadPool.java:1.1
gotm/src/java/org/objectweb/gotm/lib/event/PublishThreadPool.java:removed
--- gotm/src/java/org/objectweb/gotm/lib/event/PublishThreadPool.java:1.1
Mon Jul 11 10:27:04 2005
+++ gotm/src/java/org/objectweb/gotm/lib/event/PublishThreadPool.java Fri
Aug 5 17:06:30 2005
@@ -1,106 +0,0 @@
-/*====================================================================
-
- 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: PublishThreadPool.java,v 1.1 2005/07/11 08:27:04 rouvoy Exp $
- ====================================================================*/
-
-package org.objectweb.gotm.lib.event;
-
-import java.util.Iterator;
-import java.util.Map;
-
-import org.objectweb.fractal.lib.BindablePrimitive;
-import org.objectweb.transaction.api.event.Event;
-import org.objectweb.transaction.api.event.PublishFeature;
-import org.objectweb.util.thread.api.RunnableManager;
-
-/**
- * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
- * @created 5 janv. 2005
- * @modified $Date: 2005/07/11 08:27:04 $
- * @version $Revision: 1.1 $
- * @fractal.itf name="runnable-manager" role="client"
signature="org.objectweb.util.thread.api.RunnableManager"
- * @fractal.itf name="subscriber-provider" role="client"
signature="org.objectweb.gotm.lib.event.SubscriberProvider"
- */
-public class PublishThreadPool
-extends BindablePrimitive
-implements PublishFeature
-{
- /* (non-Javadoc)
- * @see org.objectweb.fractal.lib.BindablePrimitive#clientFc()
- */
- protected String[] clientFc() {
- return new String[] {SubscriberProvider.SUBSCRIBER_PROVIDER,
RunnableManager.RUNNABLE_MANAGER};
- }
-
- /**
- * @return the runnable manager bound to the current component
- */
- protected final RunnableManager getRunnableManager() {
- return (RunnableManager)
fcBindings.get(RunnableManager.RUNNABLE_MANAGER);
- }
-
- /**
- * @return the subscriber provider.
- */
- protected SubscriberProvider getProvider() {
- return (SubscriberProvider)
fcBindings.get(SubscriberProvider.SUBSCRIBER_PROVIDER);
- }
-
- /* (non-Javadoc)
- * @see
org.objectweb.gotm.lib.topic.PublishFeature#notify(java.lang.String,
java.util.Map)
- */
- public void notify(Event topic, Map context) {
- if (getLogger().isLoggable(DEBUG))
- getLogger().log(DEBUG,"Notification of the "+topic+" topic.");
-// Object[] listeners = getTopic(topic).toArray(); // Iterators are
less performing than arrays
-// for(int i=0 ; i <listeners.length;i++)
- for (Iterator i = getProvider().getTopic(topic).iterator();
i.hasNext();)
- getRunnableManager().submitRunnable(new
NotifyAction((PublishFeature)i.next(),topic,context));
- }
-
- private final class NotifyAction implements Runnable {
- private Event topic ;
- private Map context ;
- private PublishFeature suscriber ;
- /**
- * @param suscriber
- * @param topic
- * @param context
- */
- public NotifyAction(PublishFeature suscriber, Event topic, Map
context) {
- this.topic = topic ;
- this.context = context ;
- this.suscriber = suscriber;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Runnable#run()
- */
- public void run() {
- this.suscriber.notify(this.topic,this.context);
- }
- }
-}
Index: gotm/src/java/org/objectweb/gotm/lib/event/SubscribablePrimitive.java
diff -u
gotm/src/java/org/objectweb/gotm/lib/event/SubscribablePrimitive.java:1.4
gotm/src/java/org/objectweb/gotm/lib/event/SubscribablePrimitive.java:1.5
--- gotm/src/java/org/objectweb/gotm/lib/event/SubscribablePrimitive.java:1.4
Mon Jul 18 16:33:35 2005
+++ gotm/src/java/org/objectweb/gotm/lib/event/SubscribablePrimitive.java
Fri Aug 5 17:06:29 2005
@@ -23,7 +23,7 @@
Contributor(s): .
---------------------------------------------------------------------
-$Id: SubscribablePrimitive.java,v 1.4 2005/07/18 14:33:35 rouvoy Exp $
+$Id: SubscribablePrimitive.java,v 1.5 2005/08/05 15:06:29 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm.lib.event;
@@ -37,8 +37,8 @@
/**
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
* @created 12 janv. 2005
- * @modified $Date: 2005/07/18 14:33:35 $
- * @version $Revision: 1.4 $
+ * @modified $Date: 2005/08/05 15:06:29 $
+ * @version $Revision: 1.5 $
* @fractal.itf name="subscribe" role="client"
signature="org.objectweb.transaction.api.event.SubscribeFeature"
*/
public abstract class SubscribablePrimitive
@@ -68,7 +68,7 @@
* @see org.objectweb.fractal.api.control.CacheController#loadFc()
*/
public void initFc() {
- if (getLogger().isLoggable(DEBUG)) getLogger().log(DEBUG,
"Subscribing to "+getEvents());
+// if (getLogger().isLoggable(DEBUG)) getLogger().log(DEBUG,
"Subscribing to "+getEvents());
getSubscriber().subscribe(getEvents(), this);
}
Index: gotm/src/java/org/objectweb/gotm/lib/logging/HOWLoggerProvider.java
diff -u
gotm/src/java/org/objectweb/gotm/lib/logging/HOWLoggerProvider.java:1.3
gotm/src/java/org/objectweb/gotm/lib/logging/HOWLoggerProvider.java:1.4
--- gotm/src/java/org/objectweb/gotm/lib/logging/HOWLoggerProvider.java:1.3
Mon Jul 18 16:33:36 2005
+++ gotm/src/java/org/objectweb/gotm/lib/logging/HOWLoggerProvider.java Fri
Aug 5 17:06:28 2005
@@ -23,15 +23,17 @@
Contributor(s): .
---------------------------------------------------------------------
-$Id: HOWLoggerProvider.java,v 1.3 2005/07/18 14:33:36 rouvoy Exp $
+$Id: HOWLoggerProvider.java,v 1.4 2005/08/05 15:06:28 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm.lib.logging;
import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
-import org.objectweb.fractal.api.control.IllegalLifeCycleException;
import org.objectweb.fractal.api.control.LifeCycleController;
import org.objectweb.fractal.lib.LoggablePrimitive;
+import org.objectweb.gotm.GoTMException;
import org.objectweb.howl.log.Configuration;
import org.objectweb.howl.log.InvalidFileSetException;
import org.objectweb.howl.log.InvalidLogBufferException;
@@ -41,14 +43,17 @@
/**
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
* @created 7 juil. 2005
- * @modified $Date: 2005/07/18 14:33:36 $
- * @version $Revision: 1.3 $
+ * @mod