Mail Archive Home | gotm-commits List | January 2005 Index
| <-- Date Index --> | <-- Thread Index --> |
Date: Friday, January 14, 2005 @ 17:56:04
Author: rouvoy
Path: /cvsroot/gotm/gotm-jts
Added: example/benchmark/.cvsignore example/benchmark/build.xml
example/benchmark/lib/carol/carol.jar
example/benchmark/lib/cli/commons-cli.jar
example/benchmark/lib/cli/commons-logging.jar
example/benchmark/lib/jotm/jonas_timer.jar
example/benchmark/lib/jotm/jotm.jar
example/benchmark/lib/jotm/jotm_iiop_stubs.jar
example/benchmark/lib/jotm/jotm_jrmp_stubs.jar
example/benchmark/lib/log4j/log4j.jar
example/benchmark/lib/spec/jta-spec1_0_1.jar
example/benchmark/lib/spec/jts1_0.jar
example/benchmark/lib/xapool/objectweb-datasource.jar
example/benchmark/lib/xapool/xapool.jar
example/benchmark/src/config/benchmark.xml
example/benchmark/src/fractal/org/objectweb/gotm/jts/benchmark/FcApplication.fractal
example/benchmark/src/fractal/org/objectweb/gotm/jts/benchmark/FcExplorer.fractal
example/benchmark/src/fractal/org/objectweb/gotm/lib/FcExplorerImpl.fractal
example/benchmark/src/fractal/org/objectweb/gotm/lib/FcTransactionManagerImpl.fractal
example/benchmark/src/fractal/org/objectweb/gotm/lib/TpActivationImpl.fractal
example/benchmark/src/fractal/org/objectweb/gotm/lib/TpCoordinatorImpl.fractal
example/benchmark/src/fractal/org/objectweb/gotm/lib/TpInterruptionImpl.fractal
example/benchmark/src/fractal/org/objectweb/gotm/lib/TpJTSImpl.fractal
example/benchmark/src/fractal/org/objectweb/gotm/lib/TpManagerImpl.fractal
example/benchmark/src/fractal/org/objectweb/gotm/lib/TpTerminatorImpl.fractal
example/benchmark/src/fractal/org/objectweb/gotm/lib/TpTransactionImpl.fractal
example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/ClientAttributes.java
example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/Counter.java
example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/CounterAttributes.java
example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/CounterImpl.java
example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/InvokeRunnableAction.java
example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/JtaClient.java
example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/Timer.java
Modified: .classpath .settings/org.eclipse.core.resources.prefs build.xml
example/local/src/java/org/objectweb/gotm/jts/local/CounterImpl.java
example/local/src/java/org/objectweb/gotm/jts/local/JtaClient.java
src/java/org/objectweb/gotm/lib/jta/SynchronizationImpl.java
src/java/org/objectweb/gotm/lib/jta/TransactionImpl.java
src/java/org/objectweb/gotm/lib/jta/TransactionManagerImpl.java
src/java/org/objectweb/gotm/lib/jta/WrapperImpl.java
src/java/org/objectweb/gotm/lib/jta/XAResourceImpl.java
* Adding benchmark example between GoTM and JOTM.
---------------------------------------------------------------------------------------+
.classpath
| 13
.settings/org.eclipse.core.resources.prefs
| 45 -
build.xml
| 7
example/benchmark/.cvsignore
| 1
example/benchmark/build.xml
| 143 +++++
example/benchmark/lib/carol/carol.jar
| <<Binary file>>
example/benchmark/lib/cli/commons-cli.jar
| <<Binary file>>
example/benchmark/lib/cli/commons-logging.jar
| <<Binary file>>
example/benchmark/lib/jotm/jonas_timer.jar
| <<Binary file>>
example/benchmark/lib/jotm/jotm.jar
| <<Binary file>>
example/benchmark/lib/jotm/jotm_iiop_stubs.jar
| <<Binary file>>
example/benchmark/lib/jotm/jotm_jrmp_stubs.jar
| <<Binary file>>
example/benchmark/lib/log4j/log4j.jar
| <<Binary file>>
example/benchmark/lib/spec/jta-spec1_0_1.jar
| <<Binary file>>
example/benchmark/lib/spec/jts1_0.jar
| <<Binary file>>
example/benchmark/lib/xapool/objectweb-datasource.jar
| <<Binary file>>
example/benchmark/lib/xapool/xapool.jar
| <<Binary file>>
example/benchmark/src/config/benchmark.xml
| 18
example/benchmark/src/fractal/org/objectweb/gotm/jts/benchmark/FcApplication.fractal
| 24
example/benchmark/src/fractal/org/objectweb/gotm/jts/benchmark/FcExplorer.fractal
| 14
example/benchmark/src/fractal/org/objectweb/gotm/lib/FcExplorerImpl.fractal
| 14
example/benchmark/src/fractal/org/objectweb/gotm/lib/FcTransactionManagerImpl.fractal
| 19
example/benchmark/src/fractal/org/objectweb/gotm/lib/TpActivationImpl.fractal
| 21
example/benchmark/src/fractal/org/objectweb/gotm/lib/TpCoordinatorImpl.fractal
| 30 +
example/benchmark/src/fractal/org/objectweb/gotm/lib/TpInterruptionImpl.fractal
| 21
example/benchmark/src/fractal/org/objectweb/gotm/lib/TpJTSImpl.fractal
| 40 +
example/benchmark/src/fractal/org/objectweb/gotm/lib/TpManagerImpl.fractal
| 38 +
example/benchmark/src/fractal/org/objectweb/gotm/lib/TpTerminatorImpl.fractal
| 57 ++
example/benchmark/src/fractal/org/objectweb/gotm/lib/TpTransactionImpl.fractal
| 45 +
example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/ClientAttributes.java
| 61 ++
example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/Counter.java
| 55 +
example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/CounterAttributes.java
| 53 +
example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/CounterImpl.java
| 211 +++++++
example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/InvokeRunnableAction.java
| 79 ++
example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/JtaClient.java
| 284 ++++++++++
example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/Timer.java
| 74 ++
example/local/src/java/org/objectweb/gotm/jts/local/CounterImpl.java
| 8
example/local/src/java/org/objectweb/gotm/jts/local/JtaClient.java
| 7
src/java/org/objectweb/gotm/lib/jta/SynchronizationImpl.java
| 24
src/java/org/objectweb/gotm/lib/jta/TransactionImpl.java
| 14
src/java/org/objectweb/gotm/lib/jta/TransactionManagerImpl.java
| 46 +
src/java/org/objectweb/gotm/lib/jta/WrapperImpl.java
| 37 -
src/java/org/objectweb/gotm/lib/jta/XAResourceImpl.java
| 10
43 files changed, 1421 insertions(+), 92 deletions(-)
Index: gotm-jts/.classpath
diff -u gotm-jts/.classpath:1.2 gotm-jts/.classpath:1.3
--- gotm-jts/.classpath:1.2 Mon Jan 10 17:17:31 2005
+++ gotm-jts/.classpath Fri Jan 14 17:56:03 2005
@@ -1,22 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/java"/>
+ <classpathentry kind="src" path="example/benchmark/src/fractal"/>
+ <classpathentry kind="src" path="example/benchmark/src/java"/>
<classpathentry kind="src" path="example/local/src/java"/>
<classpathentry kind="src" path="example/local/src/fractal"/>
- <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="src" path="test/java"/>
+ <classpathentry kind="src" path="/ow-transaction"/>
<classpathentry kind="src" path="/gotm"/>
+ <classpathentry kind="src" path="/gotm-explorer"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="externals/jta/jta-1_01.jar"/>
+ <classpathentry kind="lib"
path="/gotm/lib/fractal-template/fractal-template.jar"/>
<classpathentry kind="lib"
path="E:/rouvoy/Mes-workspaces/gotm-workspace/gotm/lib/fractal/fractal.jar"/>
- <classpathentry kind="src" path="/ow-transaction"/>
<classpathentry kind="lib"
path="E:/rouvoy/Mes-workspaces/gotm-workspace/gotm/lib/fractal-adl/fractal-adl.jar"/>
<classpathentry kind="lib"
path="E:/rouvoy/Mes-workspaces/gotm-workspace/gotm/lib/monolog/ow_monolog.jar"/>
<classpathentry kind="lib"
path="E:/rouvoy/Mes-workspaces/gotm-workspace/gotm-explorer/lib/fractal-explorer/fractal-plugin.jar"/>
<classpathentry kind="lib"
path="E:/rouvoy/Mes-workspaces/gotm-workspace/gotm-explorer/lib/fractal-explorer/fractal-browser.jar"/>
<classpathentry kind="lib"
path="E:/rouvoy/Mes-workspaces/gotm-workspace/gotm-explorer/lib/fractal-explorer/browser.jar"/>
- <classpathentry kind="src" path="/gotm-explorer"/>
- <classpathentry kind="src" path="test/java"/>
<classpathentry kind="lib"
path="E:/rouvoy/Mes-workspaces/gotm-workspace/gotm/lib/utils/ow_util_trace.jar"/>
<classpathentry kind="lib"
path="E:/rouvoy/Mes-workspaces/gotm-workspace/gotm/lib/fractal-rmi/fractal-rmi.jar"/>
- <classpathentry kind="lib"
path="/gotm/lib/fractal-template/fractal-template.jar"/>
+ <classpathentry kind="lib"
path="example/benchmark/lib/jotm/jotm.jar"/>
<classpathentry kind="output" path="build/class"/>
</classpath>
Index: gotm-jts/.settings/org.eclipse.core.resources.prefs
diff -u gotm-jts/.settings/org.eclipse.core.resources.prefs:1.1
gotm-jts/.settings/org.eclipse.core.resources.prefs:1.2
--- gotm-jts/.settings/org.eclipse.core.resources.prefs:1.1 Mon Jan 10
17:17:31 2005
+++ gotm-jts/.settings/org.eclipse.core.resources.prefs Fri Jan 14 17:56:03
2005
@@ -1,35 +1,18 @@
-#Mon Jan 10 16:35:10 CET 2005
-encoding//example/local/build/class/org/objectweb/gotm/lib/transaction/TpTransactionActivationFeatureImpl.fractal=ISO-8859-1
-encoding//example/local/src/fractal/org/objectweb/gotm/lib/TpTerminatorImpl.fractal=ISO-8859-1
-encoding//example/local/build/class/org/objectweb/gotm/lib/coordination/FcAbstractCoordinationFeature.fractal=UTF-8
-encoding//example/local/build/class/org/objectweb/gotm/lib/coordination/FcAtomicTwoPCCoordinationFeature.fractal=ISO-8859-1
-encoding//example/local/build/class/org/objectweb/gotm/lib/coordination/FcOnePCCoordinationFeature.fractal=ISO-8859-1
+#Wed Jan 12 09:45:40 CET 2005
encoding//example/local/src/fractal/org/objectweb/gotm/lib/TpJTSImpl.fractal=ISO-8859-1
-encoding//example/local/src/fractal/org/objectweb/gotm/lib/TpInterruptionImpl.fractal=ISO-8859-1
-encoding//example/local/build/class/org/objectweb/transaction/api/FcFeature.fractal=ISO-8859-1
-encoding//example/local/src/fractal/org/objectweb/gotm/jts/local/FcExplorer.fractal=ISO-8859-1
-encoding//example/local/src/fractal/org/objectweb/gotm/lib/TpActivationImpl.fractal=ISO-8859-1
-encoding//example/local/build/class/org/objectweb/gotm/lib/jta/TpTransactionImpl.fractal=ISO-8859-1
-encoding//example/local/build/class/org/objectweb/gotm/lib/transaction/TpTransactionStateImpl.fractal=ISO-8859-1
-eclipse.preferences.version=1
-encoding//example/local/build/class/org/objectweb/gotm/lib/TpCoordinatorImpl.fractal=ISO-8859-1
-encoding//example/local/src/fractal/org/objectweb/gotm/lib/TpCoordinatorImpl.fractal=ISO-8859-1
-encoding//example/local/build/class/org/objectweb/transaction/api/event/FcSubscribeFeature.fractal=ISO-8859-1
-encoding//example/local/build/class/org/objectweb/gotm/lib/coordination/FcStatusChecker.fractal=ISO-8859-1
-encoding//example/local/build/class/org/objectweb/gotm/lib/coordination/FcRollbackCoordinationFeature.fractal=ISO-8859-1
-encoding//example/local/build/class/org/objectweb/gotm/lib/TpTransactionImpl.fractal=ISO-8859-1
-encoding//example/local/build/class/org/objectweb/gotm/lib/coordination/FcDaemonImpl.fractal=ISO-8859-1
-encoding//example/local/src/fractal/org/objectweb/gotm/lib/TpTransactionImpl.fractal=ISO-8859-1
-encoding//example/local/build/class/org/objectweb/gotm/lib/transaction/FcTransactionStateImpl.fractal=UTF-8
-encoding//example/local/build/class/org/objectweb/gotm/lib/coordination/TpDaemonImpl.fractal=ISO-8859-1
-encoding//example/local/src/fractal/org/objectweb/gotm/lib/FcTransactionManagerImpl.fractal=ISO-8859-1
-encoding//example/local/build/class/org/objectweb/transaction/api/event/FcPublishFeature.fractal=ISO-8859-1
-encoding//example/local/build/class/org/objectweb/transaction/api/coordination/FcCoordinationFeature.fractal=ISO-8859-1
-encoding//example/local/build/class/org/objectweb/gotm/lib/event/FcTopicManagerImpl.fractal=UTF-8
-encoding//example/local/build/class/org/objectweb/transaction/api/transaction/FcTransactionStatusFeature.fractal=ISO-8859-1
-encoding//example/local/build/class/org/objectweb/gotm/lib/transaction/FcTransactionActivationFeatureImpl.fractal=ISO-8859-1
+encoding//example/benchmark/src/fractal/org/objectweb/gotm/lib/TpTerminatorImpl.fractal=ISO-8859-1
encoding//example/local/src/fractal/org/objectweb/gotm/jts/local/FcApplication.fractal=ISO-8859-1
encoding//example/local/src/fractal/org/objectweb/gotm/lib/TpManagerImpl.fractal=ISO-8859-1
-encoding//example/local/build/class/org/objectweb/gotm/lib/transaction/FcTransactionInterruptionFeatureImpl.fractal=ISO-8859-1
-encoding//example/local/build/class/org/objectweb/gotm/lib/TpTerminatorImpl.fractal=ISO-8859-1
+encoding//example/local/src/fractal/org/objectweb/gotm/lib/TpActivationImpl.fractal=ISO-8859-1
+encoding//example/benchmark/src/fractal/org/objectweb/gotm/jts/benchmark/FcExplorer.fractal=ISO-8859-1
+encoding//example/local/src/fractal/org/objectweb/gotm/lib/TpTransactionImpl.fractal=ISO-8859-1
+encoding//example/local/src/fractal/org/objectweb/gotm/lib/TpInterruptionImpl.fractal=ISO-8859-1
encoding//example/local/src/fractal/org/objectweb/gotm/lib/FcExplorerImpl.fractal=ISO-8859-1
+encoding//example/local/src/fractal/org/objectweb/gotm/lib/FcTransactionManagerImpl.fractal=ISO-8859-1
+encoding//example/benchmark/src/fractal/org/objectweb/gotm/lib/FcExplorerImpl.fractal=ISO-8859-1
+encoding//example/benchmark/src/fractal/org/objectweb/gotm/jts/benchmark/FcApplication.fractal=ISO-8859-1
+encoding//example/benchmark/src/fractal/org/objectweb/gotm/lib/TpCoordinatorImpl.fractal=ISO-8859-1
+encoding//example/local/src/fractal/org/objectweb/gotm/lib/TpCoordinatorImpl.fractal=ISO-8859-1
+eclipse.preferences.version=1
+encoding//example/local/src/fractal/org/objectweb/gotm/jts/local/FcExplorer.fractal=ISO-8859-1
+encoding//example/local/src/fractal/org/objectweb/gotm/lib/TpTerminatorImpl.fractal=ISO-8859-1
Index: gotm-jts/build.xml
diff -u gotm-jts/build.xml:1.2 gotm-jts/build.xml:1.3
--- gotm-jts/build.xml:1.2 Mon Jan 10 17:17:31 2005
+++ gotm-jts/build.xml Fri Jan 14 17:56:03 2005
@@ -21,7 +21,7 @@
<!-- Initial developer(s): Romain Rouvoy. -->
<!-- Contributor(s): ______________________________________. -->
-<!-- $Id: build.xml,v 1.2 2005/01/10 16:17:31 rouvoy Exp $ -->
+<!-- $Id: build.xml,v 1.3 2005/01/14 16:56:03 rouvoy Exp $ -->
<!-- ==================================================================== -->
<project name="gotm-jts" default="jts-all">
@@ -114,7 +114,10 @@
<target name="jts-build" depends="jts-fractal"
description="build GoTM Java personalities">
<jar destfile="${build.dir}/${lib.dir}/${gotm.jar}">
- <fileset dir="${build.dir}/${class.dir}" includes="**/*"/>
+ <fileset dir="${build.dir}/${class.dir}">
+ <include name="**/*"/>
+ <exclude name="org/objectweb/transaction/**/*.class"/>
+ </fileset>
</jar>
</target>
Index: gotm-jts/example/benchmark/.cvsignore
diff -u /dev/null gotm-jts/example/benchmark/.cvsignore:1.1
--- /dev/null Fri Jan 14 17:56:04 2005
+++ gotm-jts/example/benchmark/.cvsignore Fri Jan 14 17:56:03 2005
@@ -0,0 +1 @@
+build
Index: gotm-jts/example/benchmark/build.xml
diff -u /dev/null gotm-jts/example/benchmark/build.xml:1.1
--- /dev/null Fri Jan 14 17:56:04 2005
+++ gotm-jts/example/benchmark/build.xml Fri Jan 14 17:56:03 2005
@@ -0,0 +1,143 @@
+<!-- ==================================================================== -->
+
+<!-- ObjectWeb GoTM is an open Tx Monitor Project -->
+<!-- Contact: http://www.objectweb.org -->
+
+<!-- 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: build.xml,v 1.1 2005/01/14 16:56:03 rouvoy Exp $ -->
+<!-- ==================================================================== -->
+
+<project name="gotm-jts-benchmark" default="bench-all">
+ <description>GoTM JTS Benchmark [gotm.objectweb.org] - GoTM is an open
Transaction Monitor</description>
+
+ <property name="src.dir" value="src"/>
+ <property name="java.dir" value="${src.dir}/java"/>
+ <property name="cfg.dir" value="${src.dir}/config"/>
+
+ <property name="ant.dir" value="ant"/>
+ <property name="fractal.dir" value="fractal"/>
+ <property name="class.dir" value="class"/>
+ <property name="lib.dir" value="lib"/>
+ <property name="julia.dir" value="julia"/>
+
+ <property name="build.dir" value="${basedir}/build"/>
+
+ <property name="examples.jar" value="ow-gotm-jts-benchmark.jar"/>
+ <property name="examples.version" value="0.1a"/>
+ <property name="dist.name" value="GoTM-JTS-Benchmark"/>
+
+ <path id="classpath">
+ <fileset dir="${build.dir}/${lib.dir}" includes="**/*.jar"/>
+ <pathelement location="${build.dir}/${class.dir}"/>
+ </path>
+
+
+
+ <target name="bench-all" description="bench-clean + bench-run">
+ <antcall target="bench-clean"/>
+ <antcall target="bench-run"/>
+ </target>
+
+
+ <target name="-bench-prepare">
+ <ant dir="${basedir}/../.." target="jts-build"/>
+ <copy todir="${build.dir}/${lib.dir}">
+ <mapper type="flatten"/>
+ <fileset dir="${basedir}/${lib.dir}" includes="**/*.*"/>
+ </copy>
+ <copy todir="${build.dir}/${class.dir}">
+ <fileset dir="${basedir}/${cfg.dir}" includes="**/*"/>
+ </copy>
+ </target>
+
+ <target name="bench-compile" depends="-bench-prepare">
+ <javac srcdir="${basedir}/${java.dir}"
+ destdir="${build.dir}/${class.dir}"
+ debug="on">
+ <classpath refid="classpath"/>
+ <include name="**/*.java"/>
+ </javac>
+ </target>
+
+ <target name="-doclet-init">
+ <taskdef name="xdoclet" classname="xdoclet.DocletTask">
+ <classpath>
+ <fileset dir="${build.dir}/${ant.dir}" includes="*.jar"/>
+ <fileset dir="${build.dir}/${lib.dir}" includes="*.jar"/>
+ </classpath>
+ </taskdef>
+ </target>
+
+ <target name="bench-doclet" depends="-bench-prepare,-doclet-init"
+ description="Generates GoTM ADL file with xdoclet">
+ <mkdir dir="${build.dir}/${class.dir}"/>
+ <xdoclet destdir="${build.dir}/${class.dir}"
+ excludedtags="@version,@author,@todo">
+ <fileset dir="${basedir}/${java.dir}"
+ includes="org/objectweb/gotm/**/*.java"/>
+ <fractal-primitive/>
+ <fractal-template/>
+ </xdoclet>
+ </target>
+
+ <target name="bench-fractal" depends="bench-doclet,bench-compile">
+ <copy todir="${build.dir}/${class.dir}" failonerror="false">
+ <fileset dir="${basedir}/${src.dir}/${fractal.dir}">
+ <include name="**/*.fractal"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="bench-build" depends="bench-fractal"
+ description="build local JTS example">
+ <mkdir dir="${build.dir}/${lib.dir}"/>
+ <jar destfile="${build.dir}/${lib.dir}/${examples.jar}">
+ <fileset dir="${build.dir}/${class.dir}" includes="**/*"/>
+ </jar>
+ </target>
+
+ <target name="bench-run" depends="bench-build"
+ description="run local JTS example">
+ <property name="julia.cfg" value="${build.dir}/${julia.dir}/julia.cfg"/>
+ <property name="gotm.cfg" value="${build.dir}/${julia.dir}/gotm.cfg"/>
+ <java classname="org.objectweb.fractal.adl.Launcher"
+ classpathref="classpath"
+ fork="yes"
+ failonerror="yes">
+ <sysproperty key="fractal.provider"
+ value="org.objectweb.fractal.julia.Julia"/>
+ <sysproperty key="julia.loader"
+ value="org.objectweb.fractal.julia.loader.DynamicLoader" />
+ <sysproperty key="julia.config"
+ value="${julia.cfg},${gotm.cfg}" />
+ <jvmarg line="-Xbootclasspath/p:${build.dir}/${lib.dir}/thread.jar"/>
+ <arg line="-fractal org.objectweb.gotm.jts.benchmark.FcApplication
r"/>
+<!-- <arg line="-fractal org.objectweb.gotm.lib.xid.FcXidStateFctr r"/> -->
+ </java>
+ </target>
+
+ <property name="julia.cfg"
value="${build.dir}/${julia.dir}/julia.cfg"/>
+ <property name="gotm.cfg" value="${build.dir}/${julia.dir}/gotm.cfg"/>
+ <property name="policy" value="${build.dir}/${julia.dir}/java.policy"/>
+
+ <target name="bench-clean" description="clean JTS examples">
+ <delete dir="${build.dir}" failonerror="no"/>
+ </target>
+</project>
\ No newline at end of file
Index: gotm-jts/example/benchmark/lib/carol/carol.jar
cvs rdiff: failed to read diff file header /tmp/cvsHyc0GU for carol.jar,v:
end of file
Index: gotm-jts/example/benchmark/lib/cli/commons-cli.jar
cvs rdiff: failed to read diff file header /tmp/cvsmArDE3 for
commons-cli.jar,v: end of file
Index: gotm-jts/example/benchmark/lib/cli/commons-logging.jar
cvs rdiff: failed to read diff file header /tmp/cvsTXTBD4 for
commons-logging.jar,v: end of file
Index: gotm-jts/example/benchmark/lib/jotm/jonas_timer.jar
cvs rdiff: failed to read diff file header /tmp/cvsoUWjLY for
jonas_timer.jar,v: end of file
Index: gotm-jts/example/benchmark/lib/jotm/jotm.jar
cvs rdiff: failed to read diff file header /tmp/cvsX0byHZ for jotm.jar,v: end
of file
Index: gotm-jts/example/benchmark/lib/jotm/jotm_iiop_stubs.jar
cvs rdiff: failed to read diff file header /tmp/cvsOaMFM0 for
jotm_iiop_stubs.jar,v: end of file
Index: gotm-jts/example/benchmark/lib/jotm/jotm_jrmp_stubs.jar
cvs rdiff: failed to read diff file header /tmp/cvslovNS1 for
jotm_jrmp_stubs.jar,v: end of file
Index: gotm-jts/example/benchmark/lib/log4j/log4j.jar
cvs rdiff: failed to read diff file header /tmp/cvsk89lY9 for log4j.jar,v:
end of file
Index: gotm-jts/example/benchmark/lib/spec/jta-spec1_0_1.jar
cvs rdiff: failed to read diff file header /tmp/cvsx11wkc for
jta-spec1_0_1.jar,v: end of file
Index: gotm-jts/example/benchmark/lib/spec/jts1_0.jar
cvs rdiff: failed to read diff file header /tmp/cvsglxQj6 for jts1_0.jar,v:
end of file
Index: gotm-jts/example/benchmark/lib/xapool/objectweb-datasource.jar
cvs rdiff: failed to read diff file header /tmp/cvspIR1I7 for
objectweb-datasource.jar,v: end of file
Index: gotm-jts/example/benchmark/lib/xapool/xapool.jar
cvs rdiff: failed to read diff file header /tmp/cvsEyrSC8 for xapool.jar,v:
end of file
Index: gotm-jts/example/benchmark/src/config/benchmark.xml
diff -u /dev/null gotm-jts/example/benchmark/src/config/benchmark.xml:1.1
--- /dev/null Fri Jan 14 17:56:04 2005
+++ gotm-jts/example/benchmark/src/config/benchmark.xml Fri Jan 14 17:56:03
2005
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<browser>
+
+ <include url="JTA.xml" />
+
+ <!-- ================================================================= -->
+ <!-- Main -->
+ <!-- ================================================================= -->
+ <node type-name="java.lang.Runnable">
+ <menu>
+ <item label="Run">
+ <code>org.objectweb.gotm.jts.benchmark.InvokeRunnableAction</code>
+ </item>
+ </menu>
+ </node>
+
+</browser>
\ No newline at end of file
Index:
gotm-jts/example/benchmark/src/fractal/org/objectweb/gotm/jts/benchmark/FcApplication.fractal
diff -u /dev/null
gotm-jts/example/benchmark/src/fractal/org/objectweb/gotm/jts/benchmark/FcApplication.fractal:1.1
--- /dev/null Fri Jan 14 17:56:04 2005
+++
gotm-jts/example/benchmark/src/fractal/org/objectweb/gotm/jts/benchmark/FcApplication.fractal
Fri Jan 14 17:56:03 2005
@@ -0,0 +1,24 @@
+<?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.jts.benchmark.FcApplication">
+
+ <interface name="r" role="server"
+ signature="java.lang.Runnable"/>
+
+ <component name="FcClient"
+ definition="org.objectweb.gotm.jts.benchmark.FcJtaClient"/>
+ <component name="FcCounter"
+ definition="org.objectweb.gotm.jts.benchmark.TpCounterImpl"/>
+ <component name="FcTransactionManager"
+ definition="org.objectweb.gotm.lib.FcTransactionManagerImpl"/>
+
+ <binding client="this.r"
+ server="FcClient.runnable"/>
+ <binding client="FcClient.transaction-manager"
+ server="FcTransactionManager.transaction-manager"/>
+ <binding client="FcClient.counter"
+ server="FcCounter.component"/>
+</definition>
\ No newline at end of file
Index:
gotm-jts/example/benchmark/src/fractal/org/objectweb/gotm/jts/benchmark/FcExplorer.fractal
diff -u /dev/null
gotm-jts/example/benchmark/src/fractal/org/objectweb/gotm/jts/benchmark/FcExplorer.fractal:1.1
--- /dev/null Fri Jan 14 17:56:04 2005
+++
gotm-jts/example/benchmark/src/fractal/org/objectweb/gotm/jts/benchmark/FcExplorer.fractal
Fri Jan 14 17:56:03 2005
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC
+ "-//objectweb.org//DTD Fractal ADL 2.0//EN"
+ "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
+
+<definition name="org.objectweb.gotm.jts.benchmark.FcExplorer">
+ <component name="FcExplorer"
+ definition="org.objectweb.gotm.lib.FcExplorerImpl"/>
+ <component name="FcApplication"
+ definition="org.objectweb.gotm.jts.benchmark.FcApplication"/>
+
+ <binding client="FcExplorer.fcAppl"
+ server="FcApplication.component"/>
+</definition>
\ No newline at end of file
Index:
gotm-jts/example/benchmark/src/fractal/org/objectweb/gotm/lib/FcExplorerImpl.fractal
diff -u /dev/null
gotm-jts/example/benchmark/src/fractal/org/objectweb/gotm/lib/FcExplorerImpl.fractal:1.1
--- /dev/null Fri Jan 14 17:56:04 2005
+++
gotm-jts/example/benchmark/src/fractal/org/objectweb/gotm/lib/FcExplorerImpl.fractal
Fri Jan 14 17:56:02 2005
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC "-//objectweb.org//DTD Fractal ADL 2.0//EN"
"classpath://org/objectweb/fractal/adl/xml/standard.dtd">
+<!--<!DOCTYPE definition PUBLIC "-//objectweb.org//DTD Fractal ADL 2.0//EN"
"classpath://org/objectweb/fractal/adl/xml/basic.dtd">-->
+
+<definition name="org.objectweb.gotm.lib.FcExplorerImpl">
+ <interface name="fcAppl" role="client"
+ signature="org.objectweb.fractal.api.Component" />
+
+ <content class="BrowserImpl"/>
+
+ <attributes signature="BrowserAttributes">
+ <attribute value="benchmark.xml" name="ConfigFiles"/>
+ </attributes>
+</definition>
Index:
gotm-jts/example/benchmark/src/fractal/org/objectweb/gotm/lib/FcTransactionManagerImpl.fractal
diff -u /dev/null
gotm-jts/example/benchmark/src/fractal/org/objectweb/gotm/lib/FcTransactionManagerImpl.fractal:1.1
--- /dev/null Fri Jan 14 17:56:04 2005
+++
gotm-jts/example/benchmark/src/fractal/org/objectweb/gotm/lib/FcTransactionManagerImpl.fractal
Fri Jan 14 17:56:02 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.FcTransactionManagerImpl">
+ <interface name="transaction-manager" role="server"
+ signature="javax.transaction.TransactionManager"/>
+
+ <component name="FcMonitor"
+ definition="org.objectweb.gotm.lib.jta.FcTransactionManagerImpl"/>
+ <component name="FcTemplate"
+ definition="org.objectweb.gotm.lib.TpJTSImpl"/>
+
+ <binding client="this.transaction-manager"
+ server="FcMonitor.tx-manager"/>
+ <binding client="FcMonitor.tx-factory"
+ server="FcTemplate.component"/>
+</definition>
Index:
gotm-jts/example/benchmark/src/fractal/org/objectweb/gotm/lib/TpActivationImpl.fractal
diff -u /dev/null
gotm-jts/example/benchmark/src/fractal/org/objectweb/gotm/lib/TpActivationImpl.fractal:1.1
--- /dev/null Fri Jan 14 17:56:04 2005
+++
gotm-jts/example/benchmark/src/fractal/org/objectweb/gotm/lib/TpActivationImpl.fractal
Fri Jan 14 17:56:02 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.TpActivationImpl">
+ <interface name="tx-activation" role="server"
+
signature="org.objectweb.transaction.api.transaction.TransactionActivationFeature"/>
+
+ <component name="FcState"
+
definition="org.objectweb.gotm.lib.transaction.TpTransactionStateImpl"/>
+ <component name="FcActivate"
+
definition="org.objectweb.gotm.lib.transaction.TpTransactionActivationFeatureImpl"/>
+
+ <binding client="this.tx-activation"
+ server="FcActivate.tx-activation"/>
+ <binding client="FcActivate.tx-state"
+ server="FcState.tx-state"/>
+
+ <template-controller desc="compositeTemplate" />
+</definition>
Index:
gotm-jts/example/benchmark/src/fractal/org/objectweb/gotm/lib/TpCoordinatorImpl.fractal
diff -u /dev/null
gotm-jts/example/benchmark/src/fractal/org/objectweb/gotm/lib/TpCoordinatorImpl.fractal:1.1
--- /dev/null Fri Jan 14 17:56:04 2005
+++
gotm-jts/example/benchmark/src/fractal/org/objectweb/gotm/lib/TpCoordinatorImpl.fractal
Fri Jan 14 17:56:02 2005
@@ -0,0 +1,30 @@
+<?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"/>
+
+<!--
+ <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-jts/example/benchmark/src/fractal/org/objectweb/gotm/lib/TpInterruptionImpl.fractal
diff -u /dev/null
gotm-jts/example/benchmark/src/fractal/org/objectweb/gotm/lib/TpInterruptionImpl.fractal:1.1
--- /dev/null Fri Jan 14 17:56:04 2005
+++
gotm-jts/example/benchmark/src/fractal/org/objectweb/gotm/lib/TpInterruptionImpl.fractal
Fri Jan 14 17:56:02 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.TpInterruptionImpl">
+ <interface name="tx-interruption" role="server"
+
signature="org.objectweb.transaction.api.transaction.TransactionInterruptionFeature"/>
+
+ <component name="FcState"
+
definition="org.objectweb.gotm.lib.transaction.TpTransactionStateImpl"/>
+ <component name="FcInterrupt"
+
definition="org.objectweb.gotm.lib.transaction.TpTransactionInterruptionFeatureImpl"/>
+
+ <binding client="this.tx-interruption"
+ server="FcInterrupt.tx-interruption"/>
+ <binding client="FcInterrupt.tx-state"
+ server="FcState.tx-state"/>
+
+ <template-controller desc="compositeTemplate" />
+</definition>
Index:
gotm-jts/example/benchmark/src/fractal/org/objectweb/gotm/lib/TpJTSImpl.fractal
diff -u /dev/null
gotm-jts/example/benchmark/src/fractal/org/objectweb/gotm/lib/TpJTSImpl.fractal:1.1
--- /dev/null Fri Jan 14 17:56:04 2005
+++
gotm-jts/example/benchmark/src/fractal/org/objectweb/gotm/lib/TpJTSImpl.fractal
Fri Jan 14 17:56:02 2005
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC
+ "-//objectweb.org//DTD Fractal ADL 2.0//EN"
+ "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
+
+<definition name="org.objectweb.gotm.lib.TpJTSImpl">
+ <interface name="transaction" role="server"
+ signature="javax.transaction.Transaction"/>
+ <interface name="user-transaction" role="server"
+ signature="javax.transaction.UserTransaction"/>
+
+ <component name="FcAdapter"
+ definition="org.objectweb.gotm.lib.jta.TpTransactionImpl"/>
+ <component name="FcGoTM"
+ definition="org.objectweb.gotm.lib.TpTransactionImpl"/>
+
+ <binding client="this.transaction"
+ server="FcAdapter.transaction"/>
+ <binding client="this.user-transaction"
+ server="FcAdapter.user-transaction"/>
+
+ <binding client="FcAdapter.tx-state"
+ server="FcGoTM.tx-state"/>
+ <binding client="FcAdapter.tx-status"
+ server="FcGoTM.tx-status"/>
+ <binding client="FcAdapter.tx-activation"
+ server="FcGoTM.tx-activation"/>
+ <binding client="FcAdapter.tx-interruption"
+ server="FcGoTM.tx-interruption"/>
+ <binding client="FcAdapter.sync-subscribe"
+ server="FcGoTM.subscribe"/>
+ <binding client="FcAdapter.res-subscribe"
+ server="FcGoTM.subscribe"/>
+ <binding client="FcAdapter.commit"
+ server="FcGoTM.process-twopc"/>
+ <binding client="FcAdapter.rollback"
+ server="FcGoTM.process-rollback"/>
+
+ <template-controller desc="compositeTemplate" />
+</definition>
Index:
gotm-jts/example/benchmark/src/fractal/org/objectweb/gotm/lib/TpManagerImpl.fractal
diff -u /dev/null
gotm-jts/example/benchmark/src/fractal/org/objectweb/gotm/lib/TpManagerImpl.fractal:1.1
--- /dev/null Fri Jan 14 17:56:04 2005
+++
gotm-jts/example/benchmark/src/fractal/org/objectweb/gotm/lib/TpManagerImpl.fractal
Fri Jan 14 17:56:02 2005
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC
+ "-//objectweb.org//DTD Fractal ADL 2.0//EN"
+ "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
+
+<definition name="org.objectweb.gotm.lib.TpManagerImpl">
+ <interface name="tx-state" role="server"
+
signature="org.objectweb.transaction.api.transaction.TransactionState"/>
+ <interface name="tx-status" role="server"
+
signature="org.objectweb.transaction.api.transaction.TransactionStatusFeature"/>
+ <interface name="tx-activation" role="server"
+
signature="org.objectweb.transaction.api.transaction.TransactionActivationFeature"/>
+ <interface name="tx-interruption" role="server"
+
signature="org.objectweb.transaction.api.transaction.TransactionInterruptionFeature"/>
+
+ <interface name="publish" role="client"
+ signature="org.objectweb.transaction.api.event.PublishFeature"/>
+
+ <component name="FcState"
+
definition="org.objectweb.gotm.lib.transaction.TpTransactionStateImpl"/>
+ <component name="FcActivation"
+ definition="org.objectweb.gotm.lib.TpActivationImpl">
+ <component name="FcState" definition="./FcState"/>
+ </component>
+ <component name="FcInterruption"
+ definition="org.objectweb.gotm.lib.TpInterruptionImpl">
+ <component name="FcState" definition="./FcState"/>
+ </component>
+
+ <binding client="this.tx-state" server="FcState.tx-state"/>
+ <binding client="this.tx-status" server="FcState.tx-status"/>
+ <binding client="this.tx-activation"
server="FcActivation.tx-activation"/>
+ <binding client="this.tx-interruption"
server="FcInterruption.tx-interruption"/>
+
+ <binding client="FcState.publish" server="this.publish"/>
+
+ <template-controller desc="compositeTemplate" />
+</definition>
Index:
gotm-jts/example/benchmark/src/fractal/org/objectweb/gotm/lib/TpTerminatorImpl.fractal
diff -u /dev/null
gotm-jts/example/benchmark/src/fractal/org/objectweb/gotm/lib/TpTerminatorImpl.fractal:1.1
--- /dev/null Fri Jan 14 17:56:04 2005
+++
gotm-jts/example/benchmark/src/fractal/org/objectweb/gotm/lib/TpTerminatorImpl.fractal
Fri Jan 14 17:56:02 2005
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC
+ "-//objectweb.org//DTD Fractal ADL 2.0//EN"
+ "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
+
+<definition name="org.objectweb.gotm.lib.TpTerminatorImpl">
+ <interface name="process-twopc" role="server"
+
signature="org.objectweb.transaction.api.coordination.CoordinationFeature"/>
+ <interface name="process-commit" role="server"
+
signature="org.objectweb.transaction.api.coordination.CoordinationFeature"/>
+ <interface name="process-rollback" role="server"
+
signature="org.objectweb.transaction.api.coordination.CoordinationFeature"/>
+
+ <interface name="publish" role="client"
+ signature="org.objectweb.transaction.api.event.PublishFeature"/>
+ <interface name="subscribe" role="client"
+ signature="org.objectweb.transaction.api.event.SubscribeFeature"/>
+ <interface name="tx-status" role="client"
+
signature="org.objectweb.transaction.api.transaction.TransactionStatusFeature"/>
+ <interface name="tx-state" role="client"
+
signature="org.objectweb.transaction.api.transaction.TransactionState"/>
+
+ <component name="Fc2PC"
+
definition="org.objectweb.gotm.lib.coordination.TpAtomicTwoPCCoordinationFeature"/>
+ <component name="Fc1PC"
+
definition="org.objectweb.gotm.lib.coordination.TpOnePCCoordinationFeature"/>
+ <component name="FcRollback"
+
definition="org.objectweb.gotm.lib.coordination.TpRollbackCoordinationFeature"/>
+ <component name="FcDaemon"
+ definition="org.objectweb.gotm.lib.coordination.TpDaemonImpl(100)"/>
+ <component name="FcChecker"
+ definition="org.objectweb.gotm.lib.coordination.TpStatusChecker"/>
+
+ <binding client="this.process-twopc" server="FcChecker.coord-process"/>
+ <binding client="this.process-commit" server="Fc1PC.coord-process"/>
+ <binding client="this.process-rollback" server="FcRollback.coord-process"/>
+
+ <binding client="Fc2PC.valid" server="Fc1PC.coord-process"/>
+ <binding client="Fc2PC.cancel" server="FcRollback.coord-process"/>
+ <binding client="Fc2PC.publish" server="this.publish"/>
+ <binding client="Fc2PC.tx-state" server="this.tx-state"/>
+
+ <binding client="Fc1PC.publish" server="this.publish"/>
+ <binding client="Fc1PC.tx-state" server="this.tx-state"/>
+
+ <binding client="FcRollback.publish" server="this.publish"/>
+ <binding client="FcRollback.tx-state" server="this.tx-state"/>
+
+ <binding client="FcDaemon.subscribe" server="this.subscribe"/>
+ <binding client="FcDaemon.coord-process"
server="FcRollback.coord-process"/>
+
+ <binding client="FcChecker.commit" server="Fc2PC.coord-process"/>
+ <binding client="FcChecker.rollback" server="FcRollback.coord-process"/>
+ <binding client="FcChecker.tx-status" server="this.tx-status"/>
+
+ <template-controller desc="compositeTemplate" />
+</definition>
Index:
gotm-jts/example/benchmark/src/fractal/org/objectweb/gotm/lib/TpTransactionImpl.fractal
diff -u /dev/null
gotm-jts/example/benchmark/src/fractal/org/objectweb/gotm/lib/TpTransactionImpl.fractal:1.1
--- /dev/null Fri Jan 14 17:56:04 2005
+++
gotm-jts/example/benchmark/src/fractal/org/objectweb/gotm/lib/TpTransactionImpl.fractal
Fri Jan 14 17:56:02 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.TpTransactionImpl">
+ <interface name="tx-state" role="server"
+
signature="org.objectweb.transaction.api.transaction.TransactionState"/>
+ <interface name="tx-status" role="server"
+
signature="org.objectweb.transaction.api.transaction.TransactionStatusFeature"/>
+ <interface name="tx-activation" role="server"
+
signature="org.objectweb.transaction.api.transaction.TransactionActivationFeature"/>
+ <interface name="process-twopc" role="server"
+
signature="org.objectweb.transaction.api.coordination.CoordinationFeature"/>
+ <interface name="process-rollback" role="server"
+
signature="org.objectweb.transaction.api.coordination.CoordinationFeature"/>
+ <interface name="tx-interruption" role="server"
+
signature="org.objectweb.transaction.api.transaction.TransactionInterruptionFeature"/>
+ <interface name="subscribe" role="server"
+ signature="org.objectweb.transaction.api.event.SubscribeFeature"/>
+
+ <component name="FcManager"
+ definition="org.objectweb.gotm.lib.TpManagerImpl"/>
+ <component name="FcCoordinator"
+ definition="org.objectweb.gotm.lib.TpCoordinatorImpl"/>
+ <component name="FcTerminator"
+ definition="org.objectweb.gotm.lib.TpTerminatorImpl"/>
+
+ <binding client="this.tx-state" server="FcManager.tx-state"/>
+ <binding client="this.tx-status" server="FcManager.tx-status"/>
+ <binding client="this.tx-activation" server="FcManager.tx-activation"/>
+ <binding client="this.tx-interruption"
server="FcManager.tx-interruption"/>
+ <binding client="this.subscribe" server="FcCoordinator.subscribe"/>
+ <binding client="this.process-twopc"
server="FcTerminator.process-twopc"/>
+ <binding client="this.process-rollback"
server="FcTerminator.process-rollback"/>
+
+ <binding client="FcManager.publish" server="FcCoordinator.publish"/>
+
+ <binding client="FcTerminator.publish" server="FcCoordinator.publish"/>
+ <binding client="FcTerminator.subscribe" server="FcCoordinator.subscribe"/>
+ <binding client="FcTerminator.tx-status" server="FcManager.tx-status"/>
+ <binding client="FcTerminator.tx-state" server="FcManager.tx-state"/>
+
+ <template-controller desc="compositeTemplate"/>
+</definition>
Index:
gotm-jts/example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/ClientAttributes.java
diff -u /dev/null
gotm-jts/example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/ClientAttributes.java:1.1
--- /dev/null Fri Jan 14 17:56:04 2005
+++
gotm-jts/example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/ClientAttributes.java
Fri Jan 14 17:56:02 2005
@@ -0,0 +1,61 @@
+/*====================================================================
+
+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: ClientAttributes.java,v 1.1 2005/01/14 16:56:02 rouvoy Exp $
+====================================================================*/
+package org.objectweb.gotm.jts.benchmark;
+
+import org.objectweb.fractal.api.control.AttributeController;
+
+/**
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @created 10 janv. 2005
+ * @modified $Date: 2005/01/14 16:56:02 $
+ * @version $Revision: 1.1 $
+ */
+public interface ClientAttributes
+ extends AttributeController {
+ /**
+ * @param nb the number of transactional components to allocate.
+ */
+ public void setComponents(int nb) ;
+
+ /**
+ * @return the number of transactional components allocated.
+ */
+ public int getComponents();
+
+ /**
+ * @param nb the number of benchmark iteration to perform.
+ */
+ public void setIterations(int nb);
+
+ /**
+ * @return the number of benchmark iteration performed.
+ */
+ public int getIterations();
+
+
+}
Index:
gotm-jts/example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/Counter.java
diff -u /dev/null
gotm-jts/example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/Counter.java:1.1
--- /dev/null Fri Jan 14 17:56:04 2005
+++
gotm-jts/example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/Counter.java
Fri Jan 14 17:56:02 2005
@@ -0,0 +1,55 @@
+/*====================================================================
+
+ ObjectWeb GoTM project - http://gotm.objectweb.org
+ Contact: gotm@xxxxxxxxxxxxx
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA
+
+ Initial developer(s): Romain Rouvoy.
+ Contributor(s): ______________________________________.
+
+ ---------------------------------------------------------------------
+ $Id: Counter.java,v 1.1 2005/01/14 16:56:02 rouvoy Exp $
+ ====================================================================*/
+
+package org.objectweb.gotm.jts.benchmark;
+
+/**
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @created 6 janv. 2005
+ * @modified $Date: 2005/01/14 16:56:02 $
+ * @version $Revision: 1.1 $
+ * @fractal.itf name="counter"
+ */
+public interface Counter {
+ /** Comment for <code>COUNTER</code>. */
+ public static final String COUNTER = "counter";
+
+ /**
+ * Initialize the counter value.
+ */
+ public void init();
+
+ /**
+ * Increment the value of the counter.
+ */
+ public void incr();
+
+ /**
+ * @return the value of the counter.
+ */
+ public int value();
+}
Index:
gotm-jts/example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/CounterAttributes.java
diff -u /dev/null
gotm-jts/example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/CounterAttributes.java:1.1
--- /dev/null Fri Jan 14 17:56:04 2005
+++
gotm-jts/example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/CounterAttributes.java
Fri Jan 14 17:56:02 2005
@@ -0,0 +1,53 @@
+/*====================================================================
+
+ ObjectWeb GoTM project - http://gotm.objectweb.org
+ Contact: gotm@xxxxxxxxxxxxx
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA
+
+ Initial developer(s): Romain Rouvoy.
+ Contributor(s): ______________________________________.
+
+ ---------------------------------------------------------------------
+ $Id: CounterAttributes.java,v 1.1 2005/01/14 16:56:02 rouvoy Exp $
+ ====================================================================*/
+
+package org.objectweb.gotm.jts.benchmark;
+
+import org.objectweb.fractal.api.control.AttributeController;
+
+/**
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @created 6 janv. 2005
+ * @modified $Date: 2005/01/14 16:56:02 $
+ * @version $Revision: 1.1 $
+ * @fractal.controller name="attribute"
+ */
+public interface CounterAttributes
+ extends AttributeController
+{
+ /**
+ * @return the value of the counter.
+ */
+ public int getCounter() ;
+
+
+ /**
+ * Defines the value of the counter.
+ * @param value the value to set
+ */
+ public void setCounter(int value) ;
+}
Index:
gotm-jts/example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/CounterImpl.java
diff -u /dev/null
gotm-jts/example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/CounterImpl.java:1.1
--- /dev/null Fri Jan 14 17:56:04 2005
+++
gotm-jts/example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/CounterImpl.java
Fri Jan 14 17:56:02 2005
@@ -0,0 +1,211 @@
+/*====================================================================
+
+ ObjectWeb GoTM project - http://gotm.objectweb.org
+ Contact: gotm@xxxxxxxxxxxxx
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA
+
+ Initial developer(s): Romain Rouvoy.
+ Contributor(s): ______________________________________.
+
+ ---------------------------------------------------------------------
+ $Id: CounterImpl.java,v 1.1 2005/01/14 16:56:02 rouvoy Exp $
+ ====================================================================*/
+
+package org.objectweb.gotm.jts.benchmark;
+
+import javax.transaction.Status;
+import javax.transaction.Synchronization;
+import javax.transaction.xa.XAResource;
+import javax.transaction.xa.Xid;
+
+import org.objectweb.fractal.lib.LoggablePrimitive;
+import org.objectweb.gotm.jts.benchmark.Counter;
+import org.objectweb.gotm.jts.benchmark.CounterAttributes;
+
+/**
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @created 3 janv. 2005
+ * @modified $Date: 2005/01/14 16:56:02 $
+ * @version $Revision: 1.1 $
+ * @fractal.itf name="synchronization" role="server"
signature="javax.transaction.Synchronization"
+ * @fractal.itf name="xa-resource" role="server"
signature="javax.transaction.xa.XAResource"
+ */
+public class CounterImpl
+ extends LoggablePrimitive
+ implements Synchronization,
+ XAResource,
+ Counter,
+ CounterAttributes
+{
+ /**
+ * @fractal.attr value="0"
+ */
+ private int counter ;
+
+ /** <code>clone</code> . */
+ private int clone ;
+
+ /**
+ *
+ */
+ public CounterImpl() {
+ this.counter = this.clone = 0 ;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.transaction.Synchronization#beforeCompletion()
+ */
+ public void beforeCompletion() {
+ getTrace().debug("Receiving beforeCompletion()...");
+ }
+
+ /* (non-Javadoc)
+ * @see javax.transaction.Synchronization#afterCompletion(int)
+ */
+ public void afterCompletion(int arg0) {
+ getTrace().debug("Receiving afterCompletion("+arg0+")...");
+// try {
+// Thread.sleep(10);
+// } catch (InterruptedException e) {
+// e.printStackTrace();
+// }
+ if (arg0 == Status.STATUS_COMMITTED) {
+ this.counter += this.clone ;
+ }
+ this.clone = 0 ;
+ }
+
+ /* (non-Javadoc)
+ * @see org.objectweb.gotm.jts.local.Counter#init()
+ */
+ public void init() {
+ this.counter = this.clone = 0 ;
+ }
+
+ /* (non-Javadoc)
+ * @see org.objectweb.gotm.jts.local.Counter#incr()
+ */
+ public void incr() {
+ this.clone++ ;
+// try {
+// Thread.sleep(10);
+// } catch (InterruptedException e) {
+// e.printStackTrace();
+// }
+ }
+
+ public String toString() {
+ return ""+this.counter;
+ }
+
+ /* (non-Javadoc)
+ * @see org.objectweb.gotm.jts.local.CounterAttributes#getCounter()
+ */
+ public int getCounter() {
+ return this.counter;
+ }
+
+ /* (non-Javadoc)
+ * @see org.objectweb.gotm.jts.local.CounterAttributes#setCounter(int)
+ */
+ public void setCounter(int value) {
+ this.counter = value ;
+ }
+
+ /* (non-Javadoc)
+ * @see org.objectweb.gotm.jts.local.Counter#value()
+ */
+ public int value() {
+ return this.counter+this.clone;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.transaction.xa.XAResource#commit(javax.transaction.xa.Xid,
boolean)
+ */
+ public void commit(Xid arg0, boolean arg1) {
+ getTrace().debug("Receiving setTransactionTimeout("+arg0+")");
+ }
+
+ /* (non-Javadoc)
+ * @see javax.transaction.xa.XAResource#end(javax.transaction.xa.Xid,
int)
+ */
+ public void end(Xid arg0, int arg1) {
+ getTrace().debug("Receiving end("+arg0+", "+arg1+")");
+ }
+
+ /* (non-Javadoc)
+ * @see javax.transaction.xa.XAResource#forget(javax.transaction.xa.Xid)
+ */
+ public void forget(Xid arg0) {
+ getTrace().debug("Receiving forget("+arg0+")");
+ }
+
+ /* (non-Javadoc)
+ * @see javax.transaction.xa.XAResource#getTransactionTimeout()
+ */
+ public int getTransactionTimeout() {
+ getTrace().debug("Receiving getTransactionTimeout()");
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see
javax.transaction.xa.XAResource#isSameRM(javax.transaction.xa.XAResource)
+ */
+ public boolean isSameRM(XAResource arg0) {
+ getTrace().debug("Receiving setTransactionTimeout("+arg0+")");
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.transaction.xa.XAResource#prepare(javax.transaction.xa.Xid)
+ */
+ public int prepare(Xid arg0) {
+ getTrace().debug("Receiving prepare("+arg0+")");
+ return XA_OK;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.transaction.xa.XAResource#recover(int)
+ */
+ public Xid[] recover(int arg0) {
+ getTrace().debug("Receiving recover("+arg0+")");
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see
javax.transaction.xa.XAResource#rollback(javax.transaction.xa.Xid)
+ */
+ public void rollback(Xid arg0) {
+ getTrace().debug("Receiving rollback("+arg0+")");
+ }
+
+ /* (non-Javadoc)
+ * @see javax.transaction.xa.XAResource#setTransactionTimeout(int)
+ */
+ public boolean setTransactionTimeout(int arg0) {
+ getTrace().debug("Receiving setTransactionTimeout("+arg0+")");
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.transaction.xa.XAResource#start(javax.transaction.xa.Xid,
int)
+ */
+ public void start(Xid arg0, int arg1) {
+ getTrace().debug("Receiving start("+arg0+", "+arg1+")");
+ }
+
+}
Index:
gotm-jts/example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/InvokeRunnableAction.java
diff -u /dev/null
gotm-jts/example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/InvokeRunnableAction.java:1.1
--- /dev/null Fri Jan 14 17:56:04 2005
+++
gotm-jts/example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/InvokeRunnableAction.java
Fri Jan 14 17:56:02 2005
@@ -0,0 +1,79 @@
+/*===========================================================================
+
+ObjectWeb Naming Context Framework
+Copyright (C) 2003 USTL - LIFL - GOAL
+Contact: openccm-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): Jerome Moroy.
+Contributor(s): ______________________________________.
+
+===========================================================================*/
+
+package org.objectweb.gotm.jts.benchmark;
+import org.objectweb.util.browser.api.MenuItem;
+import org.objectweb.util.browser.api.MenuItemTreeView;
+import org.objectweb.util.browser.api.TreeView;
+
+/**
+ * This action allows to invoke the main method of the demo.
+ * @author <a href="mailto:Jerome.Moroy@xxxxxxx">Jerome Moroy</a>
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @created 3 janv. 2005
+ * @modified $Date: 2005/01/14 16:56:02 $
+ * @version $Revision: 1.1 $
+ */
+public class InvokeRunnableAction
+ implements MenuItem
+{
+ /* (non-Javadoc)
+ * @see
org.objectweb.util.browser.api.MenuItem#actionPerformed(org.objectweb.util.browser.api.MenuItemTreeView)
+ */
+ public void actionPerformed(MenuItemTreeView e) {
+ Runnable m = (Runnable)e.getSelectedObject();
+ InvokeThread t = new InvokeThread(m);
+ t.start();
+ }
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.util.browser.api.MenuItem#getStatus(org.objectweb.util.browser.api.TreeView)
+ */
+ public int getStatus(TreeView treeView) {
+ return MenuItem.ENABLED_STATUS;
+ }
+
+ /**
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @created 3 janv. 2005
+ * @modified $Date: 2005/01/14 16:56:02 $
+ * @version $Revision: 1.1 $
+ */
+ public class InvokeThread extends Thread {
+ protected Runnable m_ = null;
+
+ /**
+ * @param m action to run.
+ */
+ public InvokeThread(Runnable m) {
+ this.m_ = m;
+ }
+
+ public void run() {
+ this.m_.run();
+ }
+ }
+}
\ No newline at end of file
Index:
gotm-jts/example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/JtaClient.java
diff -u /dev/null
gotm-jts/example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/JtaClient.java:1.1
--- /dev/null Fri Jan 14 17:56:04 2005
+++
gotm-jts/example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/JtaClient.java
Fri Jan 14 17:56:02 2005
@@ -0,0 +1,284 @@
+/*====================================================================
+
+ ObjectWeb GoTM project - http://gotm.objectweb.org
+ Contact: gotm@xxxxxxxxxxxxx
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA
+
+ Initial developer(s): Romain Rouvoy.
+ Contributor(s): ______________________________________.
+
+ ---------------------------------------------------------------------
+ $Id: JtaClient.java,v 1.1 2005/01/14 16:56:02 rouvoy Exp $
+ ====================================================================*/
+
+package org.objectweb.gotm.jts.benchmark;
+
+import java.util.Vector;
+
+import javax.naming.NamingException;
+import javax.transaction.Synchronization;
+import javax.transaction.TransactionManager;
+import javax.transaction.xa.XAResource;
+
+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.lib.BindablePrimitive;
+import org.objectweb.fractal.util.Fractal;
+import org.objectweb.gotm.jts.benchmark.Counter;
+import org.objectweb.jotm.Jotm;
+
+/**
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @created 3 janv. 2005
+ * @modified $Date: 2005/01/14 16:56:02 $
+ * @version $Revision: 1.1 $
+ * @fractal.itf name="runnable" signature="java.lang.Runnable"
+ * @fractal.itf name="transaction-manager" role="client"
signature="javax.transaction.TransactionManager"
+ * @fractal.itf name="counter" role="client"
signature="org.objectweb.fractal.api.Component"
+ */
+public class JtaClient
+ extends BindablePrimitive
+ implements Runnable, ClientAttributes
+{
+ /** Fractal ADL Identifier for the <code>TX_MANAGER</code> interface. */
+ public static final String TX_MANAGER = "transaction-manager";
+
+ /* (non-Javadoc)
+ * @see org.objectweb.gotm.lib.BindingFeature#clientFc()
+ */
+ public String[] clientFc() {
+ return new String[] {TX_MANAGER, Counter.COUNTER};
+ }
+
+ /**
+ * @fractal.attr value="20"
+ */
+ private int components ;
+
+ /**
+ * @fractal.attr value="2"
+ */
+ private int iterations ;
+
+ private final Vector counters = new Vector();
+ private final Timer timer = new Timer();
+ private Jotm jotm = null;
+
+ /**
+ * @return the associated transaction manager.
+ */
+ protected TransactionManager getTransactionManager() {
+ try {
+ return (TransactionManager) lookupFc(TX_MANAGER);
+ } catch (NoSuchInterfaceException e) {
+ getTrace().debug(e.getMessage());
+ return null;
+ }
+ }
+
+
+ protected Component getComponent(int c) {
+ try {
+ Factory fct = (Factory)
((Component)lookupFc(Counter.COUNTER)).getFcInterface("factory");
+ if (c >= this.counters.size())
+ System.out.println("Creating "+getComponents()+" Counter
components");
+ while (c >= this.counters.size()) {
+ //getTrace().info("Creating a new counter");
+ Component counter = fct.newFcInstance();
+ Fractal.getLifeCycleController(counter).startFc();
+ this.counters.add(counter);
+ }
+ return (Component) this.counters.get(c);
+ } catch (NoSuchInterfaceException e) {
+ getTrace().debug(e.getMessage());
+ return null ;
+ } catch (InstantiationException e) {
+ getTrace().debug(e.getMessage());
+ return null ;
+ } catch (IllegalLifeCycleException e) {
+ getTrace().debug(e.getMessage());
+ return null ;
+ }
+ }
+
+ /**
+ * @param c
+ * @return the associated counter.
+ */
+ protected Counter getCounter(int c) {
+ try {
+ return (Counter) getComponent(c).getFcInterface(Counter.COUNTER);
+ } catch (NoSuchInterfaceException e) {
+ getTrace().debug(e.getMessage());
+ return null ;
+ }
+ }
+
+ /**
+ * @param c
+ * @return the associated synchronization object.
+ */
+ protected Synchronization getSynchronization(int c) {
+ try {
+ return (Synchronization)
getComponent(c).getFcInterface("synchronization");
+ } catch (NoSuchInterfaceException e) {
+ e.printStackTrace();
+ return null ;
+ }
+ }
+
+ /**
+ * @param c
+ * @return the associated XA resource object.
+ */
+ protected XAResource getXAResource(int c) {
+ try {
+ return (XAResource)
getComponent(c).getFcInterface("xa-resource");
+ } catch (NoSuchInterfaceException e) {
+ e.printStackTrace();
+ return null ;
+ }
+ }
+
+
+ /**
+ * @param tm
+ * @param commit
+ *
+ */
+ protected void test(TransactionManager tm, boolean commit) {
+ if (commit) System.out.println("==> Benchmarking commit scenario");
+ else System.out.println("==> Benchmarking rollback scenario");
+
+ this.timer.start();
+ try {
+ tm.begin();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ this.timer.stop();
+ System.out.println("Beginning a transaction = "+this.timer);
+
+ this.timer.start();
+ for (int c=0 ; c < getComponents() ; c++) {
+ try {
+
tm.getTransaction().registerSynchronization(getSynchronization(c));
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ getCounter(c).incr();
+ getCounter(c).value(); // simulates counter access.
+ }
+ this.timer.stop();
+ System.out.println("Global Time to perform operations =
"+this.timer);
+
+ if (commit) {
+ this.timer.start();
+ try {
+ tm.commit();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ this.timer.stop();
+ System.out.println("Committing a transaction = "+this.timer);
+ } else {
+ this.timer.start();
+ try {
+ tm.rollback();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ this.timer.stop();
+ System.out.println("Rolling back a transaction = "+this.timer);
+ }
+ }
+
+ /**
+ *
+ */
+ private void run_scenario() {
+ System.out.println("## Starting the client");
+ System.out.println("** JTA Client with GoTM **");
+ test(this.getTransactionManager(),true);
+ test(this.getTransactionManager(),false);
+ System.out.println("** JTA Client with JOTM **");
+ test(this.jotm.getTransactionManager(),true);
+ test(this.jotm.getTransactionManager(),false);
+ System.out.println("## Stopping the client");
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Runnable#run()
+ */
+ public void run() {
+ getComponent(getComponents()); // Creates all the counter components
required
+ for (int i=0 ; i < getIterations() ; i++) {
+ run_scenario();
+ }
+ this.jotm.stop();
+ System.exit(0);
+ }
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.gotm.jts.benchmark.ClientAttributes#setComponents(int)
+ */
+ public void setComponents(int nb) {
+ this.components = nb ;
+ }
+
+ /* (non-Javadoc)
+ * @see org.objectweb.gotm.jts.benchmark.ClientAttributes#getComponents()
+ */
+ public int getComponents() {
+ return this.components;
+ }
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.gotm.jts.benchmark.ClientAttributes#setIteration(int)
+ */
+ public void setIterations(int nb) {
+ this.iterations = nb ;
+ }
+
+ /* (non-Javadoc)
+ * @see org.objectweb.gotm.jts.benchmark.ClientAttributes#getIteration()
+ */
+ public int getIterations() {
+ return this.iterations;
+ }
+
+ /**
+ * Default Constructor.
+ */
+ public JtaClient() {
+ try {
+ this.jotm = new Jotm(true,false);
+ } catch (NamingException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * @param args command line arguments
+ */
+ public static void main(String[] args) {
+ new JtaClient().run();
+ }
+}
Index:
gotm-jts/example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/Timer.java
diff -u /dev/null
gotm-jts/example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/Timer.java:1.1
--- /dev/null Fri Jan 14 17:56:04 2005
+++
gotm-jts/example/benchmark/src/java/org/objectweb/gotm/jts/benchmark/Timer.java
Fri Jan 14 17:56:02 2005
@@ -0,0 +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: Timer.java,v 1.1 2005/01/14 16:56:02 rouvoy Exp $
+====================================================================*/
+package org.objectweb.gotm.jts.benchmark;
+
+/**
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @created 11 janv. 2005
+ * @modified $Date: 2005/01/14 16:56:02 $
+ * @version $Revision: 1.1 $
+ */
+public class Timer {
+
+ private long time = 0;
+ private boolean progress = true;
+
+
+ /**
+ * Starts the timer.
+ */
+ public void start() {
+ this.time = System.currentTimeMillis() ;
+ this.progress = true ;
+ }
+
+ /**
+ * Stops the timer.
+ */
+ public void stop() {
+ this.time = System.currentTimeMillis() - this.time ;
+ this.progress = false ;
+ }
+
+ /**
+ * Display the value of the timer.
+ * @return the elapsed time in milliseconds.
+ */
+ public long display() {
+ if (this.progress)
+ throw new RuntimeException("Timer is in progress");
+ return this.time;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ return this.display() + " ms";
+ }
+}
Index:
gotm-jts/example/local/src/java/org/objectweb/gotm/jts/local/CounterImpl.java
diff -u
gotm-jts/example/local/src/java/org/objectweb/gotm/jts/local/CounterImpl.java:1.2
gotm-jts/example/local/src/java/org/objectweb/gotm/jts/local/CounterImpl.java:1.3
---
gotm-jts/example/local/src/java/org/objectweb/gotm/jts/local/CounterImpl.java:1.2
Mon Jan 10 17:17:31 2005
+++
gotm-jts/example/local/src/java/org/objectweb/gotm/jts/local/CounterImpl.java
Fri Jan 14 17:56:03 2005
@@ -22,7 +22,7 @@
Contributor(s): ______________________________________.
---------------------------------------------------------------------
- $Id: CounterImpl.java,v 1.2 2005/01/10 16:17:31 rouvoy Exp $
+ $Id: CounterImpl.java,v 1.3 2005/01/14 16:56:03 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm.jts.local;
@@ -33,12 +33,14 @@
import javax.transaction.xa.Xid;
import org.objectweb.fractal.lib.LoggablePrimitive;
+import org.objectweb.gotm.jts.benchmark.Counter;
+import org.objectweb.gotm.jts.benchmark.CounterAttributes;
/**
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
* @created 3 janv. 2005
- * @modified $Date: 2005/01/10 16:17:31 $
- * @version $Revision: 1.2 $
+ * @modified $Date: 2005/01/14 16:56:03 $
+ * @version $Revision: 1.3 $
* @fractal.itf name="synchronization" role="server"
signature="javax.transaction.Synchronization"
* @fractal.itf name="xa-resource" role="server"
signature="javax.transaction.xa.XAResource"
*/
Index:
gotm-jts/example/local/src/java/org/objectweb/gotm/jts/local/JtaClient.java
diff -u
gotm-jts/example/local/src/java/org/objectweb/gotm/jts/local/JtaClient.java:1.2
gotm-jts/example/local/src/java/org/objectweb/gotm/jts/local/JtaClient.java:1.3
---
gotm-jts/example/local/src/java/org/objectweb/gotm/jts/local/JtaClient.java:1.2
Mon Jan 10 17:17:31 2005
+++
gotm-jts/example/local/src/java/org/objectweb/gotm/jts/local/JtaClient.java
Fri Jan 14 17:56:03 2005
@@ -22,7 +22,7 @@
Contributor(s): ______________________________________.
---------------------------------------------------------------------
- $Id: JtaClient.java,v 1.2 2005/01/10 16:17:31 rouvoy Exp $
+ $Id: JtaClient.java,v 1.3 2005/01/14 16:56:03 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm.jts.local;
@@ -39,12 +39,13 @@
import org.objectweb.fractal.api.Component;
import org.objectweb.fractal.api.NoSuchInterfaceException;
import org.objectweb.fractal.lib.BindablePrimitive;
+import org.objectweb.gotm.jts.benchmark.Counter;
/**
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
* @created 3 janv. 2005
- * @modified $Date: 2005/01/10 16:17:31 $
- * @version $Revision: 1.2 $
+ * @modified $Date: 2005/01/14 16:56:03 $
+ * @version $Revision: 1.3 $
* @fractal.itf name="runnable" signature="java.lang.Runnable"
* @fractal.itf name="transaction-manager" role="client"
signature="javax.transaction.TransactionManager"
* @fractal.itf name="counter" role="client"
signature="org.objectweb.fractal.api.Component"
Index: gotm-jts/src/java/org/objectweb/gotm/lib/jta/SynchronizationImpl.java
diff -u
gotm-jts/src/java/org/objectweb/gotm/lib/jta/SynchronizationImpl.java:1.2
gotm-jts/src/java/org/objectweb/gotm/lib/jta/SynchronizationImpl.java:1.3
--- gotm-jts/src/java/org/objectweb/gotm/lib/jta/SynchronizationImpl.java:1.2
Mon Jan 10 17:17:31 2005
+++ gotm-jts/src/java/org/objectweb/gotm/lib/jta/SynchronizationImpl.java
Fri Jan 14 17:56:03 2005
@@ -22,7 +22,7 @@
Contributor(s): ______________________________________.
---------------------------------------------------------------------
- $Id: SynchronizationImpl.java,v 1.2 2005/01/10 16:17:31 rouvoy Exp $
+ $Id: SynchronizationImpl.java,v 1.3 2005/01/14 16:56:03 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm.lib.jta;
@@ -34,6 +34,7 @@
import javax.transaction.Synchronization;
import org.objectweb.fractal.api.NoSuchInterfaceException;
+import org.objectweb.transaction.api.event.SubscribeFeature;
import org.objectweb.transaction.lib.transaction.TransactionStatusCommitted;
import org.objectweb.transaction.lib.transaction.TransactionStatusPrepared;
import org.objectweb.transaction.lib.transaction.TransactionStatusRolledBack;
@@ -43,8 +44,8 @@
* <code>Synchronization</code> object.
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
* @created 22 déc. 2004
- * @modified $Date: 2005/01/10 16:17:31 $
- * @version $Revision: 1.2 $
+ * @modified $Date: 2005/01/14 16:56:03 $
+ * @version $Revision: 1.3 $
* @fractal.itf name="synchronization" role="client"
signature="javax.transaction.Synchronization"
*/
public class SynchronizationImpl
@@ -57,7 +58,10 @@
* @see org.objectweb.gotm.lib.BindingFeature#clientFc()
*/
protected String[] clientFc() {
- return new String[] {SYNCHRONIZATION};
+ return new String[] {
+ SYNCHRONIZATION,
+ SubscribeFeature.SUBSCRIBE_FEATURE
+ };
}
/**
@@ -77,12 +81,12 @@
* @see org.objectweb.gotm.lib.jta.WrapperImpl#declare()
*/
protected void declare() {
- putAction(TransactionStatusPrepared.status.getLabel(),
- new BeforeCompletion());
- putAction(TransactionStatusCommitted.status.getLabel(),
- new AfterCompletion(Status.STATUS_COMMITTED));
- putAction(TransactionStatusRolledBack.status.getLabel(),
- new AfterCompletion(Status.STATUS_ROLLEDBACK));
+ putAction(TransactionStatusPrepared.status.getLabel(),
+ new BeforeCompletion());
+ putAction(TransactionStatusCommitted.status.getLabel(),
+ new AfterCompletion(Status.STATUS_COMMITTED));
+ putAction(TransactionStatusRolledBack.status.getLabel(),
+ new AfterCompletion(Status.STATUS_ROLLEDBACK));
}
/* (non-Javadoc)
Index: gotm-jts/src/java/org/objectweb/gotm/lib/jta/TransactionImpl.java
diff -u gotm-jts/src/java/org/objectweb/gotm/lib/jta/TransactionImpl.java:1.2
gotm-jts/src/java/org/objectweb/gotm/lib/jta/TransactionImpl.java:1.3
--- gotm-jts/src/java/org/objectweb/gotm/lib/jta/TransactionImpl.java:1.2
Mon Jan 10 17:17:31 2005
+++ gotm-jts/src/java/org/objectweb/gotm/lib/jta/TransactionImpl.java Fri
Jan 14 17:56:03 2005
@@ -22,7 +22,7 @@
Contributor(s): ______________________________________.
---------------------------------------------------------------------
- $Id: TransactionImpl.java,v 1.2 2005/01/10 16:17:31 rouvoy Exp $
+ $Id: TransactionImpl.java,v 1.3 2005/01/14 16:56:03 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm.lib.jta;
@@ -45,8 +45,8 @@
/**
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
* @created 24 déc. 2004
- * @modified $Date: 2005/01/10 16:17:31 $
- * @version $Revision: 1.2 $
+ * @modified $Date: 2005/01/14 16:56:03 $
+ * @version $Revision: 1.3 $
* @fractal.itf name="transaction" signature="javax.transaction.Transaction"
* @fractal.itf name="user-transaction"
signature="javax.transaction.UserTransaction"
* @fractal.itf name="commit" role="client"
signature="org.objectweb.transaction.api.coordination.CoordinationFeature"
@@ -226,10 +226,12 @@
XAResourceImpl res = new XAResourceImpl();
try {
res.bindFc("xa-resource",arg0);
+ res.bindFc(SubscribeFeature.SUBSCRIBE_FEATURE,
getResSubscribe());
} catch (NoSuchInterfaceException e) {
getTrace().debug(e.getMessage());
}
- res.configure(getResSubscribe());
+ res.startFc();
+ res.loadFc();
return false;
}
@@ -250,10 +252,12 @@
SynchronizationImpl sync = new SynchronizationImpl();
try {
sync.bindFc("synchronization", arg0);
+ sync.bindFc(SubscribeFeature.SUBSCRIBE_FEATURE,
getSyncSubscribe());
} catch (NoSuchInterfaceException e) {
e.printStackTrace();
}
- sync.configure(getSyncSubscribe());
+ sync.startFc();
+ sync.loadFc();
}
/* (non-Javadoc)
Index:
gotm-jts/src/java/org/objectweb/gotm/lib/jta/TransactionManagerImpl.java
diff -u
gotm-jts/src/java/org/objectweb/gotm/lib/jta/TransactionManagerImpl.java:1.2
gotm-jts/src/java/org/objectweb/gotm/lib/jta/TransactionManagerImpl.java:1.3
---
gotm-jts/src/java/org/objectweb/gotm/lib/jta/TransactionManagerImpl.java:1.2
Mon Jan 10 17:17:31 2005
+++ gotm-jts/src/java/org/objectweb/gotm/lib/jta/TransactionManagerImpl.java
Fri Jan 14 17:56:03 2005
@@ -22,7 +22,7 @@
Contributor(s): ______________________________________.
---------------------------------------------------------------------
- $Id: TransactionManagerImpl.java,v 1.2 2005/01/10 16:17:31 rouvoy Exp $
+ $Id: TransactionManagerImpl.java,v 1.3 2005/01/14 16:56:03 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm.lib.jta;
@@ -50,8 +50,8 @@
* interface based on the GoTM library.
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
* @created 3 janv. 2005
- * @modified $Date: 2005/01/10 16:17:31 $
- * @version $Revision: 1.2 $
+ * @modified $Date: 2005/01/14 16:56:03 $
+ * @version $Revision: 1.3 $
* @fractal.itf name="tx-manager"
signature="javax.transaction.TransactionManager"
* @fractal.itf name="tx-factory" role="client"
signature="org.objectweb.fractal.api.Component"
*/
@@ -151,13 +151,23 @@
setCurrentTx(null);
}
- /* (non-Javadoc)
- * @see javax.transaction.TransactionManager#begin()
- */
- public void begin()
- throws NotSupportedException,
- SystemException
- {
+
+ private void reset(Transaction tx) {
+ Interface itf = (Interface) tx;
+ Component cpt = itf.getFcItfOwner();
+ try {
+ Fractal.getLifeCycleController(cpt).stopFc();
+ Fractal.getLifeCycleController(cpt).startFc();
+ } catch (IllegalLifeCycleException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (NoSuchInterfaceException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+ private Transaction create() throws SystemException {
Component cpt;
try {
cpt = getFactory().newFcInstance();
@@ -173,9 +183,23 @@
throw new SystemException(e.getClass()+": "+e.getMessage());
}
try {
- setCurrentTx((Transaction)cpt.getFcInterface("transaction"));
+ return (Transaction)cpt.getFcInterface("transaction");
} catch (NoSuchInterfaceException e1) {
throw new SystemException(e1.getClass()+": "+e1.getMessage());
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see javax.transaction.TransactionManager#begin()
+ */
+ public void begin()
+ throws NotSupportedException,
+ SystemException
+ {
+ try {
+ reset(getCurrentTx());
+ } catch (SystemException e) {
+ setCurrentTx(create());
}
getCurrentUserTx().setTransactionTimeout(getTxTimeout());
getCurrentUserTx().begin();
Index: gotm-jts/src/java/org/objectweb/gotm/lib/jta/WrapperImpl.java
diff -u gotm-jts/src/java/org/objectweb/gotm/lib/jta/WrapperImpl.java:1.2
gotm-jts/src/java/org/objectweb/gotm/lib/jta/WrapperImpl.java:1.3
--- gotm-jts/src/java/org/objectweb/gotm/lib/jta/WrapperImpl.java:1.2 Mon
Jan 10 17:17:31 2005
+++ gotm-jts/src/java/org/objectweb/gotm/lib/jta/WrapperImpl.java Fri
Jan 14 17:56:03 2005
@@ -23,34 +23,46 @@
Contributor(s): .
---------------------------------------------------------------------
-$Id: WrapperImpl.java,v 1.2 2005/01/10 16:17:31 rouvoy Exp $
+$Id: WrapperImpl.java,v 1.3 2005/01/14 16:56:03 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm.lib.jta;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.Map;
-import org.objectweb.fractal.lib.BindablePrimitive;
+import org.objectweb.gotm.lib.SubscribablePrimitive;
import org.objectweb.transaction.api.event.PublishFeature;
-import org.objectweb.transaction.api.event.SubscribeFeature;
/**
* Implementation of a wrapper.
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
* @created 22 déc. 2004
- * @modified $Date: 2005/01/10 16:17:31 $
- * @version $Revision: 1.2 $
+ * @modified $Date: 2005/01/14 16:56:03 $
+ * @version $Revision: 1.3 $
* @fractal.itf
*/
public abstract class WrapperImpl
- extends BindablePrimitive
+ extends SubscribablePrimitive
implements PublishFeature
{
/** list of available actions. */
private Map actions = new HashMap();
+ /* (non-Javadoc)
+ * @see org.objectweb.gotm.lib.SubscribablePrimitive#getEvents()
+ */
+ protected String[] getEvents() {
+ return (String[])this.actions.keySet().toArray(new String[0]);
+ }
+
+ /**
+ *
+ */
+ public WrapperImpl() {
+ declare();
+ }
+
/**
* Registers an new action under the label topic.
* @param topic the label of the action.
@@ -74,17 +86,6 @@
*/
protected abstract void declare();
- /**
- * Configure the subscription depending on the available this.actions.
- * @param subscribe the subscription entity.
- */
- public void configure(SubscribeFeature subscribe) {
- declare();
- Iterator topics = this.actions.keySet().iterator();
- while (topics.hasNext())
- subscribe.subscribe((String)topics.next(),this);
- }
-
/* (non-Javadoc)
* @see
org.objectweb.gotm.lib.topic.PublishFeature#notify(java.lang.String,
java.util.Map)
*/
Index: gotm-jts/src/java/org/objectweb/gotm/lib/jta/XAResourceImpl.java
diff -u gotm-jts/src/java/org/objectweb/gotm/lib/jta/XAResourceImpl.java:1.2
gotm-jts/src/java/org/objectweb/gotm/lib/jta/XAResourceImpl.java:1.3
--- gotm-jts/src/java/org/objectweb/gotm/lib/jta/XAResourceImpl.java:1.2
Mon Jan 10 17:17:31 2005
+++ gotm-jts/src/java/org/objectweb/gotm/lib/jta/XAResourceImpl.java Fri
Jan 14 17:56:03 2005
@@ -22,7 +22,7 @@
Contributor(s): ______________________________________.
---------------------------------------------------------------------
-$Id: XAResourceImpl.java,v 1.2 2005/01/10 16:17:31 rouvoy Exp $
+$Id: XAResourceImpl.java,v 1.3 2005/01/14 16:56:03 rouvoy Exp $
====================================================================*/
package org.objectweb.gotm.lib.jta;
@@ -35,6 +35,7 @@
import javax.transaction.xa.Xid;
import org.objectweb.fractal.api.NoSuchInterfaceException;
+import org.objectweb.transaction.api.event.SubscribeFeature;
import org.objectweb.transaction.api.resource.ResourceVote;
import org.objectweb.transaction.api.transaction.TransactionStatus;
import org.objectweb.transaction.api.xid.XidState;
@@ -52,8 +53,8 @@
/**
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
* @created 3 janv. 2005
- * @modified $Date: 2005/01/10 16:17:31 $
- * @version $Revision: 1.2 $
+ * @modified $Date: 2005/01/14 16:56:03 $
+ * @version $Revision: 1.3 $
* @fractal.itf name="xa-resource" role="client"
signature="javax.transaction.xa.XAResource"
*/
public class XAResourceImpl
@@ -71,7 +72,8 @@
*/
protected String[] clientFc() {
return new String[] {
- "xa-resource"
+ "xa-resource",
+ SubscribeFeature.SUBSCRIBE_FEATURE
};
}
| <-- Date Index --> | <-- Thread Index --> |
Powered by MHonArc.
Copyright © 2006-2007, OW2 Consortium | contact | webmaster.