Mail Archive Home | gotm-commits List | August 2005 Index
| <-- Date Index --> | <-- Thread Index --> |
Date: Tuesday, August 16, 2005 @ 15:36:18
Author: rouvoy
Path: /cvsroot/gotm/gotm
Added: src/fractal/org/objectweb/gotm/lib/logging/FcLogManagerHOWL.fractal
Modified: .settings/org.eclipse.core.resources.prefs
src/java/org/objectweb/gotm/lib/coordination/AbortFeature.java
src/java/org/objectweb/gotm/lib/coordination/AbstractCoordinationFeature.java
src/java/org/objectweb/gotm/lib/coordination/CommitFeature.java
src/java/org/objectweb/gotm/lib/coordination/ProbeCommitProtocol.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/PublishASyncPool.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/event/SubscriberPool.java
src/java/org/objectweb/gotm/lib/probe/ProbeAbstract.java
src/java/org/objectweb/gotm/lib/resource/ActionProvider.java
src/java/org/objectweb/gotm/lib/resource/ActionProviderAbstract.java
src/java/org/objectweb/gotm/lib/resource/NoActionAvailableException.java
src/java/org/objectweb/gotm/lib/resource/ResourceDelistEvent.java
src/java/org/objectweb/gotm/lib/resource/ResourceEnlistEvent.java
src/java/org/objectweb/gotm/lib/resource/ResourceManager.java
src/java/org/objectweb/gotm/lib/resource/ResourceManagerAbstract.java
src/java/org/objectweb/gotm/lib/resource/ResourceManagerWithThread.java
src/java/org/objectweb/gotm/lib/transaction/TransactionStateImpl.java
Removed: src/fractal/org/objectweb/gotm/lib/logging/TpLogManagerHOWL.fractal
src/java/org/objectweb/gotm/lib/coordination/VoteEventContext.java
* cleanup of project source code,
* correcting bad definition name in the HOWL logger component definition,
* removing fractal lifecycle interceptor generation,
* moving event bus subscription from initFc() callback to startFc() callback,
* updating benchmark parameters,
* cosmetic updates
-------------------------------------------------------------------------------+
.settings/org.eclipse.core.resources.prefs
| 4
src/fractal/org/objectweb/gotm/lib/logging/FcLogManagerHOWL.fractal
| 35 +++
src/fractal/org/objectweb/gotm/lib/logging/TpLogManagerHOWL.fractal
| 35 ---
src/java/org/objectweb/gotm/lib/coordination/AbortFeature.java
| 16 -
src/java/org/objectweb/gotm/lib/coordination/AbstractCoordinationFeature.java
| 14 -
src/java/org/objectweb/gotm/lib/coordination/CommitFeature.java
| 18 -
src/java/org/objectweb/gotm/lib/coordination/ProbeCommitProtocol.java
| 8
src/java/org/objectweb/gotm/lib/coordination/TimeoutImpl.java
| 8
src/java/org/objectweb/gotm/lib/coordination/TwoPCFeature.java
| 22 +-
src/java/org/objectweb/gotm/lib/coordination/VoteEventContext.java
| 97 ----------
src/java/org/objectweb/gotm/lib/event/PublishASyncPool.java
| 8
src/java/org/objectweb/gotm/lib/event/PublishSimple.java
| 8
src/java/org/objectweb/gotm/lib/event/PublishSyncThread.java
| 12 -
src/java/org/objectweb/gotm/lib/event/SubscribablePrimitive.java
| 20 +-
src/java/org/objectweb/gotm/lib/event/SubscriberPool.java
| 20 +-
src/java/org/objectweb/gotm/lib/probe/ProbeAbstract.java
| 10 -
src/java/org/objectweb/gotm/lib/resource/ActionProvider.java
| 10 -
src/java/org/objectweb/gotm/lib/resource/ActionProviderAbstract.java
| 10 -
src/java/org/objectweb/gotm/lib/resource/NoActionAvailableException.java
| 8
src/java/org/objectweb/gotm/lib/resource/ResourceDelistEvent.java
| 8
src/java/org/objectweb/gotm/lib/resource/ResourceEnlistEvent.java
| 8
src/java/org/objectweb/gotm/lib/resource/ResourceManager.java
| 17 +
src/java/org/objectweb/gotm/lib/resource/ResourceManagerAbstract.java
| 55 +++--
src/java/org/objectweb/gotm/lib/resource/ResourceManagerWithThread.java
| 8
src/java/org/objectweb/gotm/lib/transaction/TransactionStateImpl.java
| 8
25 files changed, 197 insertions(+), 270 deletions(-)
Index: gotm/.settings/org.eclipse.core.resources.prefs
diff -u gotm/.settings/org.eclipse.core.resources.prefs:1.6
gotm/.settings/org.eclipse.core.resources.prefs:1.7
--- gotm/.settings/org.eclipse.core.resources.prefs:1.6 Fri Aug 12 14:31:23
2005
+++ gotm/.settings/org.eclipse.core.resources.prefs Tue Aug 16 15:36:18
2005
@@ -1,11 +1,11 @@
-#Fri Aug 12 13:15:47 CEST 2005
+#Mon Aug 15 18:00:51 CEST 2005
eclipse.preferences.version=1
encoding//src/fractal/org/objectweb/gotm/lib/coordination/FcCommitEngine.fractal=ISO-8859-1
encoding//src/fractal/org/objectweb/gotm/lib/event/FcEventBusAbstract.fractal=ISO-8859-1
encoding//src/fractal/org/objectweb/gotm/lib/event/FcEventBusPool.fractal=ISO-8859-1
encoding//src/fractal/org/objectweb/gotm/lib/event/FcEventBusSimple.fractal=ISO-8859-1
encoding//src/fractal/org/objectweb/gotm/lib/event/FcEventBusThread.fractal=ISO-8859-1
-encoding//src/fractal/org/objectweb/gotm/lib/logging/TpLogManagerHOWL.fractal=ISO-8859-1
+encoding//src/fractal/org/objectweb/gotm/lib/logging/FcLogManagerHOWL.fractal=ISO-8859-1
encoding//src/fractal/org/objectweb/gotm/lib/protocol/Fc2PC.fractal=ISO-8859-1
encoding//src/fractal/org/objectweb/gotm/lib/protocol/Fc2PCAbstract.fractal=ISO-8859-1
encoding//src/fractal/org/objectweb/gotm/lib/protocol/Fc2PCNoLog.fractal=ISO-8859-1
Index:
gotm/src/fractal/org/objectweb/gotm/lib/logging/FcLogManagerHOWL.fractal
diff -u /dev/null
gotm/src/fractal/org/objectweb/gotm/lib/logging/FcLogManagerHOWL.fractal:1.1
--- /dev/null Tue Aug 16 15:36:18 2005
+++ gotm/src/fractal/org/objectweb/gotm/lib/logging/FcLogManagerHOWL.fractal
Tue Aug 16 15:36:17 2005
@@ -0,0 +1,35 @@
+<?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.FcLogManagerHOWL"
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.FcHOWLoggerProvider(${file},${dir})"/>
+ <component name="FcForceLogger"
+ definition="org.objectweb.gotm.lib.logging.FcGenericLogger(true)"/>
+ <component name="FcNoForceLogger"
+ definition="org.objectweb.gotm.lib.logging.FcGenericLogger(false)"/>
+ <component name="FcEmptyLogger"
+ definition="org.objectweb.gotm.lib.logging.FcSimpleLogger"/>
+
+ <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"/>
+</definition>
Index:
gotm/src/fractal/org/objectweb/gotm/lib/logging/TpLogManagerHOWL.fractal
diff -u
gotm/src/fractal/org/objectweb/gotm/lib/logging/TpLogManagerHOWL.fractal:1.2
gotm/src/fractal/org/objectweb/gotm/lib/logging/TpLogManagerHOWL.fractal:removed
---
gotm/src/fractal/org/objectweb/gotm/lib/logging/TpLogManagerHOWL.fractal:1.2
Fri Aug 12 14:31:23 2005
+++ gotm/src/fractal/org/objectweb/gotm/lib/logging/TpLogManagerHOWL.fractal
Tue Aug 16 15:36:18 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/standard.dtd">
-
-<definition name="org.objectweb.gotm.lib.logging.FcLogManagerHOWL"
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.FcHOWLoggerProvider(${file},${dir})"/>
- <component name="FcForceLogger"
- definition="org.objectweb.gotm.lib.logging.FcGenericLogger(true)"/>
- <component name="FcNoForceLogger"
- definition="org.objectweb.gotm.lib.logging.FcGenericLogger(false)"/>
- <component name="FcEmptyLogger"
- definition="org.objectweb.gotm.lib.logging.FcSimpleLogger"/>
-
- <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"/>
-</definition>
Index: gotm/src/java/org/objectweb/gotm/lib/coordination/AbortFeature.java
diff -u
gotm/src/java/org/objectweb/gotm/lib/coordination/AbortFeature.java:1.5
gotm/src/java/org/objectweb/gotm/lib/coordination/AbortFeature.java:1.6
--- gotm/src/java/org/objectweb/gotm/lib/coordination/AbortFeature.java:1.5
Fri Aug 5 17:06:29 2005
+++ gotm/src/java/org/objectweb/gotm/lib/coordination/AbortFeature.java Tue
Aug 16 15:36:18 2005
@@ -23,7 +23,7 @@
Contributor(s): .
---------------------------------------------------------------------
-$Id: AbortFeature.java,v 1.5 2005/08/05 15:06:29 rouvoy Exp $
+$Id: AbortFeature.java,v 1.6 2005/08/16 13:36:18 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.5 $
+ * @version $Revision: 1.6 $
* @fractal.itf
*/
public class AbortFeature
@@ -46,13 +46,13 @@
/* (non-Javadoc)
* @see
org.objectweb.transaction.api.coordination.CoordinationFeature#process(java.util.Map)
*/
- public void process(Map context) {
+ public void execute(Map context) {
// if (getLogger().isLoggable(DEBUG))
// getLogger().log(DEBUG,"Processing Abort...");
- getTxState().setStatus(TransactionStatusRollingBack.status);
-
getBeginLog().log(TransactionStatusRollingBack.status.getLabel().getBytes());
- getPublisher().notify(ResourceEventRollback.event,context);
- getTxState().setStatus(TransactionStatusRolledBack.status);
-
getEndLog().log(TransactionStatusRolledBack.status.getLabel().getBytes());
+ txState().setStatus(TransactionStatusRollingBack.status);
+
beginLog().log(TransactionStatusRollingBack.status.label().getBytes());
+ publisher().notify(ResourceEventRollback.event,context);
+ txState().setStatus(TransactionStatusRolledBack.status);
+ endLog().log(TransactionStatusRolledBack.status.label().getBytes());
}
}
Index:
gotm/src/java/org/objectweb/gotm/lib/coordination/AbstractCoordinationFeature.java
diff -u
gotm/src/java/org/objectweb/gotm/lib/coordination/AbstractCoordinationFeature.java:1.8
gotm/src/java/org/objectweb/gotm/lib/coordination/AbstractCoordinationFeature.java:1.9
---
gotm/src/java/org/objectweb/gotm/lib/coordination/AbstractCoordinationFeature.java:1.8
Mon Jul 18 16:33:36 2005
+++
gotm/src/java/org/objectweb/gotm/lib/coordination/AbstractCoordinationFeature.java
Tue Aug 16 15:36:18 2005
@@ -23,7 +23,7 @@
Contributor(s): .
---------------------------------------------------------------------
- $Id: AbstractCoordinationFeature.java,v 1.8 2005/07/18 14:33:36 rouvoy Exp $
+ $Id: AbstractCoordinationFeature.java,v 1.9 2005/08/16 13:36:18 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm.lib.coordination;
@@ -39,8 +39,8 @@
* Abstract implementation of a validation engine.
* @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.8 $
+ * @modified $Date: 2005/08/16 13:36:18 $
+ * @version $Revision: 1.9 $
* @fractal.itf name="publish" role="client"
signature="org.objectweb.transaction.api.event.PublishFeature"
* @fractal.itf name="tx-state" role="client"
signature="org.objectweb.transaction.api.transaction.TransactionState"
* @fractal.itf name="begin-log" role="client"
signature="org.objectweb.transaction.api.logging.LoggerFeature"
@@ -69,28 +69,28 @@
/**
* @return Returns the notifier.
*/
- protected final PublishFeature getPublisher() {
+ protected final PublishFeature publisher() {
return (PublishFeature)
fcBindings.get(PublishFeature.PUBLISH_FEATURE);
}
/**
* @return the transaction state.
*/
- protected final TransactionState getTxState() {
+ protected final TransactionState txState() {
return (TransactionState)
fcBindings.get(TransactionState.TRANSACTION_STATE);
}
/**
* @return the recovery logger.
*/
- protected final LoggerFeature getBeginLog() {
+ protected final LoggerFeature beginLog() {
return (LoggerFeature) fcBindings.get(BEGIN_LOG);
}
/**
* @return the recovery logger.
*/
- protected final LoggerFeature getEndLog() {
+ protected final LoggerFeature endLog() {
return (LoggerFeature) fcBindings.get(END_LOG);
}
}
\ No newline at end of file
Index: gotm/src/java/org/objectweb/gotm/lib/coordination/CommitFeature.java
diff -u
gotm/src/java/org/objectweb/gotm/lib/coordination/CommitFeature.java:1.6
gotm/src/java/org/objectweb/gotm/lib/coordination/CommitFeature.java:1.7
--- gotm/src/java/org/objectweb/gotm/lib/coordination/CommitFeature.java:1.6
Fri Aug 5 17:06:29 2005
+++ gotm/src/java/org/objectweb/gotm/lib/coordination/CommitFeature.java
Tue Aug 16 15:36:18 2005
@@ -23,7 +23,7 @@
Contributor(s): .
---------------------------------------------------------------------
- $Id: CommitFeature.java,v 1.6 2005/08/05 15:06:29 rouvoy Exp $
+ $Id: CommitFeature.java,v 1.7 2005/08/16 13:36:18 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.6 $
+ * @version $Revision: 1.7 $
* @fractal.itf name="abort" role="client"
signature="org.objectweb.transaction.api.coordination.CoordinationFeature"
*/
public class CommitFeature
@@ -73,19 +73,19 @@
/* (non-Javadoc)
* @see
org.objectweb.transaction.api.coordination.CoordinationFeature#process(java.util.Map)
*/
- public void process(Map context) {
+ public void execute(Map context) {
// 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);
- getTxState().setStatus(TransactionStatusCommitted.status);
-
getEndLog().log(TransactionStatusCommitted.status.getLabel().getBytes());
+ txState().setStatus(TransactionStatusCommitting.status);
+
beginLog().log(TransactionStatusCommitting.status.label().getBytes());
+ publisher().notify(ResourceEventCommit.event,context);
+ txState().setStatus(TransactionStatusCommitted.status);
+
endLog().log(TransactionStatusCommitted.status.label().getBytes());
} catch (InvalidTransitionException e) {
if (getLogger().isLoggable(DEBUG))
getLogger().log(DEBUG,"Commit Feature: "+e.getMessage());
- abort().process(context);
+ abort().execute(context);
}
}
}
Index:
gotm/src/java/org/objectweb/gotm/lib/coordination/ProbeCommitProtocol.java
diff -u
gotm/src/java/org/objectweb/gotm/lib/coordination/ProbeCommitProtocol.java:1.1
gotm/src/java/org/objectweb/gotm/lib/coordination/ProbeCommitProtocol.java:1.2
---
gotm/src/java/org/objectweb/gotm/lib/coordination/ProbeCommitProtocol.java:1.1
Fri Aug 12 14:31:23 2005
+++
gotm/src/java/org/objectweb/gotm/lib/coordination/ProbeCommitProtocol.java
Tue Aug 16 15:36:18 2005
@@ -23,7 +23,7 @@
Contributor(s): .
---------------------------------------------------------------------
-$Id: ProbeCommitProtocol.java,v 1.1 2005/08/12 12:31:23 rouvoy Exp $
+$Id: ProbeCommitProtocol.java,v 1.2 2005/08/16 13:36:18 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm.lib.coordination;
@@ -40,8 +40,8 @@
/**
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
* @created 3 août 2005
- * @modified $Date: 2005/08/12 12:31:23 $
- * @version $Revision: 1.1 $
+ * @modified $Date: 2005/08/16 13:36:18 $
+ * @version $Revision: 1.2 $
* @fractal.itf
*/
public class ProbeCommitProtocol
@@ -55,7 +55,7 @@
/* (non-Javadoc)
* @see org.objectweb.gotm.lib.event.SubscribablePrimitive#getEvents()
*/
- public Event[] getEvents() {
+ public Event[] events() {
return new Event[] {
TransactionStatusCommitted.status,
TransactionStatusRolledBack.status
Index: gotm/src/java/org/objectweb/gotm/lib/coordination/TimeoutImpl.java
diff -u
gotm/src/java/org/objectweb/gotm/lib/coordination/TimeoutImpl.java:1.4
gotm/src/java/org/objectweb/gotm/lib/coordination/TimeoutImpl.java:1.5
--- gotm/src/java/org/objectweb/gotm/lib/coordination/TimeoutImpl.java:1.4
Fri Aug 12 14:31:23 2005
+++ gotm/src/java/org/objectweb/gotm/lib/coordination/TimeoutImpl.java Tue
Aug 16 15:36:18 2005
@@ -23,7 +23,7 @@
Contributor(s): .
---------------------------------------------------------------------
- $Id: TimeoutImpl.java,v 1.4 2005/08/12 12:31:23 rouvoy Exp $
+ $Id: TimeoutImpl.java,v 1.5 2005/08/16 13:36:18 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.4 $
+ * @version $Revision: 1.5 $
* @fractal.itf name="coord-process" role="client"
signature="org.objectweb.transaction.api.coordination.CoordinationFeature"
*/
public class TimeoutImpl
@@ -66,7 +66,7 @@
public void actionPerformed(ActionEvent evt) {
if (getLogger().isLoggable(DEBUG))
getLogger().log(DEBUG, "Timeout has expired!");
- TimeoutImpl.this.getTerminator().process(new HashMap());
+ TimeoutImpl.this.getTerminator().execute(new HashMap());
}
};
this.daemon = new Timer(this.timeout, taskPerformer);
@@ -86,7 +86,7 @@
/* (non-Javadoc)
* @see org.objectweb.gotm.lib.SubscribablePrimitive#getEvents()
*/
- public Event[] getEvents() {
+ public Event[] events() {
return new Event[] {
TransactionStatusTransactionActive.status,
TransactionStatusTransactionInactive.status,
Index: gotm/src/java/org/objectweb/gotm/lib/coordination/TwoPCFeature.java
diff -u
gotm/src/java/org/objectweb/gotm/lib/coordination/TwoPCFeature.java:1.6
gotm/src/java/org/objectweb/gotm/lib/coordination/TwoPCFeature.java:1.7
--- gotm/src/java/org/objectweb/gotm/lib/coordination/TwoPCFeature.java:1.6
Fri Aug 5 17:06:29 2005
+++ gotm/src/java/org/objectweb/gotm/lib/coordination/TwoPCFeature.java Tue
Aug 16 15:36:18 2005
@@ -23,7 +23,7 @@
Contributor(s): .
---------------------------------------------------------------------
- $Id: TwoPCFeature.java,v 1.6 2005/08/05 15:06:29 rouvoy Exp $
+ $Id: TwoPCFeature.java,v 1.7 2005/08/16 13:36:18 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm.lib.coordination;
@@ -47,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/08/05 15:06:29 $
- * @version $Revision: 1.6 $
+ * @modified $Date: 2005/08/16 13:36:18 $
+ * @version $Revision: 1.7 $
* @fractal.itf name="commit" role="client"
signature="org.objectweb.transaction.api.coordination.CoordinationFeature"
*/
public class TwoPCFeature
@@ -80,27 +80,27 @@
/* (non-Javadoc)
* @see
org.objectweb.transaction.api.coordination.CoordinationFeature#process(java.util.Map)
*/
- public void process(Map context) {
+ public void execute(Map context) {
// if (getLogger().isLoggable(DEBUG))
// getLogger().log(DEBUG,"Processing Atomic 2 Phases
Validation...");
try {
-
getBeginLog().log(TransactionStatusPrepared.status.getLabel().getBytes());
- getTxState().setStatus(TransactionStatusPreparing.status);
+
beginLog().log(TransactionStatusPrepared.status.label().getBytes());
+ txState().setStatus(TransactionStatusPreparing.status);
context.put(ResourceVoteRollback.vote, new Vector());
context.put(ResourceVoteCommit.vote, new Vector());
context.put(ResourceVoteReadOnly.vote, new Vector());
- getPublisher().notify(ResourceEventVote.event, context);
+ publisher().notify(ResourceEventVote.event, context);
Vector enf_rollback = (Vector)
context.get(ResourceVoteRollback.vote);
- getTxState().setStatus(TransactionStatusPrepared.status);
+ txState().setStatus(TransactionStatusPrepared.status);
if (enf_rollback.size() == 0) {
- commit().process(context);
+ commit().execute(context);
} else {
- abort().process(context);
+ abort().execute(context);
}
} catch (InvalidTransitionException e) {
if (getLogger().isLoggable(DEBUG))
getLogger().log(DEBUG,"Prepare Feature: "+e.getMessage());
- abort().process(context);
+ abort().execute(context);
throw e;
}
}
Index: gotm/src/java/org/objectweb/gotm/lib/coordination/VoteEventContext.java
diff -u
gotm/src/java/org/objectweb/gotm/lib/coordination/VoteEventContext.java:1.4
gotm/src/java/org/objectweb/gotm/lib/coordination/VoteEventContext.java:removed
---
gotm/src/java/org/objectweb/gotm/lib/coordination/VoteEventContext.java:1.4
Mon Jan 10 17:16:05 2005
+++ gotm/src/java/org/objectweb/gotm/lib/coordination/VoteEventContext.java
Tue Aug 16 15:36:18 2005
@@ -1,97 +0,0 @@
-/*====================================================================
-
-GoTM: GoTM is an open Transaction Monitor
-Copyright (C) 2000-2004 INRIA & USTL - LIFL - GOAL
-Contact: gotm-team@xxxxxxxxxxxxx
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or any later version.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-USA
-
-Initial developer(s): Romain Rouvoy.
-Contributor(s): .
-
----------------------------------------------------------------------
-$Id: VoteEventContext.java,v 1.4 2005/01/10 16:16:05 rouvoy Exp $
-====================================================================*/
-package org.objectweb.gotm.lib.coordination;
-
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import org.objectweb.transaction.api.event.EventNotificationFeature;
-import org.objectweb.transaction.api.resource.ResourceVote;
-
-/**
- * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
- * @created 5 janv. 2005
- * @modified $Date: 2005/01/10 16:16:05 $
- * @version $Revision: 1.4 $
- */
-public class VoteEventContext
- extends HashMap
-{
- /**
- * @return Returns the votes.
- */
- protected Map getVotes() {
- return this;
- }
-
- /**
- * Provides list of registered votes.
- * @return the list of vote returned by the resources.
- */
- public ResourceVote[] listVotes() {
- return (ResourceVote[]) getVotes().keySet().toArray(new
ResourceVote[0]);
- }
-
- /**
- * Provides list of vote submitters.
- * @param vote the requested vote.
- * @return the list of notifier that have sent the requested vote.
- */
- public EventNotificationFeature[] getVote(ResourceVote vote) {
- List l = (List) getVotes().get(vote.getVote());
- if (l == null)
- return new EventNotificationFeature[0];
- return (EventNotificationFeature[]) l.toArray(new
EventNotificationFeature[0]);
- }
-
- /**
- * Create a new submitters list for a vote
- * @param vote the list to create.
- * @return the list created.
- */
- protected List createVote(ResourceVote vote) {
- List l = new LinkedList();
- getVotes().put(vote.getVote(), l);
- return l;
- }
-
- /**
- * Submits a vote
- * @param vote the vote submitted
- * @param submitter the submitter of the vote
- */
- public void vote(ResourceVote vote, EventNotificationFeature submitter) {
- List l = (List) getVotes().get(vote.getVote());
- if (l==null)
- l=createVote(vote.getVote());
- if (!l.contains(submitter))
- l.add(submitter);
- }
-}
Index: gotm/src/java/org/objectweb/gotm/lib/event/PublishASyncPool.java
diff -u gotm/src/java/org/objectweb/gotm/lib/event/PublishASyncPool.java:1.2
gotm/src/java/org/objectweb/gotm/lib/event/PublishASyncPool.java:1.3
--- gotm/src/java/org/objectweb/gotm/lib/event/PublishASyncPool.java:1.2
Fri Aug 12 14:31:23 2005
+++ gotm/src/java/org/objectweb/gotm/lib/event/PublishASyncPool.java Tue
Aug 16 15:36:18 2005
@@ -23,7 +23,7 @@
Contributor(s): .
---------------------------------------------------------------------
- $Id: PublishASyncPool.java,v 1.2 2005/08/12 12:31:23 rouvoy Exp $
+ $Id: PublishASyncPool.java,v 1.3 2005/08/16 13:36:18 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm.lib.event;
@@ -39,8 +39,8 @@
/**
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
* @created 5 janv. 2005
- * @modified $Date: 2005/08/12 12:31:23 $
- * @version $Revision: 1.2 $
+ * @modified $Date: 2005/08/16 13:36:18 $
+ * @version $Revision: 1.3 $
* @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"
*/
@@ -82,7 +82,7 @@
/* (non-Javadoc)
* @see org.objectweb.transaction.api.event.PublishFeature#getEvents()
*/
- public Event[] getEvents() {
+ public Event[] events() {
return getProvider().listTopics();
}
Index: gotm/src/java/org/objectweb/gotm/lib/event/PublishSimple.java
diff -u gotm/src/java/org/objectweb/gotm/lib/event/PublishSimple.java:1.4
gotm/src/java/org/objectweb/gotm/lib/event/PublishSimple.java:1.5
--- gotm/src/java/org/objectweb/gotm/lib/event/PublishSimple.java:1.4 Fri
Aug 12 14:31:23 2005
+++ gotm/src/java/org/objectweb/gotm/lib/event/PublishSimple.java Tue
Aug 16 15:36:18 2005
@@ -23,7 +23,7 @@
Contributor(s): .
---------------------------------------------------------------------
- $Id: PublishSimple.java,v 1.4 2005/08/12 12:31:23 rouvoy Exp $
+ $Id: PublishSimple.java,v 1.5 2005/08/16 13:36:18 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/08/12 12:31:23 $
- * @version $Revision: 1.4 $
+ * @modified $Date: 2005/08/16 13:36:18 $
+ * @version $Revision: 1.5 $
* @fractal.itf name="subscriber-provider" role="client"
signature="org.objectweb.gotm.lib.event.SubscriberProvider"
*/
public class PublishSimple
@@ -75,7 +75,7 @@
/* (non-Javadoc)
* @see org.objectweb.transaction.api.event.PublishFeature#getEvents()
*/
- public Event[] getEvents() {
+ public Event[] events() {
return getProvider().listTopics();
}
}
\ No newline at end of file
Index: gotm/src/java/org/objectweb/gotm/lib/event/PublishSyncThread.java
diff -u gotm/src/java/org/objectweb/gotm/lib/event/PublishSyncThread.java:1.3
gotm/src/java/org/objectweb/gotm/lib/event/PublishSyncThread.java:1.4
--- gotm/src/java/org/objectweb/gotm/lib/event/PublishSyncThread.java:1.3
Fri Aug 12 14:31:23 2005
+++ gotm/src/java/org/objectweb/gotm/lib/event/PublishSyncThread.java Tue
Aug 16 15:36:18 2005
@@ -23,7 +23,7 @@
Contributor(s): .
---------------------------------------------------------------------
-$Id: PublishSyncThread.java,v 1.3 2005/08/12 12:31:23 rouvoy Exp $
+$Id: PublishSyncThread.java,v 1.4 2005/08/16 13:36:18 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm.lib.event;
@@ -38,8 +38,8 @@
/**
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
* @created 11 juil. 2005
- * @modified $Date: 2005/08/12 12:31:23 $
- * @version $Revision: 1.3 $
+ * @modified $Date: 2005/08/16 13:36:18 $
+ * @version $Revision: 1.4 $
* @fractal.itf name="subscriber-provider" role="client"
signature="org.objectweb.gotm.lib.event.SubscriberProvider"
*/
public class PublishSyncThread
@@ -83,15 +83,15 @@
/* (non-Javadoc)
* @see org.objectweb.transaction.api.event.PublishFeature#getEvents()
*/
- public Event[] getEvents() {
+ public Event[] events() {
return getProvider().listTopics();
}
/**
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
* @created 11 juil. 2005
- * @modified $Date: 2005/08/12 12:31:23 $
- * @version $Revision: 1.3 $
+ * @modified $Date: 2005/08/16 13:36:18 $
+ * @version $Revision: 1.4 $
* @fractal.itf
*/
protected final class NotifyAction extends Thread {
Index: gotm/src/java/org/objectweb/gotm/lib/event/SubscribablePrimitive.java
diff -u
gotm/src/java/org/objectweb/gotm/lib/event/SubscribablePrimitive.java:1.6
gotm/src/java/org/objectweb/gotm/lib/event/SubscribablePrimitive.java:1.7
--- gotm/src/java/org/objectweb/gotm/lib/event/SubscribablePrimitive.java:1.6
Fri Aug 12 14:31:23 2005
+++ gotm/src/java/org/objectweb/gotm/lib/event/SubscribablePrimitive.java
Tue Aug 16 15:36:18 2005
@@ -23,12 +23,12 @@
Contributor(s): .
---------------------------------------------------------------------
-$Id: SubscribablePrimitive.java,v 1.6 2005/08/12 12:31:23 rouvoy Exp $
+$Id: SubscribablePrimitive.java,v 1.7 2005/08/16 13:36:18 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm.lib.event;
-import org.objectweb.fractal.api.control.CacheController;
+import org.objectweb.fractal.api.control.LifeCycleController;
import org.objectweb.fractal.lib.BindablePrimitive;
import org.objectweb.transaction.api.event.Event;
import org.objectweb.transaction.api.event.PublishFeature;
@@ -37,18 +37,18 @@
/**
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
* @created 12 janv. 2005
- * @modified $Date: 2005/08/12 12:31:23 $
- * @version $Revision: 1.6 $
+ * @modified $Date: 2005/08/16 13:36:18 $
+ * @version $Revision: 1.7 $
* @fractal.itf name="subscribe" role="client"
signature="org.objectweb.transaction.api.event.SubscribeFeature"
*/
public abstract class SubscribablePrimitive
extends BindablePrimitive
- implements PublishFeature, CacheController
+ implements PublishFeature, LifeCycleController
{
/* (non-Javadoc)
* @see org.objectweb.transaction.api.event.PublishFeature#getEvents()
*/
- public abstract Event[] getEvents() ;
+ public abstract Event[] events() ;
/* (non-Javadoc)
* @see org.objectweb.fractal.lib.BindablePrimitive#clientFc()
@@ -66,7 +66,7 @@
/* (non-Javadoc)
* @see org.objectweb.fractal.api.control.CacheController#loadFc()
*/
- public void initFc() {
+ public void startFc() {
// if (getLogger().isLoggable(DEBUG)) getLogger().log(DEBUG,
"Subscribing to "+getEvents());
getSubscriber().subscribe(this);
}
@@ -74,12 +74,12 @@
/* (non-Javadoc)
* @see org.objectweb.fractal.api.control.CacheController#unloadFc()
*/
- public void clearFc() {
- // Nothing to do.
+ public void stopFc() {
+ getSubscriber().unsubscribe(this);
}
/* (non-Javadoc)
* @see org.objectweb.fractal.api.control.CacheController#getLoadState()
*/
- public String getCacheState() { return null; }
+ public String getFcState() { return null; }
}
\ No newline at end of file
Index: gotm/src/java/org/objectweb/gotm/lib/event/SubscriberPool.java
diff -u gotm/src/java/org/objectweb/gotm/lib/event/SubscriberPool.java:1.2
gotm/src/java/org/objectweb/gotm/lib/event/SubscriberPool.java:1.3
--- gotm/src/java/org/objectweb/gotm/lib/event/SubscriberPool.java:1.2 Fri
Aug 12 14:31:23 2005
+++ gotm/src/java/org/objectweb/gotm/lib/event/SubscriberPool.java Tue
Aug 16 15:36:18 2005
@@ -23,7 +23,7 @@
Contributor(s): .
---------------------------------------------------------------------
-$Id: SubscriberPool.java,v 1.2 2005/08/12 12:31:23 rouvoy Exp $
+$Id: SubscriberPool.java,v 1.3 2005/08/16 13:36:18 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm.lib.event;
@@ -32,7 +32,7 @@
import java.util.HashMap;
import java.util.Map;
-import org.objectweb.fractal.api.control.CacheController;
+import org.objectweb.fractal.api.control.LifeCycleController;
import org.objectweb.fractal.lib.LoggablePrimitive;
import org.objectweb.transaction.api.event.Event;
import org.objectweb.transaction.api.event.PublishFeature;
@@ -41,13 +41,13 @@
/**
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
* @created 11 juil. 2005
- * @modified $Date: 2005/08/12 12:31:23 $
- * @version $Revision: 1.2 $
+ * @modified $Date: 2005/08/16 13:36:18 $
+ * @version $Revision: 1.3 $
* @fractal.itf
*/
public class SubscriberPool
extends LoggablePrimitive
- implements SubscriberProvider, SubscribeFeature, CacheController {
+ implements SubscriberProvider, SubscribeFeature, LifeCycleController
{
/**
* Map containing all the available <code>topics</code>.
*/
@@ -56,19 +56,19 @@
/* (non-Javadoc)
* @see org.objectweb.fractal.api.control.CacheController#getCacheState()
*/
- public String getCacheState() { return null; }
+ public String getFcState() { return null; }
/* (non-Javadoc)
* @see org.objectweb.fractal.api.control.CacheController#initFc()
*/
- public void initFc() {
+ public void startFc() {
// Ignored
}
/* (non-Javadoc)
* @see org.objectweb.fractal.api.control.CacheController#clearFc()
*/
- public void clearFc() {
+ public void stopFc() {
this.topics.clear() ;
}
@@ -126,13 +126,13 @@
* @see
org.objectweb.transaction.api.event.SubscribeFeature#subscribe(org.objectweb.transaction.api.event.PublishFeature)
*/
public void subscribe(PublishFeature suscriber) {
- subscribe(suscriber.getEvents(), suscriber);
+ subscribe(suscriber.events(), suscriber);
}
/* (non-Javadoc)
* @see
org.objectweb.transaction.api.event.SubscribeFeature#unsubscribe(org.objectweb.transaction.api.event.PublishFeature)
*/
public void unsubscribe(PublishFeature suscriber) {
- unsubscribe(suscriber.getEvents(), suscriber);
+ unsubscribe(suscriber.events(), suscriber);
}
}
\ No newline at end of file
Index: gotm/src/java/org/objectweb/gotm/lib/probe/ProbeAbstract.java
diff -u gotm/src/java/org/objectweb/gotm/lib/probe/ProbeAbstract.java:1.1
gotm/src/java/org/objectweb/gotm/lib/probe/ProbeAbstract.java:1.2
--- gotm/src/java/org/objectweb/gotm/lib/probe/ProbeAbstract.java:1.1 Fri
Aug 12 14:31:23 2005
+++ gotm/src/java/org/objectweb/gotm/lib/probe/ProbeAbstract.java Tue
Aug 16 15:36:18 2005
@@ -23,7 +23,7 @@
Contributor(s): .
---------------------------------------------------------------------
-$Id: ProbeAbstract.java,v 1.1 2005/08/12 12:31:23 rouvoy Exp $
+$Id: ProbeAbstract.java,v 1.2 2005/08/16 13:36:18 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm.lib.probe;
@@ -38,8 +38,8 @@
/**
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
* @created 3 août 2005
- * @modified $Date: 2005/08/12 12:31:23 $
- * @version $Revision: 1.1 $
+ * @modified $Date: 2005/08/16 13:36:18 $
+ * @version $Revision: 1.2 $
* @fractal.itf name="configurable" role="client"
signature="org.objectweb.gotm.lib.factory.Configurable"
*/
public abstract class ProbeAbstract
@@ -47,7 +47,7 @@
implements PublishFeature
{
/** <code>REFRESH</code> . */
- public static final int REFRESH = 2 ;
+ public static final int REFRESH = 5 ;
private final int refresh = REFRESH ;
private LinkedList occurrences = new LinkedList();
@@ -75,7 +75,7 @@
/**
* @return list of events to observe.
*/
- public abstract Event[] getEvents();
+ public abstract Event[] events();
/**
* @param topics the list of event observed.
Index: gotm/src/java/org/objectweb/gotm/lib/resource/ActionProvider.java
diff -u gotm/src/java/org/objectweb/gotm/lib/resource/ActionProvider.java:1.3
gotm/src/java/org/objectweb/gotm/lib/resource/ActionProvider.java:1.4
--- gotm/src/java/org/objectweb/gotm/lib/resource/ActionProvider.java:1.3
Mon Jul 18 09:30:10 2005
+++ gotm/src/java/org/objectweb/gotm/lib/resource/ActionProvider.java Tue
Aug 16 15:36:17 2005
@@ -23,7 +23,7 @@
Contributor(s): .
---------------------------------------------------------------------
-$Id: ActionProvider.java,v 1.3 2005/07/18 07:30:10 rouvoy Exp $
+$Id: ActionProvider.java,v 1.4 2005/08/16 13:36:17 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm.lib.resource;
@@ -33,8 +33,8 @@
* Interface providing all the actions handled by a kind of resource.
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
* @created 4 juil. 2005
- * @modified $Date: 2005/07/18 07:30:10 $
- * @version $Revision: 1.3 $
+ * @modified $Date: 2005/08/16 13:36:17 $
+ * @version $Revision: 1.4 $
* @fractal.itf name="action-provider"
*/
public interface ActionProvider {
@@ -46,11 +46,11 @@
* @param name the transaction status identifier.
* @return the action associated to the transaction status.
*/
- Action getAction(Event name);
+ Action action(Event name);
/**
* Provides the list of transaction status handled.
* @return the list of handled events.
*/
- Event[] getEvents() ;
+ Event[] events() ;
}
\ No newline at end of file
Index:
gotm/src/java/org/objectweb/gotm/lib/resource/ActionProviderAbstract.java
diff -u
gotm/src/java/org/objectweb/gotm/lib/resource/ActionProviderAbstract.java:1.3
gotm/src/java/org/objectweb/gotm/lib/resource/ActionProviderAbstract.java:1.4
---
gotm/src/java/org/objectweb/gotm/lib/resource/ActionProviderAbstract.java:1.3
Fri Aug 5 17:06:29 2005
+++ gotm/src/java/org/objectweb/gotm/lib/resource/ActionProviderAbstract.java
Tue Aug 16 15:36:18 2005
@@ -23,7 +23,7 @@
Contributor(s): .
---------------------------------------------------------------------
-$Id: ActionProviderAbstract.java,v 1.3 2005/08/05 15:06:29 rouvoy Exp $
+$Id: ActionProviderAbstract.java,v 1.4 2005/08/16 13:36:18 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm.lib.resource;
@@ -36,8 +36,8 @@
/**
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
* @created 4 juil. 2005
- * @modified $Date: 2005/08/05 15:06:29 $
- * @version $Revision: 1.3 $
+ * @modified $Date: 2005/08/16 13:36:18 $
+ * @version $Revision: 1.4 $
* @fractal.itf
*/
public abstract class ActionProviderAbstract
@@ -59,7 +59,7 @@
*
* @see org.objectweb.gotm.lib.resource.ActionProvider#getEvents()
*/
- public Event[] getEvents() {
+ public Event[] events() {
Set events = this.actions.keySet();
return (Event[]) events.toArray(new Event[events.size()]);
}
@@ -74,7 +74,7 @@
/* (non-Javadoc)
* @see org.objectweb.gotm.lib.resource.ActionProvider#getAction(int)
*/
- public Action getAction(Event name) {
+ public Action action(Event name) {
Action a = (Action) this.actions.get(name);
// if (getLogger().isLoggable(DEBUG)) getLogger().log(DEBUG, "Loading
Action "+name+" as "+a);
if (a == null ) throw new NoActionAvailableException(name);
Index:
gotm/src/java/org/objectweb/gotm/lib/resource/NoActionAvailableException.java
diff -u
gotm/src/java/org/objectweb/gotm/lib/resource/NoActionAvailableException.java:1.1
gotm/src/java/org/objectweb/gotm/lib/resource/NoActionAvailableException.java:1.2
---
gotm/src/java/org/objectweb/gotm/lib/resource/NoActionAvailableException.java:1.1
Mon Jul 11 10:27:04 2005
+++
gotm/src/java/org/objectweb/gotm/lib/resource/NoActionAvailableException.java
Tue Aug 16 15:36:17 2005
@@ -23,7 +23,7 @@
Contributor(s): .
---------------------------------------------------------------------
-$Id: NoActionAvailableException.java,v 1.1 2005/07/11 08:27:04 rouvoy Exp $
+$Id: NoActionAvailableException.java,v 1.2 2005/08/16 13:36:17 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm.lib.resource;
@@ -33,8 +33,8 @@
/**
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
* @created 8 juil. 2005
- * @modified $Date: 2005/07/11 08:27:04 $
- * @version $Revision: 1.1 $
+ * @modified $Date: 2005/08/16 13:36:17 $
+ * @version $Revision: 1.2 $
*/
public class NoActionAvailableException
extends GoTMException {
@@ -42,6 +42,6 @@
* @param name the event raising the exception.
*/
public NoActionAvailableException(Event name) {
- super("No action available for the "+name.getLabel()+" event!");
+ super("No action available for the "+name.label()+" event!");
}
}
Index: gotm/src/java/org/objectweb/gotm/lib/resource/ResourceDelistEvent.java
diff -u
gotm/src/java/org/objectweb/gotm/lib/resource/ResourceDelistEvent.java:1.2
gotm/src/java/org/objectweb/gotm/lib/resource/ResourceDelistEvent.java:1.3
---
gotm/src/java/org/objectweb/gotm/lib/resource/ResourceDelistEvent.java:1.2
Mon Jul 18 16:33:35 2005
+++ gotm/src/java/org/objectweb/gotm/lib/resource/ResourceDelistEvent.java
Tue Aug 16 15:36:17 2005
@@ -23,7 +23,7 @@
Contributor(s): .
---------------------------------------------------------------------
-$Id: ResourceDelistEvent.java,v 1.2 2005/07/18 14:33:35 rouvoy Exp $
+$Id: ResourceDelistEvent.java,v 1.3 2005/08/16 13:36:17 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm.lib.resource;
@@ -33,8 +33,8 @@
/**
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
* @created 13 juil. 2005
- * @modified $Date: 2005/07/18 14:33:35 $
- * @version $Revision: 1.2 $
+ * @modified $Date: 2005/08/16 13:36:17 $
+ * @version $Revision: 1.3 $
*/
public class ResourceDelistEvent
extends EventAbstract {
@@ -51,7 +51,7 @@
/* (non-Javadoc)
* @see org.objectweb.transaction.lib.event.EventAbstract#getEvent()
*/
- public Event getEvent() {
+ public Event event() {
return event;
}
}
\ No newline at end of file
Index: gotm/src/java/org/objectweb/gotm/lib/resource/ResourceEnlistEvent.java
diff -u
gotm/src/java/org/objectweb/gotm/lib/resource/ResourceEnlistEvent.java:1.2
gotm/src/java/org/objectweb/gotm/lib/resource/ResourceEnlistEvent.java:1.3
---
gotm/src/java/org/objectweb/gotm/lib/resource/ResourceEnlistEvent.java:1.2
Mon Jul 18 16:33:35 2005
+++ gotm/src/java/org/objectweb/gotm/lib/resource/ResourceEnlistEvent.java
Tue Aug 16 15:36:17 2005
@@ -23,7 +23,7 @@
Contributor(s): .
---------------------------------------------------------------------
-$Id: ResourceEnlistEvent.java,v 1.2 2005/07/18 14:33:35 rouvoy Exp $
+$Id: ResourceEnlistEvent.java,v 1.3 2005/08/16 13:36:17 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm.lib.resource;
@@ -33,8 +33,8 @@
/**
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
* @created 13 juil. 2005
- * @modified $Date: 2005/07/18 14:33:35 $
- * @version $Revision: 1.2 $
+ * @modified $Date: 2005/08/16 13:36:17 $
+ * @version $Revision: 1.3 $
*/
public class ResourceEnlistEvent
extends EventAbstract {
@@ -51,7 +51,7 @@
/* (non-Javadoc)
* @see org.objectweb.transaction.lib.event.EventAbstract#getEvent()
*/
- public Event getEvent() {
+ public Event event() {
return event;
}
}
\ No newline at end of file
Index: gotm/src/java/org/objectweb/gotm/lib/resource/ResourceManager.java
diff -u
gotm/src/java/org/objectweb/gotm/lib/resource/ResourceManager.java:1.1
gotm/src/java/org/objectweb/gotm/lib/resource/ResourceManager.java:1.2
--- gotm/src/java/org/objectweb/gotm/lib/resource/ResourceManager.java:1.1
Mon Jul 4 15:02:09 2005
+++ gotm/src/java/org/objectweb/gotm/lib/resource/ResourceManager.java Tue
Aug 16 15:36:18 2005
@@ -23,31 +23,36 @@
Contributor(s): .
---------------------------------------------------------------------
-$Id: ResourceManager.java,v 1.1 2005/07/04 13:02:09 rouvoy Exp $
+$Id: ResourceManager.java,v 1.2 2005/08/16 13:36:18 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm.lib.resource;
/**
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
* @created 27 janv. 2005
- * @modified $Date: 2005/07/04 13:02:09 $
- * @version $Revision: 1.1 $
+ * @modified $Date: 2005/08/16 13:36:18 $
+ * @version $Revision: 1.2 $
* @fractal.itf name="resource"
*/
public interface ResourceManager {
/** Fractal ADL Identifier for the <code>ResourceManager</code>
interface. */
- public static final String RESOURCE = "resource";
+ static final String RESOURCE = "resource";
/**
* Register the resource.
* @param res the resource to register.
*/
- public void addResource(Object res);
+ void addResource(Object res);
/**
* Unregister the resource.
* @param res the resource to unregister.
*/
- public void delResource(Object res);
+ void delResource(Object res);
+
+ /**
+ * @return the list of registered resources.
+ */
+ Object[] listResources();
}
Index:
gotm/src/java/org/objectweb/gotm/lib/resource/ResourceManagerAbstract.java
diff -u
gotm/src/java/org/objectweb/gotm/lib/resource/ResourceManagerAbstract.java:1.4
gotm/src/java/org/objectweb/gotm/lib/resource/ResourceManagerAbstract.java:1.5
---
gotm/src/java/org/objectweb/gotm/lib/resource/ResourceManagerAbstract.java:1.4
Fri Aug 12 14:31:22 2005
+++
gotm/src/java/org/objectweb/gotm/lib/resource/ResourceManagerAbstract.java
Tue Aug 16 15:36:17 2005
@@ -23,16 +23,17 @@
Contributor(s): .
---------------------------------------------------------------------
-$Id: ResourceManagerAbstract.java,v 1.4 2005/08/12 12:31:22 rouvoy Exp $
+$Id: ResourceManagerAbstract.java,v 1.5 2005/08/16 13:36:17 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm.lib.resource;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
-import java.util.Vector;
+import org.objectweb.fractal.api.control.CacheController;
import org.objectweb.gotm.lib.event.SubscribablePrimitive;
import org.objectweb.gotm.lib.transaction.InvalidStateException;
import org.objectweb.transaction.api.event.Event;
@@ -44,14 +45,14 @@
/**
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
* @created 4 juil. 2005
- * @modified $Date: 2005/08/12 12:31:22 $
- * @version $Revision: 1.4 $
+ * @modified $Date: 2005/08/16 13:36:17 $
+ * @version $Revision: 1.5 $
* @fractal.itf name="action-provider" role="client"
signature="org.objectweb.gotm.lib.resource.ActionProvider"
* @fractal.itf name="tx-state" role="client"
signature="org.objectweb.transaction.api.transaction.TransactionState"
*/
public abstract class ResourceManagerAbstract
extends SubscribablePrimitive
-implements ResourceManager,PublishFeature {
+implements ResourceManager,PublishFeature,CacheController {
/** <code>RESOURCE_ADDED</code> . */
public static final String RESOURCE_ADDED = "resource-added";
@@ -59,8 +60,8 @@
public static final String RESOURCE_REMOVED = "resource-removed";
/** list of registered added for this kind of wrapper. */
- protected final Collection added = new Vector();
- protected final Collection removed = new Vector();
+ protected final Collection added = new ArrayList();
+ protected final Collection removed = new ArrayList();
protected final Map context = new HashMap();
protected Action enlist ;
protected Action delist ;
@@ -96,8 +97,8 @@
/* (non-Javadoc)
* @see org.objectweb.gotm.lib.event.SubscribablePrimitive#getEvents()
*/
- public Event[] getEvents() {
- return actionProvider().getEvents();
+ public Event[] events() {
+ return actionProvider().events();
}
/*
@@ -105,27 +106,38 @@
*
* @see org.objectweb.fractal.api.control.CacheController#initFc()
*/
- public void initFc() {
- super.initFc();
+ public void startFc() {
+ super.startFc();
try {
- this.enlist =
actionProvider().getAction(ResourceEnlistEvent.event);
+ this.enlist = actionProvider().action(ResourceEnlistEvent.event);
} catch (NoActionAvailableException e) {
// ignored
}
try {
- this.delist =
actionProvider().getAction(ResourceDelistEvent.event);
+ this.delist = actionProvider().action(ResourceDelistEvent.event);
} catch (NoActionAvailableException e) {
// ignored
}
}
+
+ /* (non-Javadoc)
+ * @see org.objectweb.fractal.api.control.CacheController#getCacheState()
+ */
+ public String getCacheState() {
+ return null;
+ }
- /*
- * (non-Javadoc)
- *
+ /* (non-Javadoc)
+ * @see org.objectweb.fractal.api.control.CacheController#initFc()
+ */
+ public void initFc() {
+ // empty
+ }
+
+ /* (non-Javadoc)
* @see org.objectweb.fractal.api.control.CacheController#clearFc()
*/
public void clearFc() {
- super.clearFc();
this.added.clear();
this.removed.clear();
}
@@ -168,10 +180,17 @@
}
/* (non-Javadoc)
+ * @see org.objectweb.gotm.lib.resource.ResourceManager#listResources()
+ */
+ public Object[] listResources() {
+ return this.added.toArray();
+ }
+
+ /* (non-Javadoc)
* @see org.objectweb.transaction.api.event.PublishFeature#notify(int,
java.util.Map)
*/
public synchronized void notify(Event topic, Map context1) {
- Action action = actionProvider().getAction(topic);
+ Action action = actionProvider().action(topic);
// if (getLogger().isLoggable(DEBUG))
// getLogger().log(DEBUG, "Executing topic "+topic+" on resources
("+this.added.size()+", "+this.removed.size()+") with action "+action);
for (Iterator i = this.added.iterator() ; i.hasNext() ;)
Index:
gotm/src/java/org/objectweb/gotm/lib/resource/ResourceManagerWithThread.java
diff -u
gotm/src/java/org/objectweb/gotm/lib/resource/ResourceManagerWithThread.java:1.2
gotm/src/java/org/objectweb/gotm/lib/resource/ResourceManagerWithThread.java:1.3
---
gotm/src/java/org/objectweb/gotm/lib/resource/ResourceManagerWithThread.java:1.2
Mon Jul 18 09:30:10 2005
+++
gotm/src/java/org/objectweb/gotm/lib/resource/ResourceManagerWithThread.java
Tue Aug 16 15:36:17 2005
@@ -23,7 +23,7 @@
Contributor(s): .
---------------------------------------------------------------------
- $Id: ResourceManagerWithThread.java,v 1.2 2005/07/18 07:30:10 rouvoy Exp $
+ $Id: ResourceManagerWithThread.java,v 1.3 2005/08/16 13:36:17 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm.lib.resource;
@@ -40,8 +40,8 @@
*
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
* @created 22 déc. 2004
- * @modified $Date: 2005/07/18 07:30:10 $
- * @version $Revision: 1.2 $
+ * @modified $Date: 2005/08/16 13:36:17 $
+ * @version $Revision: 1.3 $
* @fractal.itf
*/
public class ResourceManagerWithThread
@@ -51,7 +51,7 @@
* @see
org.objectweb.transaction.api.event.PublishFeature#notify(int,java.util.Map)
*/
public void notify(Event topic, Map context1) {
- Action action = actionProvider().getAction(topic);
+ Action action = actionProvider().action(topic);
Collection threads = new ArrayList();
for (Iterator i = this.added.iterator(); i.hasNext();) {
Index:
gotm/src/java/org/objectweb/gotm/lib/transaction/TransactionStateImpl.java
diff -u
gotm/src/java/org/objectweb/gotm/lib/transaction/TransactionStateImpl.java:1.13
gotm/src/java/org/objectweb/gotm/lib/transaction/TransactionStateImpl.java:1.14
---
gotm/src/java/org/objectweb/gotm/lib/transaction/TransactionStateImpl.java:1.13
Fri Aug 5 17:06:29 2005
+++
gotm/src/java/org/objectweb/gotm/lib/transaction/TransactionStateImpl.java
Tue Aug 16 15:36:18 2005
@@ -23,7 +23,7 @@
Contributor(s): .
---------------------------------------------------------------------
- $Id: TransactionStateImpl.java,v 1.13 2005/08/05 15:06:29 rouvoy Exp $
+ $Id: TransactionStateImpl.java,v 1.14 2005/08/16 13:36:18 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm.lib.transaction;
@@ -43,8 +43,8 @@
*
* @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.13 $
+ * @modified $Date: 2005/08/16 13:36:18 $
+ * @version $Revision: 1.14 $
* @fractal.itf
*/
public class TransactionStateImpl
@@ -79,7 +79,7 @@
* @see
org.objectweb.gotm.api.transaction.TransactionState#setStatus(org.objectweb.gotm.api.transaction.Status)
*/
public void setStatus(TransactionStatus status) {
- getPublisher().notify(this.status_.getLeavingEvent(), context);
+ getPublisher().notify(this.status_.leavingEvent(), context);
this.status_ = status;
getPublisher().notify(status, context);
}
| <-- Date Index --> | <-- Thread Index --> |
Powered by MHonArc.
Copyright © 2006-2007, OW2 Consortium | contact | webmaster.