Mail Archive Home | gotm-commits List | January 2005 Index
| <-- Date Index | <-- Thread Index |
Date: Thursday, January 20, 2005 @ 13:09:07
Author: rouvoy
Path: /cvsroot/gotm/fractal-pool
Added: examples/helloworld/.cvsignore
examples/helloworld/build.properties
examples/helloworld/build.xml
examples/helloworld/src/java/org/objectweb/fractal/example/HelloWorld.java
lib/fractal-template/fractal-template.jar
src/java/org/objectweb/fractal/julia/control/loading/BasicLoadingControllerMixin.java
src/java/org/objectweb/fractal/pool/api/Pool.java
src/java/org/objectweb/fractal/pool/api/PoolAttributeController.java
src/java/org/objectweb/fractal/pool/api/package.html
src/java/org/objectweb/fractal/pool/lib/PoolImpl.java
src/java/org/objectweb/fractal/pool/lib/package.html
src/java/org/objectweb/fractal/pool/util/Loading.java
src/java/org/objectweb/fractal/pool/util/package.html
src/monolog/monolog.properties
Modified: .classpath build.xml lib/fractal-xdoclet/fractal-xdoclet.jar
src/java/org/objectweb/fractal/julia/control/loading/BasicLoadingCoordinatorMixin.java
src/java/org/objectweb/fractal/julia/control/loading/ChainedIllegalLoadingException.java
src/java/org/objectweb/fractal/julia/control/loading/LifeCycleLoadingMixin.java
src/julia/loading.cfg
Removed: src/java/org/objectweb/fractal/lib/pool/package.html
* Implementation of a Fractal Loading controller.
* Adding example of use of the Loading controller.
* Basic implementation of a Fractal Pool component.
------------------------------------------------------------------------------------------+
.classpath
| 2
build.xml
| 293 +++++-----
examples/helloworld/.cvsignore
| 1
examples/helloworld/build.properties
| 21
examples/helloworld/build.xml
| 235 ++++++++
examples/helloworld/src/java/org/objectweb/fractal/example/HelloWorld.java
| 117 +++
lib/fractal-template/fractal-template.jar
| <<Binary file>>
lib/fractal-xdoclet/fractal-xdoclet.jar
| <<Binary file>>
src/java/org/objectweb/fractal/julia/control/loading/BasicLoadingControllerMixin.java
| 174 +++++
src/java/org/objectweb/fractal/julia/control/loading/BasicLoadingCoordinatorMixin.java
| 32 -
src/java/org/objectweb/fractal/julia/control/loading/ChainedIllegalLoadingException.java
| 33 -
src/java/org/objectweb/fractal/julia/control/loading/LifeCycleLoadingMixin.java
| 13
src/java/org/objectweb/fractal/lib/pool/package.html
| 29
src/java/org/objectweb/fractal/pool/api/Pool.java
| 50 +
src/java/org/objectweb/fractal/pool/api/PoolAttributeController.java
| 43 +
src/java/org/objectweb/fractal/pool/api/package.html
| 29
src/java/org/objectweb/fractal/pool/lib/PoolImpl.java
| 250 ++++++++
src/java/org/objectweb/fractal/pool/lib/package.html
| 29
src/java/org/objectweb/fractal/pool/util/Loading.java
| 48 +
src/java/org/objectweb/fractal/pool/util/package.html
| 29
src/julia/loading.cfg
| 174 +++++
src/monolog/monolog.properties
| 54 +
22 files changed, 1419 insertions(+), 237 deletions(-)
Index: fractal-pool/.classpath
diff -u fractal-pool/.classpath:1.1 fractal-pool/.classpath:1.2
--- fractal-pool/.classpath:1.1 Fri Jan 14 17:30:20 2005
+++ fractal-pool/.classpath Thu Jan 20 13:09:06 2005
@@ -1,11 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/java"/>
+ <classpathentry kind="src" path="examples/helloworld/src/java"/>
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lib/monolog/ow_monolog.jar"/>
<classpathentry kind="lib" path="lib/utils/ow_util_trace.jar"/>
<classpathentry kind="lib" path="lib/fractal/fractal.jar"/>
<classpathentry kind="lib" path="lib/fractal-adl/fractal-adl.jar"/>
<classpathentry kind="lib" path="lib/julia/julia-runtime.jar"/>
+ <classpathentry kind="lib"
path="lib/fractal-template/fractal-template.jar"/>
<classpathentry kind="output" path="build/class"/>
</classpath>
Index: fractal-pool/build.xml
diff -u fractal-pool/build.xml:1.1 fractal-pool/build.xml:1.2
--- fractal-pool/build.xml:1.1 Fri Jan 14 17:30:20 2005
+++ fractal-pool/build.xml Thu Jan 20 13:09:06 2005
@@ -21,144 +21,155 @@
<!-- Initial developer(s): Romain Rouvoy. -->
<!-- Contributor(s): ______________________________________. -->
-<!-- $Id: build.xml,v 1.1 2005/01/14 16:30:20 rouvoy Exp $ -->
+<!-- $Id: build.xml,v 1.2 2005/01/20 12:09:06 rouvoy Exp $ -->
<!-- ==================================================================== -->
-<project name="fractal-template" default="fractal-all">
- <description>GoTM Project [gotm.objectweb.org] - Fractal
Template</description>
+<project name="Fractal Pool" default="pool-all">
+ <description>GoTM Project [gotm.objectweb.org] - Fractal Pool
package</description>
- <!-- ==================== -->
- <!-- PROPERTY DEFINITIONS -->
- <!-- ==================== -->
-
- <property name="src.dir" value="src"/>
- <property name="doc.dir" value="doc"/>
- <property name="class.dir" value="class"/>
- <property name="lib.dir" value="lib"/>
- <property name="julia.dir" value="julia"/>
- <property name="fractal.dir" value="fractal"/>
- <property name="ant.dir" value="ant"/>
-
- <property name="java.dir" value="${src.dir}/java"/>
- <property name="log.dir" value="${src.dir}/monolog"/>
-
- <property name="build.dir" value="${basedir}/build"/>
- <property name="dist.dir" value="${basedir}/dist"/>
-
- <property name="project.jar" value="fractal-template.jar"/>
- <property name="project.version" value="0.1"/>
- <property name="project.dist" value="FractalTemplate"/>
-
- <!-- ================ -->
- <!-- PATH DEFINITIONS -->
- <!-- ================ -->
-
- <path id="classpath">
- <fileset dir="${build.dir}/${lib.dir}" includes="**/*.jar"/>
- <pathelement location="${build.dir}/${class.dir}"/>
- </path>
-
- <!-- ================== -->
- <!-- TARGET DEFINITIONS -->
- <!-- ================== -->
-
- <target name="fractal-all" description="fractal-clean +
fractal-build">
- <antcall target="fractal-clean"/>
- <antcall target="fractal-build"/>
- </target>
-
- <target name="-fractal-prepare">
- <copy todir="${build.dir}/${lib.dir}">
- <mapper type="flatten"/>
- <fileset dir="${basedir}/${lib.dir}"
includes="**/*.*"/>
- </copy>
- <mkdir dir="${build.dir}/${julia.dir}"/>
- <copy todir="${build.dir}/${julia.dir}">
- <fileset dir="${basedir}/${src.dir}/${julia.dir}"
includes="**/*"/>
- </copy>
- </target>
-
- <target name="fractal-compile" depends="-fractal-prepare"
- description="Compiles Fractal library.">
- <mkdir dir="${build.dir}/${class.dir}"/>
- <javac srcdir="${basedir}/${java.dir}"
- destdir="${build.dir}/${class.dir}" debug="on">
- <classpath refid="classpath"/>
- <include name="org/objectweb/fractal/lib/**/*.java"/>
- </javac>
- </target>
+ <!-- ==================== -->
+ <!-- PROPERTY DEFINITIONS -->
+ <!-- ==================== -->
+
+ <property name="src.dir" value="src" />
+ <property name="doc.dir" value="doc" />
+ <property name="class.dir" value="class" />
+ <property name="lib.dir" value="lib" />
+ <property name="julia.dir" value="julia" />
+ <property name="fractal.dir" value="fractal" />
+ <property name="ant.dir" value="ant" />
+ <property name="log.dir" value="monolog" />
+
+ <property name="java.dir" value="${src.dir}/java" />
+
+ <property name="build.dir" value="${basedir}/build" />
+ <property name="dist.dir" value="${basedir}/dist" />
+
+ <property name="pool.jar" value="fractal-pool.jar" />
+ <property name="pool.version" value="0.1" />
+ <property name="pool.dist" value="FractalPool" />
+
+ <!-- ================ -->
+ <!-- PATH DEFINITIONS -->
+ <!-- ================ -->
+
+ <path id="classpath">
+ <fileset dir="${build.dir}/${lib.dir}" includes="**/*.jar" />
+ <pathelement location="${build.dir}/${class.dir}" />
+ </path>
+
+ <!-- ================== -->
+ <!-- TARGET DEFINITIONS -->
+ <!-- ================== -->
+
+ <target name="pool-all" description="pool-clean + pool-build">
+ <antcall target="pool-clean" />
+ <antcall target="pool-build" />
+ </target>
+
+ <target name="-pool-prepare">
+ <copy todir="${build.dir}/${lib.dir}">
+ <mapper type="flatten" />
+ <fileset dir="${basedir}/${lib.dir}" includes="**/*.*" />
+ </copy>
+ <mkdir dir="${build.dir}/${julia.dir}" />
+ <copy todir="${build.dir}/${julia.dir}">
+ <fileset dir="${basedir}/${src.dir}/${julia.dir}" includes="**/*" />
+ </copy>
+ <mkdir dir="${build.dir}/${log.dir}" />
+ <copy todir="${build.dir}/${log.dir}">
+ <fileset dir="${basedir}/${src.dir}/${log.dir}" includes="**/*" />
+ </copy>
+ </target>
+
+ <target name="pool-compile"
+ depends="-pool-prepare"
+ description="Compiles Fractal library.">
+ <mkdir dir="${build.dir}/${class.dir}" />
+ <javac srcdir="${basedir}/${java.dir}"
+ destdir="${build.dir}/${class.dir}"
+ debug="on">
+ <classpath refid="classpath" />
+ <include name="org/objectweb/fractal/**/*.java" />
+ </javac>
+ </target>
<target name="-doclet-init">
<copy todir="${build.dir}/${ant.dir}">
- <fileset dir="${basedir}/${lib.dir}/fractal-xdoclet"/>
+ <fileset dir="${basedir}/${lib.dir}/fractal-xdoclet" />
</copy>
<taskdef name="xdoclet" classname="xdoclet.DocletTask">
<classpath>
- <fileset dir="${build.dir}/${ant.dir}" includes="*.jar"/>
+ <fileset dir="${build.dir}/${ant.dir}" includes="*.jar" />
</classpath>
</taskdef>
</target>
- <target name="fractal-doclet" depends="-doclet-init"
- description="Generates Fractal 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/fractal/**/*.java"/>
- <fractal-primitive/>
- </xdoclet>
- </target>
-
- <target name="fractal-fractal"
depends="fractal-doclet,fractal-compile">
- <mkdir dir="${build.dir}/${fractal.dir}"/>
- <copy todir="${build.dir}/${class.dir}" failonerror="false">
- <fileset dir="${basedir}/${src.dir}/${fractal.dir}">
- <include name="**/*.fractal"/>
- </fileset>
- </copy>
- </target>
-
- <target name="fractal-build" depends="fractal-fractal"
- description="Builds Fractal framework.">
- <jar destfile="${build.dir}/${lib.dir}/${project.jar}">
- <fileset dir="${build.dir}/${class.dir}"
includes="**/*"/>
- </jar>
- </target>
-
- <target name="fractal-jdoc" depends="-fractal-prepare"
- description="Generates the javadoc.">
- <javadoc destdir="${build.dir}/${doc.dir}" author="true"
version="true"
- use="true" private="true" windowtitle="Fractal Library."
- overview="${doc.dir}/overview.html" classpathref="classpath">
- <packageset dir="${basedir}/${java.dir}"
defaultexcludes="yes">
- <include name="**/*" />
- </packageset>
- <doctitle>
- <![CDATA[<h1>Fractal Library - v.
${project.version}</h1>]]>
- <![CDATA[<h2>Library Specification</h2>]]>
- </doctitle>
- <tag name="todo" scope="all" description="To do: "/>
- <tag name="fractal.adl" scope="all" description="Fractal ADL
Identifier: "/>
+ <target name="pool-doclet"
+ depends="-doclet-init"
+ description="Generates Fractal 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/fractal/**/*.java" />
+ <fractal-primitive />
+ </xdoclet>
+ </target>
- <group title="Fractal Libraries">
- <package name="org.objectweb.fractal.lib.*"/>
- </group>
+ <target name="pool-fractal" depends="pool-doclet,pool-compile">
+ <mkdir dir="${build.dir}/${fractal.dir}" />
+ <copy todir="${build.dir}/${class.dir}" failonerror="false">
+ <fileset dir="${basedir}/${src.dir}/${fractal.dir}">
+ <include name="**/*.fractal" />
+ </fileset>
+ </copy>
+ </target>
- <link href="http://java.sun.com/j2se/1.4.2/docs/api/"/>
- <link
href="http://fractal.objectweb.org/current/doc/javadoc/fractal/"/>
- <link href="http://monolog.objectweb.org/jdoc/ow_util_log/"/>
+ <target name="pool-build"
+ depends="pool-fractal"
+ description="Builds Fractal framework.">
+ <jar destfile="${build.dir}/${lib.dir}/${pool.jar}">
+ <fileset dir="${build.dir}/${class.dir}" includes="**/*" />
+ </jar>
+ </target>
+
+ <target name="pool-jdoc"
+ depends="-pool-prepare"
+ description="Generates the javadoc.">
+ <javadoc destdir="${build.dir}/${doc.dir}"
+ author="true"
+ version="true"
+ use="true"
+ private="true"
+ windowtitle="Fractal Library."
+ overview="${doc.dir}/overview.html"
+ classpathref="classpath">
+ <packageset dir="${basedir}/${java.dir}" defaultexcludes="yes">
+ <include name="**/*" />
+ </packageset>
+ <tag name="todo" scope="all" description="To do: " />
+ <tag name="fractal.adl"
+ scope="all"
+ description="Fractal ADL Identifier: " />
+
+ <group title="Fractal Libraries">
+ <package name="org.objectweb.fractal.lib.*" />
+ </group>
+ <!-- <doctitle>
+ <![CDATA[<h1>Fractal Library - v. ${pool.version}</h1>]]>
<![CDATA[<h2>Library Specification</h2>]]> </doctitle>
+ -->
</javadoc>
<replace file="${build.dir}/${doc.dir}/overview-summary.html"
- token="DO NOT REMOVE THIS LINE (will be automatically
removed)."/>
- <copy todir="${build.dir}/${doc.dir}">
- <fileset dir="${basedir}/${doc.dir}" includes="uml/*.png"/>
+ token="DO NOT REMOVE THIS LINE (will be automatically
removed)." />
+ <copy todir="${build.dir}/${doc.dir}" failonerror="false">
+ <fileset dir="${basedir}/${doc.dir}" includes="uml/*.png" />
</copy>
</target>
- <target name="fractal-dist-src" description="Builds the source
distribution.">
- <property name="dist-src" value="${project.dist}-${project.version}-src"
/>
+ <target name="pool-dist-src" description="Builds the source distribution.">
+ <property name="dist-src" value="${pool.dist}-${pool.version}-src" />
<property name="dist-src.dir" value="${dist.dir}/${dist-src}" />
<mkdir dir="${dist-src.dir}" />
<copy todir="${dist-src.dir}" file="${basedir}/build.xml" />
@@ -176,38 +187,40 @@
<tar destfile="${dist.dir}/${dist-src}.tar" longfile="gnu">
<tarfileset dir="${dist.dir}" includes="${dist-src}/**/*" />
</tar>
- <gzip src="${dist.dir}/${dist-src}.tar"
- zipfile="${dist.dir}/${dist-src}.tar.gz" />
- <bzip2 src="${dist.dir}/${dist-src}.tar"
- zipfile="${dist.dir}/${dist-src}.tar.bz2" />
+ <gzip src="${dist.dir}/${dist-src}.tar"
+ zipfile="${dist.dir}/${dist-src}.tar.gz" />
+ <bzip2 src="${dist.dir}/${dist-src}.tar"
+ zipfile="${dist.dir}/${dist-src}.tar.bz2" />
</target>
- <target name="fractal-dist-bin" depends="fractal-build,fractal-jdoc"
- description="Builds the binary distribution.">
- <property name="dist-bin"
value="${project.dist}-${project.version}-bin"/>
- <property name="dist-bin.dir" value="${dist.dir}/${dist-bin}"/>
- <mkdir dir="${dist-bin.dir}"/>
+ <target name="pool-dist-bin"
+ depends="pool-build,pool-jdoc"
+ description="Builds the binary distribution.">
+ <property name="dist-bin" value="${pool.dist}-${pool.version}-bin" />
+ <property name="dist-bin.dir" value="${dist.dir}/${dist-bin}" />
+ <mkdir dir="${dist-bin.dir}" />
<copy todir="${dist-bin.dir}">
- <fileset dir="${build.dir}" includes="${doc.dir}/**/*"/>
- <fileset dir="${build.dir}" includes="${lib.dir}/**/*"/>
+ <fileset dir="${build.dir}" includes="${doc.dir}/**/*" />
+ <fileset dir="${build.dir}" includes="${lib.dir}/**/*" />
</copy>
<zip zipfile="${dist.dir}/${dist-bin}.zip">
- <fileset dir="${dist.dir}" includes="${dist-bin}/**/*"/>
+ <fileset dir="${dist.dir}" includes="${dist-bin}/**/*" />
</zip>
<tar destfile="${dist.dir}/${dist-bin}.tar" longfile="gnu">
- <tarfileset dir="${dist.dir}" includes="${dist-bin}/**/*"/>
+ <tarfileset dir="${dist.dir}" includes="${dist-bin}/**/*" />
</tar>
- <gzip src="${dist.dir}/${dist-bin}.tar"
- zipfile="${dist.dir}/${dist-bin}.tar.gz"/>
- <bzip2 src="${dist.dir}/${dist-bin}.tar"
- zipfile="${dist.dir}/${dist-bin}.tar.bz2"/>
+ <gzip src="${dist.dir}/${dist-bin}.tar"
+ zipfile="${dist.dir}/${dist-bin}.tar.gz" />
+ <bzip2 src="${dist.dir}/${dist-bin}.tar"
+ zipfile="${dist.dir}/${dist-bin}.tar.bz2" />
</target>
- <target name="fractal-dist" depends="fractal-dist-src,fractal-dist-bin"
- description="build all distributions"/>
-
- <target name="fractal-clean" description="clean Fractal framework">
- <delete dir="${build.dir}" failonerror="no"/>
- <delete dir="${dist.dir}" failonerror="no"/>
+ <target name="pool-dist"
+ depends="pool-dist-src,pool-dist-bin"
+ description="build all distributions" />
+
+ <target name="pool-clean" description="clean Fractal framework">
+ <delete dir="${build.dir}" failonerror="no" />
+ <delete dir="${dist.dir}" failonerror="no" />
</target>
</project>
Index: fractal-pool/examples/helloworld/.cvsignore
diff -u /dev/null fractal-pool/examples/helloworld/.cvsignore:1.1
--- /dev/null Thu Jan 20 13:09:07 2005
+++ fractal-pool/examples/helloworld/.cvsignore Thu Jan 20 13:09:06 2005
@@ -0,0 +1 @@
+build
Index: fractal-pool/examples/helloworld/build.properties
diff -u /dev/null fractal-pool/examples/helloworld/build.properties:1.1
--- /dev/null Thu Jan 20 13:09:07 2005
+++ fractal-pool/examples/helloworld/build.properties Thu Jan 20 13:09:06
2005
@@ -0,0 +1,21 @@
+# JVM arguments
+# add "-Djulia.loader.gen.log=err" to log the generated classes
+# add "-Djulia.loader.gen.dir=/tmp" to store the generated classes on disk
+
+run.jvm.parameters \
+ -Dfractal.provider=org.objectweb.fractal.julia.Julia \
+ -Djulia.loader=org.objectweb.fractal.julia.loader.DynamicLoader \
+ -Djulia.config=build/julia/julia.cfg,build/julia/loading.cfg
+
+# Java class to be launched
+
+run.classname org.objectweb.fractal.adl.Launcher
+
+# Application arguments
+# add "parser" to build the components automatically, by using a parser
+# add "templates" to build the components through templates
+# add "wrapper" to add an additional composite around each primitive
+
+run.parameters -fractal org.objectweb.fractal.example.FcHelloWorld r
+#run.parameters -fractal org.objectweb.fractal.example.ClientServerImpl r
+#run.parameters -fractal org.objectweb.fractal.example.SharedHelloWorld r
Index: fractal-pool/examples/helloworld/build.xml
diff -u /dev/null fractal-pool/examples/helloworld/build.xml:1.1
--- /dev/null Thu Jan 20 13:09:07 2005
+++ fractal-pool/examples/helloworld/build.xml Thu Jan 20 13:09:06 2005
@@ -0,0 +1,235 @@
+<!-- ==================================================================== -->
+
+<!-- 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/20 12:09:06 rouvoy Exp $ -->
+<!-- ==================================================================== -->
+
+<project name="Fractal Hello World example" default="example-all">
+ <description>GoTM Project [gotm.objectweb.org] - Fractal Pool
example</description>
+
+ <!-- ==================== -->
+ <!-- PROPERTY DEFINITIONS -->
+ <!-- ==================== -->
+
+ <property name="src.dir" value="src"/>
+ <property name="doc.dir" value="doc"/>
+ <property name="class.dir" value="class"/>
+ <property name="lib.dir" value="lib"/>
+ <property name="julia.dir" value="julia"/>
+ <property name="fractal.dir" value="fractal"/>
+ <property name="ant.dir" value="ant"/>
+ <property name="log.dir" value="monolog"/>
+
+ <property name="java.dir" value="${src.dir}/java"/>
+
+ <property name="build.dir" value="${basedir}/build"/>
+ <property name="dist.dir" value="${basedir}/dist"/>
+
+ <property name="project.jar" value="helloworld-example.jar"/>
+ <property name="project.version" value="0.1"/>
+ <property name="project.dist" value="HelloWorldExample"/>
+
+ <property file="build.properties"/>
+ <!-- ================ -->
+ <!-- PATH DEFINITIONS -->
+ <!-- ================ -->
+
+ <path id="classpath">
+ <fileset dir="${build.dir}/${lib.dir}" includes="**/*.jar"/>
+ <pathelement location="${build.dir}/${class.dir}"/>
+ </path>
+
+ <!-- ================== -->
+ <!-- TARGET DEFINITIONS -->
+ <!-- ================== -->
+
+ <target name="example-all" description="example-clean +
example-build">
+ <antcall target="example-clean"/>
+ <antcall target="example-build"/>
+ </target>
+
+ <target name="-example-prepare">
+ <ant dir="${basedir}/../.." target="pool-build"/>
+ <delete dir="${build.dir}/${class.dir}" failonerror="false"/>
+ <copy todir="${build.dir}/${lib.dir}" failonerror="false">
+ <mapper type="flatten"/>
+ <fileset dir="${basedir}/${lib.dir}"
includes="**/*.*"/>
+ </copy>
+ <mkdir dir="${build.dir}/${julia.dir}"/>
+ <copy todir="${build.dir}/${julia.dir}" failonerror="false">
+ <fileset dir="${basedir}/${src.dir}/${julia.dir}"
includes="**/*"/>
+ </copy>
+ <copy todir="${build.dir}/${class.dir}" failonerror="false">
+ <fileset dir="${basedir}/${src.dir}/${log.dir}"
includes="**/*"/>
+ </copy>
+ </target>
+
+ <target name="example-compile" depends="-example-prepare"
+ description="Compiles Fractal library.">
+ <mkdir dir="${build.dir}/${class.dir}"/>
+ <javac srcdir="${basedir}/${java.dir}"
+ destdir="${build.dir}/${class.dir}" debug="on">
+ <classpath refid="classpath"/>
+ <include
name="org/objectweb/fractal/example/**/*.java"/>
+ </javac>
+ <copy todir="${build.dir}/${class.dir}">
+ <fileset dir="${build.dir}/${log.dir}" includes="**/*.log"/>
+ </copy>
+ </target>
+
+ <target name="-doclet-init" depends="-example-prepare">
+ <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="example-doclet" depends="-doclet-init"
+ description="Generates Fractal 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/fractal/example/**/*.java"/>
+ <fractal-primitive/>
+ </xdoclet>
+ </target>
+
+ <target name="example-fractal"
depends="example-doclet,example-compile">
+ <mkdir dir="${build.dir}/${fractal.dir}"/>
+ <copy todir="${build.dir}/${class.dir}" failonerror="false">
+ <fileset dir="${basedir}/${src.dir}/${fractal.dir}">
+ <include name="**/*.fractal"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="example-build" depends="example-fractal"
+ description="Builds Fractal framework.">
+ <jar destfile="${build.dir}/${lib.dir}/${project.jar}">
+ <fileset dir="${build.dir}/${class.dir}"
includes="**/*"/>
+ </jar>
+ </target>
+
+ <target name="example-execute" depends="example-build"
+ description="Run the Fractal example">
+ <java classname="${run.classname}"
+ classpathref="classpath"
+ fork="yes"
+ failonerror="yes">
+ <jvmarg line="${run.jvm.parameters}"/>
+ <arg line="${run.parameters}"/>
+ </java>
+ </target>
+
+
+ <target name="example-jdoc" depends="-example-prepare"
+ description="Generates the javadoc.">
+ <javadoc destdir="${build.dir}/${doc.dir}" author="true"
version="true"
+ use="true" private="true" windowtitle="XDoclet Example
Library."
+ overview="${doc.dir}/overview.html" classpathref="classpath">
+ <packageset dir="${basedir}/${java.dir}"
defaultexcludes="yes">
+ <include name="**/*" />
+ </packageset>
+ <doctitle>
+ <![CDATA[<h1>XDoclet Example- v.
${project.version}</h1>]]>
+ <![CDATA[<h2>Library Specification</h2>]]>
+ </doctitle>
+ <tag name="todo" scope="all" description="To do: "/>
+ <tag name="fractal.adl" scope="all" description="Fractal ADL
Identifier: "/>
+
+ <group title="Example interfaces">
+ <package name="org.objectweb.fractal.example.api.*"/>
+ </group>
+ <group title="Example components">
+ <package name="org.objectweb.fractal.example.lib.*"/>
+ </group>
+
+ <link href="http://java.sun.com/j2se/1.4.2/docs/api/"/>
+ <link
href="http://fractal.objectweb.org/current/doc/javadoc/fractal/"/>
+ <link href="http://monolog.objectweb.org/jdoc/ow_util_log/"/>
+ </javadoc>
+ <replace file="${build.dir}/${doc.dir}/overview-summary.html"
+ token="DO NOT REMOVE THIS LINE (will be automatically
removed)."/>
+ <copy todir="${build.dir}/${doc.dir}">
+ <fileset dir="${basedir}/${doc.dir}" includes="uml/*.png"/>
+ </copy>
+ </target>
+
+
+ <target name="example-dist-src" description="Builds the source
distribution.">
+ <property name="dist-src" value="${project.dist}-${project.version}-src"
/>
+ <property name="dist-src.dir" value="${dist.dir}/${dist-src}" />
+ <mkdir dir="${dist-src.dir}" />
+ <copy todir="${dist-src.dir}" file="${basedir}/build.xml" />
+ <mkdir dir="${dist-src.dir}/${src.dir}" />
+ <copy todir="${dist-src.dir}/${src.dir}">
+ <fileset dir="${basedir}/${src.dir}" includes="**/*" />
+ </copy>
+ <mkdir dir="${dist-src.dir}/${doc.dir}" />
+ <copy todir="${dist-src.dir}/${doc.dir}">
+ <fileset dir="${basedir}/${doc.dir}" includes="**/*" />
+ </copy>
+ <zip zipfile="${dist.dir}/${dist-src}.zip">
+ <fileset dir="${dist.dir}" includes="${dist-src}/**/*" />
+ </zip>
+ <tar destfile="${dist.dir}/${dist-src}.tar" longfile="gnu">
+ <tarfileset dir="${dist.dir}" includes="${dist-src}/**/*" />
+ </tar>
+ <gzip src="${dist.dir}/${dist-src}.tar"
+ zipfile="${dist.dir}/${dist-src}.tar.gz" />
+ <bzip2 src="${dist.dir}/${dist-src}.tar"
+ zipfile="${dist.dir}/${dist-src}.tar.bz2" />
+ </target>
+
+ <target name="example-dist-bin" depends="example-build,example-jdoc"
+ description="Builds the binary distribution.">
+ <property name="dist-bin"
value="${project.dist}-${project.version}-bin"/>
+ <property name="dist-bin.dir" value="${dist.dir}/${dist-bin}"/>
+ <mkdir dir="${dist-bin.dir}"/>
+ <copy todir="${dist-bin.dir}">
+ <fileset dir="${build.dir}" includes="${doc.dir}/**/*"/>
+ <fileset dir="${build.dir}" includes="${lib.dir}/**/*"/>
+ </copy>
+ <zip zipfile="${dist.dir}/${dist-bin}.zip">
+ <fileset dir="${dist.dir}" includes="${dist-bin}/**/*"/>
+ </zip>
+ <tar destfile="${dist.dir}/${dist-bin}.tar" longfile="gnu">
+ <tarfileset dir="${dist.dir}" includes="${dist-bin}/**/*"/>
+ </tar>
+ <gzip src="${dist.dir}/${dist-bin}.tar"
+ zipfile="${dist.dir}/${dist-bin}.tar.gz"/>
+ <bzip2 src="${dist.dir}/${dist-bin}.tar"
+ zipfile="${dist.dir}/${dist-bin}.tar.bz2"/>
+ </target>
+
+ <target name="example-dist" depends="example-dist-src,example-dist-bin"
+ description="build all distributions"/>
+
+ <target name="example-clean" description="clean Fractal framework">
+ <delete dir="${build.dir}" failonerror="no"/>
+ <delete dir="${dist.dir}" failonerror="no"/>
+ </target>
+</project>
\ No newline at end of file
Index:
fractal-pool/examples/helloworld/src/java/org/objectweb/fractal/example/HelloWorld.java
diff -u /dev/null
fractal-pool/examples/helloworld/src/java/org/objectweb/fractal/example/HelloWorld.java:1.1
--- /dev/null Thu Jan 20 13:09:07 2005
+++
fractal-pool/examples/helloworld/src/java/org/objectweb/fractal/example/HelloWorld.java
Thu Jan 20 13:09:07 2005
@@ -0,0 +1,117 @@
+/*====================================================================
+
+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: HelloWorld.java,v 1.1 2005/01/20 12:09:07 rouvoy Exp $
+====================================================================*/
+package org.objectweb.fractal.example;
+
+import org.objectweb.fractal.api.Component;
+import org.objectweb.fractal.api.NoSuchInterfaceException;
+import org.objectweb.fractal.api.control.IllegalLoadingException;
+import org.objectweb.fractal.api.control.LoadingController;
+import org.objectweb.fractal.lib.BindablePrimitive;
+
+/**
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @version $Revision: 1.1 $
+ * @fractal.itf name="r" signature="java.lang.Runnable"
+ */
+public class HelloWorld
+extends BindablePrimitive
+implements LoadingController,Runnable
+{
+ private String message ;
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.fractal.api.control.LoadingController#getLoadState()
+ */
+ public String getLoadState() {
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.objectweb.fractal.api.control.LoadingController#loadFc()
+ */
+ public void loadFc() throws IllegalLoadingException {
+ System.out.println("Loading component state");
+ this.message="Hello World !";
+ }
+
+ /* (non-Javadoc)
+ * @see org.objectweb.fractal.api.control.LoadingController#unloadFc()
+ */
+ public void unloadFc() throws IllegalLoadingException {
+ System.out.println("Unloading component state");
+ this.message="";
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Runnable#run()
+ */
+ public void run() {
+ System.out.println(">>"+this.message);
+ try {
+ getLoadingController().loadFc();
+ } catch (IllegalLoadingException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ System.out.println(">>"+this.message);
+ try {
+ getLoadingController().unloadFc();
+ } catch (IllegalLoadingException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ System.out.println(">>"+this.message);
+ }
+
+ /* (non-Javadoc)
+ * @see org.objectweb.fractal.lib.BindablePrimitive#clientFc()
+ */
+ protected String[] clientFc() {
+ return new String[]{"component"};
+ }
+
+ protected Component getComponent() {
+ try {
+ return (Component) lookupFc("component");
+ } catch (NoSuchInterfaceException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ protected LoadingController getLoadingController(){
+ try {
+ return (LoadingController)
getComponent().getFcInterface("loading-controller");
+ } catch (NoSuchInterfaceException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ return null;
+ }
+}
Index: fractal-pool/lib/fractal-template/fractal-template.jar
cvs rdiff: failed to read diff file header /tmp/cvsBP55mk for
fractal-template.jar,v: end of file
Index: fractal-pool/lib/fractal-xdoclet/fractal-xdoclet.jar
cvs rdiff: failed to read diff file header /tmp/cvsQ2v8he for
fractal-xdoclet.jar,v: end of file
Index:
fractal-pool/src/java/org/objectweb/fractal/julia/control/loading/BasicLoadingControllerMixin.java
diff -u /dev/null
fractal-pool/src/java/org/objectweb/fractal/julia/control/loading/BasicLoadingControllerMixin.java:1.1
--- /dev/null Thu Jan 20 13:09:07 2005
+++
fractal-pool/src/java/org/objectweb/fractal/julia/control/loading/BasicLoadingControllerMixin.java
Thu Jan 20 13:09:07 2005
@@ -0,0 +1,174 @@
+/*====================================================================
+
+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: BasicLoadingControllerMixin.java,v 1.1 2005/01/20 12:09:07 rouvoy
Exp $
+ * ====================================================================
+ */
+package org.objectweb.fractal.julia.control.loading;
+
+import java.util.Iterator;
+
+import org.objectweb.fractal.api.Component;
+import org.objectweb.fractal.api.NoSuchInterfaceException;
+import org.objectweb.fractal.api.control.IllegalLoadingException;
+import org.objectweb.fractal.api.factory.InstantiationException;
+import org.objectweb.fractal.julia.Controller;
+import org.objectweb.fractal.julia.InitializationContext;
+import org.objectweb.fractal.julia.control.content.Util;
+import org.objectweb.fractal.julia.factory.ChainedInstantiationException;
+
+/**
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy </a>
+ * @created 18 janv. 2005
+ * @version $Revision: 1.1 $
+ * @modified $Date: 2005/01/20 12:09:07 $
+ */
+public abstract class BasicLoadingControllerMixin
+ implements Controller, LoadingCoordinator
+{
+ //
-------------------------------------------------------------------------
+ // Private constructor
+ //
-------------------------------------------------------------------------
+
+ private BasicLoadingControllerMixin() {
+ // Nothing to do...
+ }
+
+ //
-------------------------------------------------------------------------
+ // Fields and methods added and overriden by the mixin class
+ //
-------------------------------------------------------------------------
+
+ /**
+ * Initializes the fields of this mixin and then calls the overriden
method.
+ *
+ * @param ic
+ * information about the component to which this controller
+ * object belongs.
+ * @throws InstantiationException
+ * if the initialization fails.
+ */
+ public void initFcController(final InitializationContext ic)
+ throws InstantiationException {
+ try {
+ if (!(ic.getInterface("loading-controller") instanceof
LoadingCoordinator)) {
+ throw new Exception();
+ }
+ } catch (Exception e) {
+ try {
+ ic.getInterface("/loading-coordinator");
+ } catch (Exception f) {
+ throw new ChainedInstantiationException(f, null,
+ "The component must provide a LifeCycleCoordinator
interface");
+ }
+ }
+ _super_initFcController(ic);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.objectweb.fractal.api.control.LoadingController#loadFc()
+ */
+ public void loadFc() throws IllegalLoadingException {
+ setFcLoadState(true);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.objectweb.fractal.api.control.LoadingController#unloadFc()
+ */
+ public void unloadFc() throws IllegalLoadingException {
+ setFcLoadState(false);
+ }
+
+ /**
+ * Sets the load state of this component and of all its direct and
indirect
+ * sub components that have a {@link LoadingCoordinator}interface.
+ *
+ * @param loaded
+ * <tt>true</tt> to set the load state of the components to
+ * {@link #LOADED LOADED}, or <tt>false</tt> to set this state
+ * to {@link #UNLOADED UNLOADED}.
+ * @throws IllegalLoadingException
+ * if a problem occurs.
+ */
+ public void setFcLoadState(final boolean loaded)
+ throws IllegalLoadingException {
+ Component thisComponent;
+ try {
+ thisComponent = (Component) _this_weaveableC
+ .getFcInterface("component");
+ } catch (NoSuchInterfaceException e) {
+ throw new ChainedIllegalLoadingException(e, _this_weaveableC,
+ "Cannot set the lifecycle state");
+ }
+ for (Iterator i =
Util.getAllSubComponents(thisComponent).iterator(); i
+ .hasNext();) {
+ Component c = (Component) i.next();
+ LoadingCoordinator lc;
+ try {
+ lc = (LoadingCoordinator) c
+ .getFcInterface("loading-controller");
+ } catch (Exception e) {
+ try {
+ lc = (LoadingCoordinator) c
+ .getFcInterface("/loading-coordinator");
+ } catch (NoSuchInterfaceException f) {
+ continue;
+ }
+ }
+ if (loaded) {
+ lc.setFcLoaded();
+ } else {
+ lc.setFcUnloaded();
+ }
+ }
+ }
+
+ //
-------------------------------------------------------------------------
+ // Fields and methods required by the mixin class in the base class
+ //
-------------------------------------------------------------------------
+
+ /**
+ * The <tt>weaveableC</tt> field required by this mixin. This field is
+ * supposed to reference the {@link Component}interface of the component
to
+ * which this controller object belongs.
+ */
+ public Component _this_weaveableC;
+
+ /**
+ * The {@link Controller#initFcController initFcController}method
overriden
+ * by this mixin.
+ *
+ * @param ic
+ * information about the component to which this controller
+ * object belongs.
+ * @throws InstantiationException
+ * if the initialization fails.
+ */
+ public abstract void _super_initFcController(InitializationContext ic)
+ throws InstantiationException;
+}
Index:
fractal-pool/src/java/org/objectweb/fractal/julia/control/loading/BasicLoadingCoordinatorMixin.java
diff -u
fractal-pool/src/java/org/objectweb/fractal/julia/control/loading/BasicLoadingCoordinatorMixin.java:1.1
fractal-pool/src/java/org/objectweb/fractal/julia/control/loading/BasicLoadingCoordinatorMixin.java:1.2
---
fractal-pool/src/java/org/objectweb/fractal/julia/control/loading/BasicLoadingCoordinatorMixin.java:1.1
Fri Jan 14 17:30:20 2005
+++
fractal-pool/src/java/org/objectweb/fractal/julia/control/loading/BasicLoadingCoordinatorMixin.java
Thu Jan 20 13:09:07 2005
@@ -23,18 +23,17 @@
Contributor(s): .
---------------------------------------------------------------------
-$Id: BasicLoadingCoordinatorMixin.java,v 1.1 2005/01/14 16:30:20 rouvoy Exp $
+$Id: BasicLoadingCoordinatorMixin.java,v 1.2 2005/01/20 12:09:07 rouvoy Exp $
====================================================================*/
package org.objectweb.fractal.julia.control.loading;
import org.objectweb.fractal.api.control.IllegalLoadingException;
-import org.objectweb.fractal.api.control.LoadingController;
/**
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
* @created 13 janv. 2005
- * @modified $Date: 2005/01/14 16:30:20 $
- * @version $Revision: 1.1 $
+ * @modified $Date: 2005/01/20 12:09:07 $
+ * @version $Revision: 1.2 $
*/
public abstract class BasicLoadingCoordinatorMixin
implements LoadingCoordinator
@@ -44,6 +43,7 @@
//
-------------------------------------------------------------------------
private BasicLoadingCoordinatorMixin () {
+ // Nothing to do ...
}
//
-------------------------------------------------------------------------
@@ -56,10 +56,9 @@
public boolean fcLoaded;
//
-------------------------------------------------------------------------
- // Implementation of the LifeCycleController interface
+ // Implementation of the LifeCycleCoordinator interface
//
-------------------------------------------------------------------------
-
/* (non-Javadoc)
* @see
org.objectweb.fractal.julia.control.loading.LoadingCoordinator#setFcLoaded()
*/
@@ -82,28 +81,13 @@
return false;
}
+ //
-------------------------------------------------------------------------
+ // Implementation of the LifeCycleController interface
+ //
-------------------------------------------------------------------------
/* (non-Javadoc)
* @see
org.objectweb.fractal.api.control.LoadingController#getLoadState()
*/
public String getLoadState() {
return this.fcLoaded?LOADED:UNLOADED;
}
-
- /* (non-Javadoc)
- * @see org.objectweb.fractal.api.control.LoadingController#loadFc()
- */
- public void loadFc() throws IllegalLoadingException {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see org.objectweb.fractal.api.control.LoadingController#unloadFc()
- */
- public void unloadFc() throws IllegalLoadingException {
- // TODO Auto-generated method stub
-
- }
-
-
}
Index:
fractal-pool/src/java/org/objectweb/fractal/julia/control/loading/ChainedIllegalLoadingException.java
diff -u
fractal-pool/src/java/org/objectweb/fractal/julia/control/loading/ChainedIllegalLoadingException.java:1.1
fractal-pool/src/java/org/objectweb/fractal/julia/control/loading/ChainedIllegalLoadingException.java:1.2
---
fractal-pool/src/java/org/objectweb/fractal/julia/control/loading/ChainedIllegalLoadingException.java:1.1
Fri Jan 14 17:30:20 2005
+++
fractal-pool/src/java/org/objectweb/fractal/julia/control/loading/ChainedIllegalLoadingException.java
Thu Jan 20 13:09:07 2005
@@ -23,7 +23,7 @@
Contributor(s): .
---------------------------------------------------------------------
- $Id: ChainedIllegalLoadingException.java,v 1.1 2005/01/14 16:30:20 rouvoy
Exp $
+ $Id: ChainedIllegalLoadingException.java,v 1.2 2005/01/20 12:09:07 rouvoy
Exp $
====================================================================*/
package org.objectweb.fractal.julia.control.loading;
@@ -43,19 +43,18 @@
/**
* A sub class of the {@link IllegalLoadingException} class.
*/
-
public class ChainedIllegalLoadingException
extends IllegalLoadingException {
/**
* The exception that caused this exception. May be <tt>null</tt>.
*/
- private final Throwable exception;
+ private final Throwable fcException;
/**
* The component whose content is or would become illegal.
*/
- private transient Component component;
+ private transient Component fcComponent;
/**
* Constructs a new {@link ChainedIllegalLoadingException}exception.
@@ -71,8 +70,8 @@
final Component component,
final String message) {
super(message);
- this.exception = exception;
- this.component = component;
+ this.fcException = exception;
+ this.fcComponent = component;
}
/**
@@ -81,7 +80,7 @@
* @return the exception that caused this exception. May be
<tt>null</tt>.
*/
public Throwable getException() {
- return this.exception;
+ return this.fcException;
}
/**
@@ -90,13 +89,13 @@
* @return the component whose content is or would become illegal.
*/
public Component getComponent() {
- if (this.component != null && !(this.component instanceof
Interface)) {
+ if (this.fcComponent != null && !(this.fcComponent instanceof
Interface)) {
try {
- return (Component)
this.component.getFcInterface("component");
+ return (Component)
this.fcComponent.getFcInterface("component");
} catch (NoSuchInterfaceException ignored) { // Ignored
}
}
- return this.component;
+ return this.fcComponent;
}
//
-------------------------------------------------------------------------
@@ -122,9 +121,9 @@
* Prints the stack backtrace.
*/
public void printStackTrace() {
- if (this.exception != null) {
+ if (this.fcException != null) {
System.err.println(this);
- this.exception.printStackTrace();
+ this.fcException.printStackTrace();
} else {
super.printStackTrace();
}
@@ -137,9 +136,9 @@
* <tt>PrintStream</tt> to use for output.
*/
public void printStackTrace(final PrintStream s) {
- if (this.exception != null) {
+ if (this.fcException != null) {
s.println(this);
- this.exception.printStackTrace(s);
+ this.fcException.printStackTrace(s);
} else {
super.printStackTrace(s);
}
@@ -152,9 +151,9 @@
* <tt>PrintWriter</tt> to use for output.
*/
public void printStackTrace(final PrintWriter s) {
- if (this.exception != null) {
+ if (this.fcException != null) {
s.write(this + "\n");
- this.exception.printStackTrace(s);
+ this.fcException.printStackTrace(s);
} else {
super.printStackTrace(s);
}
@@ -178,6 +177,6 @@
private void readObject(final ObjectInputStream in) throws IOException,
ClassNotFoundException {
in.defaultReadObject();
- this.component = (Component) in.readObject();
+ this.fcComponent = (Component) in.readObject();
}
}
Index:
fractal-pool/src/java/org/objectweb/fractal/julia/control/loading/LifeCycleLoadingMixin.java
diff -u
fractal-pool/src/java/org/objectweb/fractal/julia/control/loading/LifeCycleLoadingMixin.java:1.1
fractal-pool/src/java/org/objectweb/fractal/julia/control/loading/LifeCycleLoadingMixin.java:1.2
---
fractal-pool/src/java/org/objectweb/fractal/julia/control/loading/LifeCycleLoadingMixin.java:1.1
Fri Jan 14 17:30:20 2005
+++
fractal-pool/src/java/org/objectweb/fractal/julia/control/loading/LifeCycleLoadingMixin.java
Thu Jan 20 13:09:07 2005
@@ -23,18 +23,17 @@
Contributor(s): .
---------------------------------------------------------------------
- $Id: LifeCycleLoadingMixin.java,v 1.1 2005/01/14 16:30:20 rouvoy Exp $
+ $Id: LifeCycleLoadingMixin.java,v 1.2 2005/01/20 12:09:07 rouvoy Exp $
====================================================================*/
package org.objectweb.fractal.julia.control.loading;
import org.objectweb.fractal.api.Component;
-import org.objectweb.fractal.api.control.ContentController;
import org.objectweb.fractal.api.control.IllegalLoadingException;
import org.objectweb.fractal.api.control.LifeCycleController;
import org.objectweb.fractal.api.control.LoadingController;
/**
- * Provides lifecycle related checks to a {@link ContentController}.<br>
+ * Provides lifecycle related checks to a {@link LoadingController}.<br>
* <br>
* <b>Requirements </b>
* <ul>
@@ -44,8 +43,8 @@
*
* @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy </a>
* @created 13 janv. 2005
- * @modified $Date: 2005/01/14 16:30:20 $
- * @version $Revision: 1.1 $
+ * @modified $Date: 2005/01/20 12:09:07 $
+ * @version $Revision: 1.2 $
*/
public abstract class LifeCycleLoadingMixin
implements LoadingController {
@@ -87,9 +86,9 @@
public void unloadFc() throws IllegalLoadingException {
if (_this_weaveableOptLC != null) {
String state = _this_weaveableOptLC.getFcState();
- if (!LifeCycleController.STOPPED.equals(state)) {
+ if (!LifeCycleController.STARTED.equals(state)) {
throw new ChainedIllegalLoadingException(null,
- _this_weaveableOptC, "The component is not stopped");
+ _this_weaveableOptC, "The component is not started");
}
}
_super_unloadFc();
Index: fractal-pool/src/java/org/objectweb/fractal/lib/pool/package.html
diff -u fractal-pool/src/java/org/objectweb/fractal/lib/pool/package.html:1.1
fractal-pool/src/java/org/objectweb/fractal/lib/pool/package.html:removed
--- fractal-pool/src/java/org/objectweb/fractal/lib/pool/package.html:1.1
Fri Jan 14 17:30:20 2005
+++ fractal-pool/src/java/org/objectweb/fractal/lib/pool/package.html Thu
Jan 20 13:09:07 2005
@@ -1,29 +0,0 @@
-<html>
- <!-- ====================================================================
-->
- <!-- GoTM: GoTM is an open Transaction Monitor
-->
- <!-- Contact: gotm-team@xxxxxxxxxxxxx
-->
- <!-- This library is free software; you can redistribute it and/or
-->
- <!-- modify it under the terms of the GNU Lesser General Public
-->
- <!-- License as published by the Free Software Foundation; either
-->
- <!-- version 2.1 of the License, or any later version.
-->
- <!-- This library is distributed in the hope that it will be useful,
-->
- <!-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-->
- <!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-->
- <!-- Lesser General Public License for more details.
-->
- <!-- You should have received a copy of the GNU Lesser General Public
-->
- <!-- License along with this library; if not, write to the Free Software
-->
- <!-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-->
- <!-- USA
-->
- <!-- Initial developer(s): Romain Rouvoy.
-->
- <!-- Contributor(s): ______________________________________.
-->
- <!-- $Id: package.html,v 1.1 2005/01/14 16:30:20 rouvoy Exp $ -->
- <!-- ====================================================================
-->
- <head>
- <title>Fractal Pooling Library.</title>
- </head>
- <body>
- <p> Pooling Library for the development of Fractal Applications. </p>
- <p> This part includes only the basic interfaces which would be reused
by
- the differents modules of the Transaction Working Group. </p>
- </body>
-</html>
\ No newline at end of file
Index: fractal-pool/src/java/org/objectweb/fractal/pool/api/Pool.java
diff -u /dev/null
fractal-pool/src/java/org/objectweb/fractal/pool/api/Pool.java:1.1
--- /dev/null Thu Jan 20 13:09:07 2005
+++ fractal-pool/src/java/org/objectweb/fractal/pool/api/Pool.java Thu
Jan 20 13:09:07 2005
@@ -0,0 +1,50 @@
+/*====================================================================
+
+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: Pool.java,v 1.1 2005/01/20 12:09:07 rouvoy Exp $
+====================================================================*/
+package org.objectweb.fractal.pool.api;
+
+import org.objectweb.fractal.api.Component;
+
+/**
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @version $Revision: 1.1 $
+ * @fractal.itf name="fc-pool"
+ */
+public interface Pool
+{
+ /**
+ * Provides an instance of ready-to-use component.
+ * @return a started and loaded component.
+ */
+ public Component getFcComponent();
+
+ /**
+ * Releases an instance of component that is no more used.
+ * @param cpt the ready-to-recycle component.
+ */
+ public void putFcComponent(Component cpt);
+}
Index:
fractal-pool/src/java/org/objectweb/fractal/pool/api/PoolAttributeController.java
diff -u /dev/null
fractal-pool/src/java/org/objectweb/fractal/pool/api/PoolAttributeController.java:1.1
--- /dev/null Thu Jan 20 13:09:07 2005
+++
fractal-pool/src/java/org/objectweb/fractal/pool/api/PoolAttributeController.java
Thu Jan 20 13:09:07 2005
@@ -0,0 +1,43 @@
+/*====================================================================
+
+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: PoolAttributeController.java,v 1.1 2005/01/20 12:09:07 rouvoy Exp $
+====================================================================*/
+package org.objectweb.fractal.pool.api;
+
+import org.objectweb.fractal.api.control.AttributeController;
+
+/**
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @version $Revision: 1.1 $
+ */
+public interface PoolAttributeController
+ extends AttributeController
+{
+ public void setMin(int nb);
+ public int getMin();
+ public void setMax(int nb);
+ public int getMax();
+}
Index: fractal-pool/src/java/org/objectweb/fractal/pool/api/package.html
diff -u /dev/null
fractal-pool/src/java/org/objectweb/fractal/pool/api/package.html:1.1
--- /dev/null Thu Jan 20 13:09:07 2005
+++ fractal-pool/src/java/org/objectweb/fractal/pool/api/package.html Thu
Jan 20 13:09:07 2005
@@ -0,0 +1,29 @@
+<html>
+ <!-- ====================================================================
-->
+ <!-- GoTM: GoTM is an open Transaction Monitor
-->
+ <!-- Contact: gotm-team@xxxxxxxxxxxxx
-->
+ <!-- This library is free software; you can redistribute it and/or
-->
+ <!-- modify it under the terms of the GNU Lesser General Public
-->
+ <!-- License as published by the Free Software Foundation; either
-->
+ <!-- version 2.1 of the License, or any later version.
-->
+ <!-- This library is distributed in the hope that it will be useful,
-->
+ <!-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-->
+ <!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-->
+ <!-- Lesser General Public License for more details.
-->
+ <!-- You should have received a copy of the GNU Lesser General Public
-->
+ <!-- License along with this library; if not, write to the Free Software
-->
+ <!-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-->
+ <!-- USA
-->
+ <!-- Initial developer(s): Romain Rouvoy.
-->
+ <!-- Contributor(s): ______________________________________.
-->
+ <!-- $Id: package.html,v 1.1 2005/01/20 12:09:07 rouvoy Exp $ -->
+ <!-- ====================================================================
-->
+ <head>
+ <title>Fractal Pooling Library.</title>
+ </head>
+ <body>
+ <p> Pooling Library for the development of Fractal Applications. </p>
+ <p> This part includes only the basic interfaces which would be reused
by
+ the differents modules of the Transaction Working Group. </p>
+ </body>
+</html>
\ No newline at end of file
Index: fractal-pool/src/java/org/objectweb/fractal/pool/lib/PoolImpl.java
diff -u /dev/null
fractal-pool/src/java/org/objectweb/fractal/pool/lib/PoolImpl.java:1.1
--- /dev/null Thu Jan 20 13:09:07 2005
+++ fractal-pool/src/java/org/objectweb/fractal/pool/lib/PoolImpl.java Thu
Jan 20 13:09:06 2005
@@ -0,0 +1,250 @@
+/*====================================================================
+
+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: PoolImpl.java,v 1.1 2005/01/20 12:09:06 rouvoy Exp $
+====================================================================*/
+package org.objectweb.fractal.pool.lib;
+
+import java.util.HashSet;
+import java.util.Set;
+import java.util.Stack;
+
+import org.objectweb.fractal.api.Component;
+import org.objectweb.fractal.api.NoSuchInterfaceException;
+import org.objectweb.fractal.api.control.IllegalLifeCycleException;
+import org.objectweb.fractal.api.control.IllegalLoadingException;
+import org.objectweb.fractal.api.control.LifeCycleController;
+import org.objectweb.fractal.api.control.LoadingController;
+import org.objectweb.fractal.api.factory.Factory;
+import org.objectweb.fractal.api.factory.InstantiationException;
+import org.objectweb.fractal.lib.BindablePrimitive;
+import org.objectweb.fractal.pool.api.Pool;
+import org.objectweb.fractal.pool.api.PoolAttributeController;
+import org.objectweb.fractal.pool.util.Loading;
+import org.objectweb.fractal.util.Fractal;
+
+/**
+ * Basic Implementation of a component pool.
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @version $Revision: 1.1 $
+ * @modified $Date: 2005/01/20 12:09:06 $
+ * @fractal.itf name="template" role="client"
signature="org.objectweb.fractal.api.Component"
+ */
+public class PoolImpl
+ extends BindablePrimitive
+ implements Pool, PoolAttributeController, LoadingController,
LifeCycleController
+{
+ /**
+ * @fractal.attr value="10"
+ */
+ private int min ;
+
+ /**
+ * @fractal.attr value="100"
+ */
+ private int max ;
+
+ private Stack inactive ;
+ private Set active ;
+
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.fractal.pool.api.PoolAttributeController#setMin(int)
+ */
+ public void setMin(int nb) {
+ this.min = nb ;
+ }
+
+ /* (non-Javadoc)
+ * @see org.objectweb.fractal.pool.api.PoolAttributeController#getMin()
+ */
+ public int getMin() {
+ return this.min;
+ }
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.fractal.pool.api.PoolAttributeController#setMax(int)
+ */
+ public void setMax(int nb) {
+ this.max = nb;
+ }
+
+ /* (non-Javadoc)
+ * @see org.objectweb.fractal.pool.api.PoolAttributeController#getMax()
+ */
+ public int getMax() {
+ return this.max;
+ }
+
+ /* (non-Javadoc)
+ * @see org.objectweb.fractal.lib.BindablePrimitive#clientFc()
+ */
+ protected String[] clientFc() {
+ return new String[] {"template"};
+ }
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.fractal.api.control.LoadingController#getLoadState()
+ */
+ public String getLoadState() { return null; }
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.fractal.api.control.LifeCycleController#getFcState()
+ */
+ public String getFcState() { return null; }
+
+ protected Factory getTemplate() {
+ try {
+ Component cpt = (Component) lookupFc("template");
+ return (Factory) cpt.getFcInterface("factory");
+ } catch (NoSuchInterfaceException e) {
+ return null;
+ }
+ }
+
+ protected Component create() throws InstantiationException {
+ Component c = getTemplate().newFcInstance();
+ try {
+ Fractal.getLifeCycleController(c).startFc();
+ } catch (IllegalLifeCycleException e) {
+ throw new InstantiationException(e.getMessage());
+ } catch (NoSuchInterfaceException e) {
+ throw new InstantiationException(e.getMessage());
+ }
+ return c;
+ }
+
+ /* (non-Javadoc)
+ * @see org.objectweb.fractal.api.control.LifeCycleController#startFc()
+ */
+ public void startFc() throws IllegalLifeCycleException {
+ this.inactive = new Stack();
+ this.active = new HashSet();
+ }
+
+ /* (non-Javadoc)
+ * @see org.objectweb.fractal.api.control.LifeCycleController#stopFc()
+ */
+ public void stopFc() throws IllegalLifeCycleException {
+ this.inactive = null ;
+ this.active = null ;
+ }
+
+ /**
+ * @param list
+ * @throws IllegalLoadingException
+ */
+ protected void clear(Stack list) throws IllegalLoadingException {
+ while (!list.isEmpty()) {
+ Component c = (Component) list.pop() ;
+ try {
+ Fractal.getLifeCycleController(c).stopFc();
+ } catch (Exception e) {
+ throw new IllegalLoadingException(e.getMessage());
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.objectweb.fractal.api.control.LoadingController#loadFc()
+ */
+ public void loadFc() throws IllegalLoadingException {
+ for (int i=0 ; i< getMin() ; i++) {
+ try {
+ this.inactive.push(create());
+ } catch (InstantiationException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.objectweb.fractal.api.control.LoadingController#unloadFc()
+ */
+ public void unloadFc() throws IllegalLoadingException {
+ while(!this.active.isEmpty()) {
+ try {
+ wait();
+ } catch (InterruptedException e) {
+ break;
+ }
+ }
+ clear(this.inactive);
+ }
+
+
+ /**
+ * @return
+ * @throws InstantiationException
+ */
+ protected Component retrieveFc() throws InstantiationException {
+ if (!this.inactive.isEmpty())
+ return (Component) this.inactive.pop();
+ if (this.active.size() < getMax())
+ return create();
+ while(this.inactive.isEmpty()) {
+ try {
+ wait();
+ } catch (InterruptedException e) {
+ }
+ }
+ return (Component) this.inactive.pop();
+ }
+
+ /* (non-Javadoc)
+ * @see org.objectweb.fractal.pool.api.Pool#getFcComponent()
+ */
+ public Component getFcComponent() {
+ Component c;
+ try {
+ c = retrieveFc();
+ } catch (InstantiationException e1) {
+ e1.printStackTrace();
+ return null;
+ }
+ try {
+ Loading.getLoadingController(c).loadFc();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ this.active.add(c);
+ return c;
+ }
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.fractal.pool.api.Pool#putFcComponent(org.objectweb.fractal.api.Component)
+ */
+ public void putFcComponent(Component c) {
+ if (!this.active.contains(c))
+ return;
+ this.active.remove(c);
+ try {
+ Loading.getLoadingController(c).unloadFc();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ this.inactive.push(c);
+ }
+}
\ No newline at end of file
Index: fractal-pool/src/java/org/objectweb/fractal/pool/lib/package.html
diff -u /dev/null
fractal-pool/src/java/org/objectweb/fractal/pool/lib/package.html:1.1
--- /dev/null Thu Jan 20 13:09:07 2005
+++ fractal-pool/src/java/org/objectweb/fractal/pool/lib/package.html Thu
Jan 20 13:09:06 2005
@@ -0,0 +1,29 @@
+<html>
+ <!-- ====================================================================
-->
+ <!-- GoTM: GoTM is an open Transaction Monitor
-->
+ <!-- Contact: gotm-team@xxxxxxxxxxxxx
-->
+ <!-- This library is free software; you can redistribute it and/or
-->
+ <!-- modify it under the terms of the GNU Lesser General Public
-->
+ <!-- License as published by the Free Software Foundation; either
-->
+ <!-- version 2.1 of the License, or any later version.
-->
+ <!-- This library is distributed in the hope that it will be useful,
-->
+ <!-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-->
+ <!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-->
+ <!-- Lesser General Public License for more details.
-->
+ <!-- You should have received a copy of the GNU Lesser General Public
-->
+ <!-- License along with this library; if not, write to the Free Software
-->
+ <!-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-->
+ <!-- USA
-->
+ <!-- Initial developer(s): Romain Rouvoy.
-->
+ <!-- Contributor(s): ______________________________________.
-->
+ <!-- $Id: package.html,v 1.1 2005/01/20 12:09:06 rouvoy Exp $ -->
+ <!-- ====================================================================
-->
+ <head>
+ <title>Fractal Pooling Library.</title>
+ </head>
+ <body>
+ <p> Pooling Library for the development of Fractal Applications. </p>
+ <p> This part includes only the basic interfaces which would be reused
by
+ the differents modules of the Transaction Working Group. </p>
+ </body>
+</html>
\ No newline at end of file
Index: fractal-pool/src/java/org/objectweb/fractal/pool/util/Loading.java
diff -u /dev/null
fractal-pool/src/java/org/objectweb/fractal/pool/util/Loading.java:1.1
--- /dev/null Thu Jan 20 13:09:07 2005
+++ fractal-pool/src/java/org/objectweb/fractal/pool/util/Loading.java Thu
Jan 20 13:09:07 2005
@@ -0,0 +1,48 @@
+/*====================================================================
+
+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: Loading.java,v 1.1 2005/01/20 12:09:07 rouvoy Exp $
+====================================================================*/
+package org.objectweb.fractal.pool.util;
+
+import org.objectweb.fractal.api.Component;
+import org.objectweb.fractal.api.NoSuchInterfaceException;
+import org.objectweb.fractal.api.control.LoadingController;
+
+/**
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @version $Revision: 1.1 $
+ */
+public class Loading
+{
+ /**
+ * @param c
+ * @return
+ * @throws NoSuchInterfaceException
+ */
+ public static LoadingController getLoadingController(Component c) throws
NoSuchInterfaceException {
+ return (LoadingController) c.getFcInterface("loading-controller");
+ }
+}
Index: fractal-pool/src/java/org/objectweb/fractal/pool/util/package.html
diff -u /dev/null
fractal-pool/src/java/org/objectweb/fractal/pool/util/package.html:1.1
--- /dev/null Thu Jan 20 13:09:07 2005
+++ fractal-pool/src/java/org/objectweb/fractal/pool/util/package.html Thu
Jan 20 13:09:07 2005
@@ -0,0 +1,29 @@
+<html>
+ <!-- ====================================================================
-->
+ <!-- GoTM: GoTM is an open Transaction Monitor
-->
+ <!-- Contact: gotm-team@xxxxxxxxxxxxx
-->
+ <!-- This library is free software; you can redistribute it and/or
-->
+ <!-- modify it under the terms of the GNU Lesser General Public
-->
+ <!-- License as published by the Free Software Foundation; either
-->
+ <!-- version 2.1 of the License, or any later version.
-->
+ <!-- This library is distributed in the hope that it will be useful,
-->
+ <!-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-->
+ <!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-->
+ <!-- Lesser General Public License for more details.
-->
+ <!-- You should have received a copy of the GNU Lesser General Public
-->
+ <!-- License along with this library; if not, write to the Free Software
-->
+ <!-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-->
+ <!-- USA
-->
+ <!-- Initial developer(s): Romain Rouvoy.
-->
+ <!-- Contributor(s): ______________________________________.
-->
+ <!-- $Id: package.html,v 1.1 2005/01/20 12:09:07 rouvoy Exp $ -->
+ <!-- ====================================================================
-->
+ <head>
+ <title>Fractal Pooling Library.</title>
+ </head>
+ <body>
+ <p> Pooling Library for the development of Fractal Applications. </p>
+ <p> This part includes only the basic interfaces which would be reused
by
+ the differents modules of the Transaction Working Group. </p>
+ </body>
+</html>
\ No newline at end of file
Index: fractal-pool/src/julia/loading.cfg
diff -u fractal-pool/src/julia/loading.cfg:1.1
fractal-pool/src/julia/loading.cfg:1.2
--- fractal-pool/src/julia/loading.cfg:1.1 Fri Jan 14 17:30:21 2005
+++ fractal-pool/src/julia/loading.cfg Thu Jan 20 13:09:07 2005
@@ -28,6 +28,19 @@
#
-----------------------------------------------------------------------------
+# CONTROLLER DESCRIPTORS
+#
-----------------------------------------------------------------------------
+
+(optimizationLevel
+ # choose one of the following optimization options:
+ none
+ # mergeControllers
+ # mergeControllersAndInterceptors
+ # mergeControllersAndContent
+ # mergeControllersInterceptorsAndContent
+)
+
+#
-----------------------------------------------------------------------------
# CONTROLLER INTERFACES
#
# each definition must be of the form (interface-name interface-signature)
@@ -43,8 +56,9 @@
(loading-controller
org.objectweb.fractal.julia.control.loading.LoadingCoordinator)
)
-(loading-coordinator-itf
- (/loading-coordinator org.objectweb.fractal.julia.control.
+(julia-loading-controller-itf
+ (/loading-coordinator
org.objectweb.fractal.julia.control.loading.LoadingCoordinator)
+)
#
-----------------------------------------------------------------------------
# CONTROLLER OBJECTS
@@ -52,36 +66,156 @@
# each definition must be an object descriptor
#
-----------------------------------------------------------------------------
-# LoadingController implementation (for primitive or composite components)
+# LifeCycleController implementation (for primitive or composite components)
with implicit logger
+(lifecycle-controller-impl
+ ((org.objectweb.fractal.julia.asm.MixinClassGenerator
+ LifeCycleControllerImpl
+ org.objectweb.fractal.julia.BasicControllerMixin
+ org.objectweb.fractal.julia.UseComponentMixin
+
org.objectweb.fractal.julia.control.lifecycle.BasicLifeCycleCoordinatorMixin
+
org.objectweb.fractal.julia.control.lifecycle.BasicLifeCycleControllerMixin
+ # to check that mandatory client interfaces are bound in startFc:
+ org.objectweb.fractal.julia.control.lifecycle.TypeLifeCycleMixin
+ # to automatically assign the logger and logger factory:
+ org.objectweb.fractal.julia.BasicInitializableMixin
+ org.objectweb.fractal.julia.logger.LoggerLifeCycleMixin
+ # to notify the encapsulated component (if present) when its state
changes:
+ org.objectweb.fractal.julia.control.lifecycle.ContainerLifeCycleMixin
+ )
+ # optional initialization parameter (monolog configuration file name):
+ (monolog-conf-file monolog.properties)
+ )
+)
+# LoadingController implementation (for primitive or composite components)
(loading-controller-impl
((org.objectweb.fractal.julia.asm.MixinClassGenerator
LoadingControllerImpl
org.objectweb.fractal.julia.BasicControllerMixin
+ org.objectweb.fractal.julia.control.loading.BasicLoadingCoordinatorMixin
org.objectweb.fractal.julia.UseComponentMixin
- org.objectweb.fractal.julia.control.lifecycle.UseLifeCycleControllerMixin
org.objectweb.fractal.julia.control.loading.BasicLoadingControllerMixin
-
#org.objectweb.fractal.julia.control.lifecycle.BasicLifeCycleCoordinatorMixin
-
#org.objectweb.fractal.julia.control.lifecycle.BasicLifeCycleControllerMixin
- # to check that mandatory client interfaces are bound in startFc:
- #org.objectweb.fractal.julia.control.lifecycle.TypeLifeCycleMixin
+ # to check lifecycle related constraints:
+ org.objectweb.fractal.julia.control.lifecycle.UseLifeCycleControllerMixin
+ org.objectweb.fractal.julia.control.loading.LifeCycleLoadingMixin
# to notify the encapsulated component (if present) when its state
changes:
org.objectweb.fractal.julia.control.loading.ContainerLoadingMixin
))
)
-# LifeCycleController implementation (for composite components only)
+#
-----------------------------------------------------------------------------
+# CONTROLLER OBJECTS
+#
+# each definition must be an object descriptor
+#
-----------------------------------------------------------------------------
-(composite-loading-controller-impl
- ((org.objectweb.fractal.julia.asm.MixinClassGenerator
- CompositeLoadingControllerImpl
- org.objectweb.fractal.julia.BasicControllerMixin
- org.objectweb.fractal.julia.UseComponentMixin
- org.objectweb.fractal.julia.control.lifecycle.UseLifeCycleControllerMixin
-
#org.objectweb.fractal.julia.control.lifecycle.BasicLifeCycleCoordinatorMixin
-
#org.objectweb.fractal.julia.control.lifecycle.OptimizedLifeCycleControllerMixin
- # to check that mandatory client interfaces are bound in startFc:
- #org.objectweb.fractal.julia.control.lifecycle.TypeLifeCycleMixin
- ))
+# Component implementation
+
+(primitive
+ (
+ 'interface-class-generator
+ (
+ 'component-itf
+ 'binding-controller-itf
+ 'super-controller-itf
+ # only if super-controller-itf does not designate the Julia interface:
+ # 'julia-super-controller-itf
+ 'lifecycle-controller-itf
+ # only if lifecycle-controller-itf does not designate the Julia
interface:
+ # 'julia-lifecycle-controller-itf
+ 'name-controller-itf
+ 'loading-controller-itf
+ # only if loading-controller-itf does not designate the Julia
interface:
+ # 'julia-loading-controller-itf
+ )
+ (
+ 'component-impl
+ 'container-binding-controller-impl
+ 'super-controller-impl
+ 'lifecycle-controller-impl
+ 'name-controller-impl
+ 'loading-controller-impl
+ )
+ (
+ (org.objectweb.fractal.julia.asm.InterceptorClassGenerator
+ org.objectweb.fractal.julia.asm.LifeCycleCodeGenerator
+ )
+ )
+ org.objectweb.fractal.julia.asm.MergeClassGenerator
+ 'optimizationLevel
+ )
+)
+
+(composite
+ (
+ 'interface-class-generator
+ (
+ 'component-itf
+ 'binding-controller-itf
+ 'content-controller-itf
+ 'super-controller-itf
+ # only if super-controller-itf does not designate the Julia interface:
+ # 'julia-super-controller-itf
+ 'lifecycle-controller-itf
+ # only if lifecycle-controller-itf does not designate the Julia
interface:
+ # 'julia-lifecycle-controller-itf
+ 'name-controller-itf
+ 'loading-controller-itf
+ # only if loading-controller-itf does not designate the Julia
interface:
+ # 'julia-loading-controller-itf
+ )
+ (
+ 'component-impl
+ 'composite-binding-controller-impl
+ 'content-controller-impl
+ 'super-controller-impl
+ 'composite-lifecycle-controller-impl
+ 'name-controller-impl
+ 'loading-controller-impl
+ )
+ (
+ # no interceptors
+ )
+ org.objectweb.fractal.julia.asm.MergeClassGenerator
+ 'optimizationLevel
+ )
+)
+
+(parametricComposite
+ (
+ 'interface-class-generator
+ (
+ 'component-itf
+ 'binding-controller-itf
+ 'content-controller-itf
+ 'super-controller-itf
+ # only if super-controller-itf does not designate the Julia interface:
+ # 'julia-super-controller-itf
+ 'lifecycle-controller-itf
+ # only if lifecycle-controller-itf does not designate the Julia
interface:
+ # 'julia-lifecycle-controller-itf
+ 'name-controller-itf
+ 'loading-controller-itf
+ # only if loading-controller-itf does not designate the Julia
interface:
+ # 'julia-loading-controller-itf
+ )
+ (
+ 'component-impl
+ ((org.objectweb.fractal.julia.asm.AttributeControllerClassGenerator
+ ('attributeControllerInterface)
+ ))
+ 'composite-binding-controller-impl
+ 'content-controller-impl
+ 'super-controller-impl
+ 'composite-lifecycle-controller-impl
+ 'name-controller-impl
+ 'loading-controller-impl
+ )
+ (
+ # no interceptors
+ )
+ org.objectweb.fractal.julia.asm.MergeClassGenerator
+ 'optimizationLevel
+ )
)
Index: fractal-pool/src/monolog/monolog.properties
diff -u /dev/null fractal-pool/src/monolog/monolog.properties:1.1
--- /dev/null Thu Jan 20 13:09:07 2005
+++ fractal-pool/src/monolog/monolog.properties Thu Jan 20 13:09:07 2005
@@ -0,0 +1,54 @@
+# ====================================================================
+#
+# GoTM: GoTM is an open Transaction Monitor
+# Copyright (C) 2000-2004 INRIA - USTL - LIFL - GOAL
+# 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: monolog.properties,v 1.1 2005/01/20 12:09:07 rouvoy Exp $
+# ====================================================================
+# Log configuration file #
+
+# Define which wrapper to use (= log4j)
+log.config.classname
org.objectweb.util.monolog.wrapper.log4j.MonologLoggerFactory
+
+# tty : simple console handler
+handler.tty.type Console
+handler.tty.output System.out
+#handler.tty.pattern <%h> [%-3t{1}]: %m%n
+handler.tty.pattern [%-3t{1}]: %m%n
+
+# logf : file handler with extended headers
+#handler.logf.type File
+#handler.logf.output gotm.log
+#handler.logf.pattern <%-3t{1}> [%10r] %7p - %m%n
+
+# root definition for all loggers
+# logger.root.handler.0 tty
+# logger.root.level ERROR
+
+# Launcher Traces for handlers:
+# o tty --> prints logs to the standart output
+# o logf --> prints log to a file (monolog.log)
+
+logger.org.objectweb.fractal.handler.0 tty
+logger.org.objectweb.fractal.additivity false
+logger.org.objectweb.fractal.level ERROR
| <-- Date Index | <-- Thread Index |
Powered by MHonArc.
Copyright © 2006-2007, OW2 Consortium | contact | webmaster.