Commit d1bdf318 authored by Nicolas Tachker's avatar Nicolas Tachker

move src and fix bug.

parent 0460c2ab
This diff is collapsed.
<?xml version="1.0" standalone="yes"?>
<project default="compile" basedir=".">
<!-- Initializes properties -->
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Initialize the environment properties, use ${env.name} -->
<property environment="env"/>
<!-- Get the user defined properties from file -->
<property file="build.properties"/>
<!-- Initialize the directory structure properties -->
<property name="src.dir" location="src"/>
<property name="obj.dir" location="classes"/>
<property name="lib.dir" location="lib"/>
<property name="config.dir" location="config"/>
<property name="build.dir" location="build"/>
<property name="jdoc.dir" location="javadoc"/>
<property name="test.dir" location="run"/>
<property name="providers.dir" location="providers"/>
<property name="report.dir" location="report"/>
<!-- Base classpath needed for execution -->
<path id="base.class.path">
<pathelement path="${java.class.path}/"/>
<fileset dir="${lib.dir}">
<include name="xalan.jar" />
<include name="*.jar"/>
</fileset>
</path>
<!-- Project classpath needed for compilation -->
<path id="project.class.path">
<path refid="base.class.path"/>
<pathelement path="${obj.dir}"/>
<pathelement path="${config.dir}"/>
</path>
</target>
<!-- Clean all generated files -->
<target name="clean" depends="init"
description="--> Clean all generated files">
<delete dir="${obj.dir}"/>
<delete dir="${jdoc.dir}"/>
<delete dir="${test.dir}"/>
<delete dir="${report.dir}"/>
<delete>
<fileset dir=".">
<Include name="**/junit*.properties"/>
</fileset>
</delete>
</target>
<!-- Prepare compilation phase -->
<target name="prepare" depends="init">
<!-- Create the directory structure -->
<mkdir dir="${obj.dir}"/>
<mkdir dir="${jdoc.dir}"/>
</target>
<target name="prepare.providers" depends="init">
<!-- Project classpath needed for compilation -->
<path id="project.class.path">
<path refid="base.class.path"/>
<pathelement path="${obj.dir}"/>
<pathelement path="${config.dir}"/>
<fileset dir="${providers.dir}">
<include name="**/*"/>
</fileset>
</path>
</target>
<target name="compile" depends="prepare"
description="--> Compile Tests">
<javac srcdir="${src.dir}:${obj.dir}"
destdir="${obj.dir}"
debug="true"
deprecation="${deprecation}"
optimize="false"
nowarn="${nowarn}"
verbose="${verbose}">
<classpath refid="project.class.path"/>
<include name="org/objectweb/jtests/jms/**/*.java"/>
<!-- Excludes CVS directories -->
<exclude name="**/CVS/**/*.java"/>
</javac>
</target>
<target name="compile.joram" depends="prepare.providers"
description="--> Compile Joram specific classes">
<javac srcdir="${src.dir}:${obj.dir}"
destdir="${obj.dir}"
debug="true"
deprecation="${deprecation}"
optimize="false"
nowarn="${nowarn}"
verbose="${verbose}">
<classpath refid="project.class.path"/>
<include name="org/objectweb/jtests/providers/admin/JoramAdmin.java"/>
<!-- Excludes CVS directories -->
<exclude name="**/CVS/**/*.java"/>
</javac>
</target>
<target name="javadoc" depends="init"
description="--> Generate Javadoc">
<delete dir="${jdoc.dir}" />
<mkdir dir="${jdoc.dir}" />
<javadoc packagenames="org.objectweb.jtests.jms.*"
sourcepath="${src.dir}"
classpathref="project.class.path"
defaultexcludes="yes"
destdir="${jdoc.dir}"
author="true"
version="true"
use="false"
windowtitle="Test Suite Documentation">
<doctitle><![CDATA[<h1>Test Suite
Documentation</h1>]]></doctitle>
<group title="JMS Conformance Tests" packages="org.objectweb.jtests.jms.conform.*"/>
<group title="JMS Administration" packages="org.objectweb.jtests.jms.admin"/>
<group title="JMS JUnit Framework" packages="org.objectweb.jtests.jms.framework"/>
<link href="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/" />
<link href="http://java.sun.com/j2se/1.3/docs/api/" />
<link href="http://junit.org/junit/javadoc/3.7/" />
</javadoc>
</target>
<target name="init.tests" depends="init">
<delete dir="${test.dir}"/>
<mkdir dir="${test.dir}"/>
<path id="project.class.path">
<path refid="base.class.path"/>
<pathelement path="${obj.dir}"/>
<pathelement path="${config.dir}"/>
<fileset dir="${providers.dir}">
<include name="**/*" />
</fileset>
</path>
</target>
<target name="batchtest" depends="init.tests,compile"
description="--> Run all tests">
<delete dir="${report.dir}" />
<mkdir dir="${report.dir}" />
<delete dir="${report.dir}/html" />
<mkdir dir="${report.dir}/html" />
<junit printsummary="yes"
haltonfailure="no"
haltonerror="no"
fork="yes" >
<classpath refid="project.class.path" />
<formatter type="xml" />
<batchtest fork="yes" todir="${report.dir}">
<fileset dir="${src.dir}">
<include name="org/objectweb/jtests/jms/conform/**/*Test.java" />
</fileset>
</batchtest>
</junit>
<junitreport todir="${report.dir}">
<fileset dir="${report.dir}">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="./report/html"/>
</junitreport>
</target>
<target name="test" depends="init.tests,compile"
description="--> Start one test (specified by -Dtest=&lt;class name&gt;)" >
<mkdir dir="${report.dir}" />
<junit printsummary="yes"
haltonfailure="no"
haltonerror="no"
fork="yes" >
<classpath refid="project.class.path" />
<formatter type="xml" />
<test name="${test}" todir="${report.dir}" />
</junit>
<junitreport todir="${report.dir}">
<fileset dir="${report.dir}">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="./report/html"/>
</junitreport>
</target>
<target name="junit.gui" depends="init.tests,compile"
description="--> Use the GUI TestRunner of Junit">
<java classname="junit.swingui.TestRunner"
failonerror="no" fork="yes"
dir="${test.dir}">
<classpath refid="project.class.path"/>
</java>
</target>
<target name="package" depends="init, clean, compile, compile.joram,
javadoc"
description="--> Create a package for the test suite">
<delete file="tests.tgz" />
<tar tarfile="tests.tar"
longfile="gnu"
basedir=".."
includes="tests/**"
excludes="**/CVS, providers/fiorano/**"/>
<gzip zipfile="tests.tgz" src="tests.tar" />
<delete file="tests.tar" />
</target>
</project>
\ No newline at end of file
#############
# Appenders #
#############
# Use A3Log4jXAppender permits to redirect output of each AgentServer in a
# different file named server#{$id}.audit where $id is the AgentServer id, so
# all servers can run in the same directory. Be careful, using classic log4j
# FileAppender requires to launch each server in a different directory.
## A3Log4jFileAppender, for example:
# log4j.appender.local=fr.dyade.aaa.util.A3Log4jFileAppender
## A3Log4jRollingFileAppender, for example:
log4j.appender.local=fr.dyade.aaa.util.A3Log4jRollingFileAppender
## Roll over the file each time it reaches 5MB.
log4j.appender.local.MaxFileSize=5000KB
## Keep ten backup file
log4j.appender.local.MaxBackupIndex=2
## DailyRollingFileAppender, for example:
# log4j.appender.local=fr.dyade.aaa.util.A3Log4jDailyRollingFileAppender
# log4j.appender.local.DatePattern='.'yyyy-MM-dd-HH
log4j.appender.local.layout=org.apache.log4j.PatternLayout
log4j.appender.local.layout.ConversionPattern=[%t] [%d{ISO8601}] %-5p %x - %m%n
# tty is set to be a ConsoleAppender which outputs to System.out.
log4j.appender.tty=org.apache.log4j.ConsoleAppender
log4j.appender.tty.layout=org.apache.log4j.PatternLayout
log4j.appender.tty.layout.ConversionPattern=[%t] [%d{ISO8601}] %-5p %x - %m%n
log4j.appender.tty.Threshold=DEBUG
#########################
# Factory of Categories #
#########################
log4j.loggerFactory=org.objectweb.util.monolog.wrapper.log4j.MonologCategoryFactory
########################
# Configure Categories #
########################
log4j.rootLogger=ERROR, tty
# log4j.logger.fr.dyade.aaa.agent.Agent=DEBUG
# log4j.logger.fr.dyade.aaa.agent.Engine=DEBUG
# log4j.logger.fr.dyade.aaa.agent.Service=DEBUG
# log4j.logger.fr.dyade.aaa.mom.Destination=DEBUG
# log4j.logger.fr.dyade.aaa.mom.Proxy=DEBUG
# log4j.logger.fr.dyade.aaa.jndi2.client=DEBUG
# log4j.logger.fr.dyade.aaa.jndi2.server=DEBUG
# log4j.logger.fr.dyade.aaa.joram.Client=DEBUG
<project default="server" basedir=".">
<!-- Initializes the environment paths and properties -->
<target name="init">
<!-- Initializes the directory structure properties -->
<property name="run.dir" location="."/>
<!-- Project classpath needed for execution -->
<path id="project.class.path">
<pathelement path="${java.class.path}/"/>
<pathelement path="${run.dir}"/>
<fileset dir="${run.dir}">
<include name="*.jar"/>
</fileset>
</path>
<property name="project.class.path" refid="project.class.path"/>
</target>
<!-- Starts a JORAM server -->
<target name="server" depends="init">
<java classname="fr.dyade.aaa.agent.AgentServer"
failonerror="no" fork="yes"
dir="${run.dir}">
<classpath path="${project.class.path}"/>
<jvmarg value="-DTransaction=fr.dyade.aaa.util.NullTransaction"/>
<arg line="0 ./s0"/>
</java>
</target>
</project>
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2001 ScalAgent Distributed Technologies
*
* 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):ScalAgent D.T.
* Contributor(s):
*/
package a3.base;
import fr.dyade.aaa.agent.*;
public class Echo extends Agent {
public Echo(short to) {
super(to, "Echo#" + to);
System.out.println("echo start");
}
public void react(AgentId from, Notification not) {
System.out.println(not.getExpiration());
sendTo(from, not);
}
}
<?xml version="1.0"?>
<config>
<property name="Engine" value="@engine@"/>
<property name="Transaction" value="@transaction@"/>
<server id="0" name="S0" hostname="localhost">
<service class="fr.dyade.aaa.agent.AdminProxy" args="8090"/>
</server>
</config>
<?xml version="1.0"?>
<config>
<domain name="D1" network="fr.dyade.aaa.agent.SimpleNetwork"/>
<server id="0" name="S0" hostname="localhost">
<network domain="D1" port="16300"/>
<service class="fr.dyade.aaa.agent.AdminProxy" args="8090"/>
</server>
<server id="1" name="S1" hostname="localhost">
<network domain="D1" port="16301"/>
<service class="fr.dyade.aaa.agent.AdminProxy" args="8091"/>
</server>
<server id="2" name="S2" hostname="localhost">
<network domain="D1" port="16302"/>
<service class="fr.dyade.aaa.agent.AdminProxy" args="8092"/>
</server>
</config>
<?xml version="1.0"?>
<config>
<domain name="D1" network="fr.dyade.aaa.agent.SimpleNetwork"/>
<server id="0" name="S0" hostname="localhost">
<network domain="D1" port="16300"/>
<service class="fr.dyade.aaa.agent.AdminProxy" args="8090"/>
</server>
<!-- Configuration file for S2 without S1
- <server id="1" name="S1" hostname="localhost">
- <network domain="D1" port="16301"/>
- <service class="fr.dyade.aaa.agent.AdminProxy" args="8091"/>
- </server>
-->
<server id="2" name="S2" hostname="localhost">
<network domain="D1" port="16302"/>
<service class="fr.dyade.aaa.agent.AdminProxy" args="8092"/>
</server>
</config>
<?xml version="1.0"?>
<config>
<domain name="D1" network="fr.dyade.aaa.agent.PoolCnxNetwork"/>
<server id="0" name="S0" hostname="localhost">
<network domain="D1" port="16300"/>
<service class="fr.dyade.aaa.agent.AdminProxy" args="8090"/>
</server>
<server id="1" name="S1" hostname="localhost">
<network domain="D1" port="16301"/>
<service class="fr.dyade.aaa.agent.AdminProxy" args="8091"/>
</server>
<server id="2" name="S2" hostname="localhost">
<network domain="D1" port="16302"/>
<service class="fr.dyade.aaa.agent.AdminProxy" args="8092"/>
</server>
</config>
<?xml version="1.0"?>
<config>
<domain name="D1" network="fr.dyade.aaa.agent.PoolCnxNetwork"/>
<server id="0" name="S0" hostname="localhost">
<network domain="D1" port="16300"/>
<service class="fr.dyade.aaa.agent.AdminProxy" args="8090"/>
</server>
<!-- Configuration file for S2 without S1
- <server id="1" name="S1" hostname="localhost">
- <network domain="D1" port="16301"/>
- <service class="fr.dyade.aaa.agent.AdminProxy" args="8091"/>
- </server>
-->
<server id="2" name="S2" hostname="localhost">
<network domain="D1" port="16302"/>
<service class="fr.dyade.aaa.agent.AdminProxy" args="8092"/>
</server>
</config>
<?xml version="1.0"?>
<config>
<property name="Engine" value="@engine@"/>
<property name="Transaction" value="@transaction@"/>
<domain name="D1" network="@network@"/>
<server id="0" name="S0" hostname="localhost">
<network domain="D1" port="16300"/>
<service class="fr.dyade.aaa.agent.AdminProxy" args="8090"/>
</server>
<server id="1" name="S1" hostname="localhost">
<network domain="D1" port="16301"/>
<service class="fr.dyade.aaa.agent.AdminProxy" args="8091"/>
</server>
<server id="2" name="S2" hostname="localhost">
<network domain="D1" port="16302"/>
<service class="fr.dyade.aaa.agent.AdminProxy" args="8092"/>
</server>
</config>
<?xml version="1.0"?>
<config>
<property name="Engine" value="@engine@"/>
<property name="Transaction" value="@transaction@"/>
<domain name="D1" network="@network@"/>
<server id="0" name="S0" hostname="localhost">
<network domain="D1" port="16300"/>
<service class="fr.dyade.aaa.agent.AdminProxy" args="8090"/>
</server>
<server id="1" name="S1" hostname="localhost">
<network domain="D1" port="16301"/>
<service class="fr.dyade.aaa.agent.AdminProxy" args="8091"/>
</server>
</config>
<?xml version="1.0"?>
<config>
<domain name="D1" network="fr.dyade.aaa.agent.HttpNetwork"/>
<property name="D1.ActivationPeriod" value="50"/>
<server id="0" name="S0" hostname="localhost">
<network domain="D1" port="0"/>
<service class="fr.dyade.aaa.agent.AdminProxy" args="8090"/>
</server>
<server id="1" name="S1" hostname="localhost">
<network domain="D1" port="16301"/>
<service class="fr.dyade.aaa.agent.AdminProxy" args="8091"/>
</server>
</config>