You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by bl...@apache.org on 2002/08/13 17:41:59 UTC
cvs commit: jakarta-avalon-apps/infomover/src/xdocs index.xml menu.xml
bloritsch 2002/08/13 08:41:58
Added: infomover build.xml default.properties
infomover/lib readme.txt
infomover/src/conf infomover-assembly.xml
infomover-config.xml infomover-environment.xml
infomover/src/java/org/apache/infomover/jobmanager Job.java
JobDescriptor.java JobException.java
JobManager.java JobManagerMBean.java
infomover/src/java/org/apache/infomover/jobmanager/impl
JobManagerImpl.java
infomover/src/java/org/apache/infomover/transaction
Field.java FieldTypes.java Record.java
RecordException.java RecordTypes.java Response.java
Transaction.java
infomover/src/manifest AltrmiHelloWorldTest.mf
infomover/src/test/org/apache/infomover/transaction/test
FieldTestCase.java RecordTestCase.java
TransactionTest.java
infomover/src/xdocs index.xml menu.xml
Log:
Add initial code
Revision Changes Path
1.1 jakarta-avalon-apps/infomover/build.xml
Index: build.xml
===================================================================
<?xml version="1.0"?>
<project name="Overlord" default="main" basedir=".">
<!-- ==========================================================================================
PROPERTY SETUP
========================================================================================== -->
<!-- set up properties -->
<property file="${user.home}/build.properties"/>
<property file="${user.home}/.ant.properties"/>
<property file="${basedir}/ant.properties"/>
<property file="${basedir}/../ant.properties"/>
<property file="${basedir}/default.properties"/>
<property file="${basedir}/../default.properties"/>
<property file="${basedir}/../cocoon.properties"/>
<!-- Set the installation variables for Cornerstone/Phoenix -->
<property name="phoenix.home" value="../../jakarta-avalon-phoenix/dist"/>
<property name="install.dir" value="${phoenix.home}/apps"/>
<!-- Set the properties for intermediate directory -->
<property name="build.dir" value="build"/>
<property name="build.lib" value="${build.dir}/lib"/>
<property name="build.xdoclet" value="${build.dir}/xdoclet"/>
<property name="build.src" value="${build.dir}/src"/>
<property name="build.classes" value="${build.dir}/classes"/>
<property name="build.javadocs" value="${build.dir}/javadocs"/>
<property name="build.docs" value="${build.dir}/docs"/>
<property name="build.context" value="${build.dir}/documentation"/>
<property name="build.xdocs" value="${build.context}/content/xdocs"/>
<!-- Set the properties for source directories -->
<property name="src.dir" value="src"/>
<property name="java.dir" value="${src.dir}/java"/>
<property name="manifest.dir" value="${src.dir}/manifest"/>
<property name="conf.dir" value="${src.dir}/conf"/>
<property name="context.dir" value="../../jakarta-avalon/src/documentation"/>
<property name="xdocs.dir" value="${src.dir}/xdocs"/>
<property name="tools.dir" location="../../jakarta-avalon/tools"/>
<property name="dist.base" value="distributions"/>
<path id="project.class.path">
<pathelement path="${java.class.path}" />
<pathelement path="${build.classes}" />
<fileset dir="../common/lib">
<include name="*.jar" />
</fileset>
<fileset dir="lib">
<include name="*.jar" />
</fileset>
</path>
<path id="tools.class.path">
<path refid="project.class.path"/>
<pathelement location="${xerces.jar}"/>
<pathelement location="${xalan.jar}"/>
<pathelement location="${tools.jar}"/>
<fileset dir="${tools.dir}/lib">
<exclude name="ant.jar" />
</fileset>
</path>
<taskdef name="sar" classname="org.apache.avalon.phoenix.tools.tasks.Sar">
<classpath refid="project.class.path" />
</taskdef>
<!-- Setup the filters -->
<target name="setup-filters">
<filter token="Name" value="Avalon Apps - Overlord"/>
<filter token="name" value="overlord"/>
<filter token="version" value="${version}"/>
<filter token="year" value="${year}"/>
<filter token="status" value="${status}"/>
<filter token="release" value="${release}"/>
<filter token="short-version" value="${short.version}"/>
<property name="avalon.base" value="http://jakarta.apache.org/avalon"/>
<property name="framework.base" value="http://jakarta.apache.org/avalon/framework"/>
<property name="phoenix.base" value="http://jakarta.apache.org/avalon/phoenix"/>
<property name="excalibur.base" value="http://jakarta.apache.org/avalon/excalibur"/>
<property name="cornerstone.base" value="http://jakarta.apache.org/avalon/cornerstone"/>
<property name="logkit.base" value="http://jakarta.apache.org/avalon/logkit"/>
<property name="testlet.base" value="http://jakarta.apache.org/avalon/testlet"/>
<property name="apps.base" value="http://jakarta.apache.org/avalon/apps"/>
<filter token="year" value="${year}"/>
<filter token="AVALON_BASE" value="${avalon.base}"/>
<filter token="FRAMEWORK_BASE" value="${framework.base}"/>
<filter token="EXCALIBUR_BASE" value="${excalibur.base}"/>
<filter token="PHOENIX_BASE" value="${phoenix.base}"/>
<filter token="CORNERSTONE_BASE" value="${cornerstone.base}"/>
<filter token="LOGKIT_BASE" value="${logkit.base}"/>
<filter token="TESTLET_BASE" value="${testlet.base}"/>
<filter token="APPS_BASE" value="${apps.base}"/>
</target>
<!-- Compiles project -->
<target name="compile">
<mkdir dir="${build.classes}"/>
<javac srcdir="${java.dir}"
destdir="${build.classes}"
debug="${build.debug}"
optimize="${build.optimize}"
deprecation="${build.deprecation}">
<classpath refid="project.class.path" />
</javac>
<copy todir="${build.classes}">
<fileset dir="${java.dir}">
<exclude name="**/test/**"/>
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="test-xdoclet">
<available classname="xdoclet.XDocletMain" classpathref="project.class.path" property="xdoclet.present"/>
</target>
<!-- Make .xinfo and manifest automatically for blocks -->
<target name="phoenix-xdoclet" depends="compile" if="xdoclet.present">
<mkdir dir="${build.xdoclet}"/>
<taskdef name="phoenix-blocks"
classname="org.apache.avalon.phoenix.tools.xdoclet.PhoenixXDoclet"
classpathref="project.class.path"/>
<phoenix-blocks
destdir="${build.xdoclet}"
classpathref="project.class.path">
<fileset dir="${java.dir}">
<include name="**/*.java" />
</fileset>
<blockinfo/>
<manifest manifestFile="manifest.mf" />
</phoenix-blocks>
</target>
<!-- Make .xinfo and manifest automatically for blocks -->
<target name="no-phoenix-xdoclet" depends="compile" unless="xdoclet.present">
<mkdir dir="${build.xdoclet}"/>
<unzip src="${src.dir}/generated-by-xdoclet.zip" dest="${build.xdoclet}" />
</target>
<!-- Jars up project -->
<target name="jars" depends="test-xdoclet, phoenix-xdoclet, no-phoenix-xdoclet">
<mkdir dir="${build.lib}"/>
<jar jarfile="${build.lib}/${name}.jar"
manifest="${build.xdoclet}/manifest.mf">
<fileset dir="${build.classes}">
<include name="org/apache/avalon/overlord/**"/>
</fileset>
<fileset dir="${java.dir}">
<include name="org/apache/avalon/overlord/**/*.properties"/>
</fileset>
<fileset dir="${build.xdoclet}">
<include name="**/*.xinfo"/>
</fileset>
</jar>
</target>
<target name="main" depends="sars" description="Default target to generate build products minus docs"/>
<target name="all" depends="main,docs" description="Generate build products including docs"/>
<target name="sars" depends="jars">
<sar sarfile="${build.lib}/${name}.sar"
config="${conf.dir}/infomover-config.xml"
environment="${conf.dir}/infomover-environment.xml"
assembly="${conf.dir}/infomover-assembly.xml" >
<lib dir="${build.lib}/">
<include name="*.jar"/>
</lib>
<lib dir="../common/lib">
<include name="cornerstone.jar"/>
</lib>
</sar>
<mkdir dir="dist"/>
<copy todir="dist">
<fileset dir="${build.lib}">
<include name="**"/>
</fileset>
</copy>
</target>
<!-- Performs unit tests -->
<target name="check" depends="compile" description="Perform any built in tests">
</target>
<!-- Completely build all dists -->
<target name="dist" depends="sars" description="Generates the distribution">
<property name="dist.name" value="${Name}-${version}"/>
<mkdir dir="${dist.base}"/>
<antcall target="bin-dist" inheritAll="false">
<param name="bin.dist.dir" value="${dist.name}" />
</antcall>
<zip zipfile="${dist.base}/${dist.name}-bin.zip"
basedir="${dist.name}/.."
includes="${dist.name}/**"/>
<tar longfile="gnu" tarfile="${dist.base}/${dist.name}-bin.tar">
<tarfileset dir="${dist.name}/.." username="avalon" group="avalon">
<include name="${dist.name}/**"/>
</tarfileset>
</tar>
<gzip zipfile="${dist.base}/${dist.name}-bin.tar.gz"
src="${dist.base}/${dist.name}-bin.tar"/>
<delete file="${dist.base}/${dist.name}-bin.tar"/>
<delete dir="${dist.name}" />
<antcall target="src-dist" inheritAll="false">
<param name="src.dist.dir" value="${dist.name}" />
</antcall>
<zip zipfile="${dist.base}/${dist.name}-src.zip"
basedir="${dist.name}/.."
includes="${dist.name}/**">
<fileset dir="..">
<include name="common/lib/avalon-*"/>
<include name="common/lib/cornerstone.jar"/>
<include name="common/lib/phoenix-*"/>
<include name="common/lib/excalibur-i18n*"/>
</fileset>
</zip>
<tar longfile="gnu" tarfile="${dist.base}/${dist.name}-src.tar" >
<tarfileset dir="${dist.name}/.." mode="755" username="avalon" group="avalon">
<include name="${dist.name}/build.sh"/>
</tarfileset>
<tarfileset dir="${dist.name}/.." username="avalon" group="avalon">
<include name="${dist.name}/**"/>
<exclude name="${dist.name}/build.sh"/>
</tarfileset>
<tarfileset dir=".." username="avalon" group="avalon">
<include name="common/lib/avalon-*"/>
<include name="common/lib/cornerstone.jar"/>
<include name="common/lib/phoenix-*"/>
<include name="common/lib/excalibur-i18n*"/>
</tarfileset>
</tar>
<gzip zipfile="${dist.base}/${dist.name}-src.tar.gz"
src="${dist.base}/${dist.name}-src.tar"/>
<delete file="${dist.base}/${dist.name}-src.tar"/>
<delete dir="${dist.name}" />
</target>
<!-- Creates all the .sar files -->
<target name="bin-dist" depends="all" >
<!-- bin.dist.dir usually set before this target is called -->
<property name="bin.dist.dir" value="dist"/>
<property name="bin.dist.lib" value="${bin.dist.dir}/lib"/>
<property name="bin.dist.docs" value="${bin.dist.dir}/docs"/>
<mkdir dir="${bin.dist.docs}"/>
<copy todir="${bin.dist.docs}">
<fileset dir="${build.docs}"/>
</copy>
<copy file="${build.lib}/${name}.sar" tofile="${bin.dist.dir}/${name}-${version}.sar"/>
<chmod dir="${bin.dist.dir}" perm="go-rwx" />
</target>
<target name="src-dist" depends="docs">
<!-- src.dist.dir has usually already been set -->
<property name="src.dist.dir" value="dist-src"/>
<property name="src.dist.src" value="${src.dist.dir}/src"/>
<property name="src.dist.docs" value="${src.dist.dir}/docs"/>
<mkdir dir="${src.dist.docs}"/>
<copy todir="${src.dist.docs}">
<fileset dir="${build.docs}"/>
</copy>
<copy todir="${src.dist.src}">
<fileset dir="${src.dir}"/>
</copy>
<zip zipfile="${src.dist.src}/generated-by-xdoclet.zip"
basedir="${build.xdoclet}"/>
<copy todir="${src.dist.dir}">
<fileset dir=".">
<include name="build.xml"/>
</fileset>
</copy>
<mkdir dir="${src.dist.dir}/lib"/>
<copy todir="${src.dist.dir}/lib">
<fileset dir="lib">
<include name="**"/>
</fileset>
</copy>
<fixcrlf srcdir="${src.dist.src}/java" includes="**/*.java" eol="lf"/>
<chmod dir="${src.dist.dir}" perm="go-rwx" />
</target>
<target name="install" depends="main" description="Installs into Phoenix">
<!-- <fail message="install.dir not specified." unless="install.dir"/> -->
<echo message="Installing to ${install.dir}" />
<delete dir="${install.dir}/overlord" />
<copy file="${build.lib}/overlord.sar" todir="${install.dir}" />
</target>
<target name="uninstall" description="Uninstalls from Phoenix">
<!-- <fail message="install.dir not specified." unless="install.dir"/> -->
<delete dir="${install.dir}/overlord/" />
<delete file="overlord.sar" dir="${install.dir}"/>
</target>
<target name="clean" description="Cleans up artifacts from build process">
<delete dir="${build.dir}" />
<delete>
<fileset dir="." includes="**/*~" defaultexcludes="no"/>
</delete>
</target>
<target name="distclean" depends="clean" description="Cleans up all generated files and directories">
<delete dir="${bin.dist.dir}" />
<delete dir="${dist.base}" />
</target>
<!-- ==========================================================================================
DOCUMENTATION GENERATION
========================================================================================== -->
<!-- Creates all docs -->
<target name="docs" depends="html-docs, javadocs" description="generates all the documentation"/>
<!-- copy docs to site dir -->
<target name="site" depends="docs" description=" Places docs ready for hosting on website">
<mkdir dir="../site/build/docs/apps/${dir-name}"/>
<copy todir="../site/build/docs/apps/${dir-name}">
<fileset dir="${build.docs}">
<include name="**"/>
</fileset>
</copy>
</target>
<!-- Creates javadocs -->
<target name="javadocs" depends="compile" description="Generates the javadocs" unless="skip.javadocs">
<mkdir dir="${build.javadocs}"/>
<javadoc packagenames="org.apache.*"
sourcepath="${java.dir}"
destdir="${build.javadocs}">
<classpath refid="project.class.path" />
<doclet name="com.sun.tools.doclets.standard.Standard">
<param name="-author"/>
<param name="-version"/>
<param name="-doctitle" value="${Name}"/>
<param name="-windowtitle" value="${Name} API"/>
<param name="-link" value="http://java.sun.com/j2se/1.4/docs/api/"/>
<param name="-link" value="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/"/>
<param name="-link" value="http://jakarta.apache.org/avalon/api/"/>
<param name="-bottom"
value=""Copyright © ${year} Apache Jakarta Project. All Rights Reserved.""/>
</doclet>
</javadoc>
</target>
<target name="html-docs" description="generates the xdocs-based documentation">
<!-- we call the build.xml target common to all of avalon-apps. This builds our html site -->
<ant antfile="${basedir}/../cocoonbuild.xml"/>
</target>
</project>
1.1 jakarta-avalon-apps/infomover/default.properties
Index: default.properties
===================================================================
# ============================================================================
# Standard Build Properties for Overlord
# ============================================================================
# Overrides the incorrect values in ../default.properties.
# ----------------------------------------------------------------------------
# DOC GENERATION CONFIGURATION
# ----------------------------------------------------------------------------
name = infomover
Name = Avalon InfoMover
dir-name = infomover
version = 0.1
package-version = 1.0
year = 2002-2002
1.1 jakarta-avalon-apps/infomover/lib/readme.txt
Index: readme.txt
===================================================================
Third party jars go in here
- Paul H
1.1 jakarta-avalon-apps/infomover/src/conf/infomover-assembly.xml
Index: infomover-assembly.xml
===================================================================
<?xml version="1.0"?>
<!DOCTYPE assembly PUBLIC "-//PHOENIX/Assembly DTD Version 1.0//EN"
"http://jakarta.apache.org/phoenix/assembly_1_0.dtd">
<assembly>
<!-- The Storage block -->
<block class="org.apache.avalon.cornerstone.blocks.masterstore.RepositoryManager"
name="objectstorage" />
<!-- The Packet Manager block -->
<block class="org.apache.avalon.cornerstone.blocks.packet.DefaultPacketManager"
name="packet-manager">
<provide name="thread-manager"
role="org.apache.avalon.cornerstone.services.threads.ThreadManager" />
</block>
<!-- The ThreadManager block -->
<block class="org.apache.avalon.cornerstone.blocks.threads.DefaultThreadManager"
name="thread-manager" />
<!-- The Connection Manager block -->
<block class="org.apache.avalon.cornerstone.blocks.connection.DefaultConnectionManager"
name="connections">
<provide name="thread-manager"
role="org.apache.avalon.cornerstone.services.threads.ThreadManager" />
</block>
<!-- The Socket Manager block -->
<block class="org.apache.avalon.cornerstone.blocks.sockets.DefaultSocketManager" name="sockets" />
<!-- The TimeScheduler block -->
<block class="org.apache.avalon.cornerstone.blocks.scheduler.DefaultTimeScheduler" name="scheduler">
<provide name="thread-manager"
role="org.apache.avalon.cornerstone.services.threads.ThreadManager" />
</block>
<!-- -->
<!-- Below this section are the demo blocks -->
<!-- -->
<block class="org.apache.avalon.apps.demos.helloworldserver.HelloWorldServerImpl"
name="helloworldserver" >
<provide name="sockets" role="org.apache.avalon.cornerstone.services.sockets.SocketManager"/>
<provide name="connections"
role="org.apache.avalon.cornerstone.services.connection.ConnectionManager" />
</block>
</assembly>
1.1 jakarta-avalon-apps/infomover/src/conf/infomover-config.xml
Index: infomover-config.xml
===================================================================
<?xml version="1.0"?>
<!--
README!
All blocks have full defaults so nothing is needed to make them run.
-->
<config>
<thread-manager>
<thread-group>
<name>default</name>
<!-- normal priority == 5, max-priority = 10 -->
<priority>5</priority>
<!-- are threads deamon threads ? -->
<is-daemon>false</is-daemon>
<max-threads>40</max-threads>
<!-- these are ignored at the moment but will be fixed in later revisions -->
<min-threads>20</min-threads>
<min-spare-threads>20</min-spare-threads>
</thread-group>
</thread-manager>
<!-- The Storage block -->
<objectstorage>
<repositories>
<repository class="org.apache.avalon.cornerstone.blocks.masterstore.File_Persistent_Object_Repository">
<protocols>
<protocol>file</protocol>
</protocols>
<types>
<type>OBJECT</type>
</types>
<models>
<model>SYNCHRONOUS</model>
<model>ASYNCHRONOUS</model>
<model>CACHE</model>
</models>
</repository>
<repository class="org.apache.avalon.cornerstone.blocks.masterstore.File_Persistent_Stream_Repository">
<protocols>
<protocol>file</protocol>
</protocols>
<types>
<type>STREAM</type>
</types>
<models>
<model>SYNCHRONOUS</model>
<model>ASYNCHRONOUS</model>
<model>CACHE</model>
</models>
</repository>
</repositories>
</objectstorage>
<sockets>
<server-sockets>
<factory name="plain"
class="org.apache.avalon.cornerstone.blocks.sockets.DefaultServerSocketFactory" />
</server-sockets>
<client-sockets>
<factory name="plain"
class="org.apache.avalon.cornerstone.blocks.sockets.DefaultSocketFactory" />
</client-sockets>
</sockets>
<helloworldserver>
<port>8999</port>
<bind>127.0.0.1</bind>
<helloworldhandler>
<connectiontimeout>360000</connectiontimeout>
</helloworldhandler>
</helloworldserver>
</config>
1.1 jakarta-avalon-apps/infomover/src/conf/infomover-environment.xml
Index: infomover-environment.xml
===================================================================
<?xml version="1.0"?>
<!--
README!
Basic config file that sets up context for server application.
-->
<environment>
<logs>
<category name="" target="default"
priority="DEBUG" />
<category name="objectstorage" target="objectstorage-target"
priority="DEBUG" />
<log-target name="default"
location="/logs/avalon-demo.log" />
<log-target name="objectstorage-target"
location="/logs/objectstorage.log" />
</logs>
<policy>
<grant code-base="sar:SAR-INF/lib/*">
<permission class="java.security.AllPermission" />
</grant>
</policy>
</environment>
1.1 jakarta-avalon-apps/infomover/src/java/org/apache/infomover/jobmanager/Job.java
Index: Job.java
===================================================================
/* Copyright 2002, D-Haven.org. All rights reserved.
*
* Permission to distribute and modify the software is granted provided the
* copyright notice and the license is the same.
*/
package org.apache.infomover.jobmanager;
import org.apache.avalon.framework.configuration.Configurable;
import org.apache.avalon.framework.activity.Executable;
/**
* The <code>Job</code> interface represents a job that can be
* executed.
*/
public interface Job extends Executable, Configurable
{
/**
* Returns the time when the job was last executed. It helps in checking
* if the job is current.
*/
long getLastRun();
/**
* Cancel or stop a running job
*/
void cancel();
/**
* Get the number of transactions processed in the last run
*/
int lastTransactionCount();
/**
* Get the number of transactions successfully processed in the last run
*/
int lastSuccessfulTransactionCount();
}
1.1 jakarta-avalon-apps/infomover/src/java/org/apache/infomover/jobmanager/JobDescriptor.java
Index: JobDescriptor.java
===================================================================
/* Copyright 2002, D-Haven.org. All rights reserved.
*
* Permission to distribute and modify the software is granted provided the
* copyright notice and the license is the same.
*/
package org.apache.infomover.jobmanager;
import java.util.List;
/**
* The <code>JobDescriptor</code> interface represents a job that is in the queue.
*/
public final class JobDescriptor
{
private final String m_name;
private final long m_lastRun;
private final long m_nextRun;
private final int m_lastTransactionCount;
private final int m_lastSuccessfulTransactionCount;
private final List m_dependencies;
public JobDescriptor(String name, Job job, long nextRun, List dependencies)
{
m_name = name;
m_lastRun = job.getLastRun();
m_nextRun = nextRun;
m_lastTransactionCount = job.lastTransactionCount();
m_lastSuccessfulTransactionCount = job.lastSuccessfulTransactionCount();
m_dependencies = dependencies;
}
/**
* Get's the Job name
*/
public String getName()
{
return m_name;
}
/**
* Returns the time when the job was last executed. It helps in checking
* if the job is current.
*/
public long getLastRun()
{
return m_lastRun;
}
/**
* Returns the next time when the job will be executed.
*/
public long getNextRun()
{
return m_nextRun;
}
/**
* Get the number of transactions processed in the last run
*/
public int getLastTransactionCount()
{
return m_lastTransactionCount;
}
/**
* Get the number of transactions successfully processed in the last run
*/
public int getLastSuccessfulTransactionCount()
{
return m_lastSuccessfulTransactionCount;
}
/**
* Returns the list of jobs that this one depends on.
*/
public String[] getDependencies()
{
String[] dependencies = new String[m_dependencies.size()];
m_dependencies.toArray(dependencies);
return dependencies;
}
}
1.1 jakarta-avalon-apps/infomover/src/java/org/apache/infomover/jobmanager/JobException.java
Index: JobException.java
===================================================================
/**
* Created on Jun 19, 2002
*
* To change this generated comment edit the template variable "filecomment":
* Window>Preferences>Java>Templates.
*/
package org.apache.infomover.jobmanager;
/**
* @author bloritsch
*
* To change this generated comment edit the template variable "typecomment":
* Window>Preferences>Java>Templates.
*/
public class JobException extends Exception
{
public JobException()
{
super();
}
public JobException( String message )
{
super( message );
}
}
1.1 jakarta-avalon-apps/infomover/src/java/org/apache/infomover/jobmanager/JobManager.java
Index: JobManager.java
===================================================================
/* Copyright 2002, D-Haven.org. All rights reserved.
*
* Permission to distribute and modify the software is granted provided the
* copyright notice and the license is the same.
*/
package org.apache.infomover.jobmanager;
import org.apache.avalon.framework.configuration.Configuration;
/**
* The <code>JobManager</code> interface exposes how we control the JobManager
* externally. We can use other Avalon applications, or the JMX interface.
*
* @phoenix:service name="org.apache.infomover.jobmanager.JobManager"
* @phoenix:mx name="org.apache.avalon.infomover.jobmanager.JobManagerMBean"
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
*/
public interface JobManager
{
String ROLE = JobManager.class.getName();
/**
* Adds a new job to the JobManager's Queue. We pass in a configuration
* file, and the JobManager will pass back the job name.
*
* @param configuration The job's configuration information
*
* @return the name of the job
*
* @throws JobException if the job is improperly defined
*/
String addJob( Configuration conf ) throws JobException;
/**
* Removes an existing job from the JobManager's Queue. If the job does not
* exist, the JobManager will ignore it.
*
* @param name The name of the job we want to remove.
*/
void removeJob( String name );
/**
* Cancel a running job. It will return immediately if the Job does not exist.
*
* @param name The name of the job we want to remove.
*
* @throws JobException if there is no job by the name or there is a problem
* running the job.
*/
void cancelJob( String name ) throws JobException;
/**
* Execute an existing job in the JobManager's Queue. If the job does not
* exist, the JobManager will throw an exception.
*
* @param name The name of the job we want to remove.
*
* @throws JobException if there is no job by the name or there is a problem
* running the job.
*/
void executeJob( String name ) throws JobException;
/**
* Execute a job without adding it to the Queue. The Job described by the
* configuration file is run only once, unless the configuration does not
* represent a valid job.
*
* @param configuration The configuration that defines the job.
*
* @throws JobException when the configuration does not represent a valid job.
*/
void executeOneOff( Configuration config ) throws JobException;
/**
* Lists all the jobs that are in the Job queue. We return the Job reference
* itself so that we can directly execute it, or we can get its name.
*
* @return an array of Jobs.
*/
JobDescriptor[] availableJobs();
}
1.1 jakarta-avalon-apps/infomover/src/java/org/apache/infomover/jobmanager/JobManagerMBean.java
Index: JobManagerMBean.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE file.
*/
package org.apache.infomover.jobmanager;
import org.apache.avalon.framework.configuration.Configuration;
/**
* Specifies methods to export via Management interface.
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
* @version 1.0
*/
public interface JobManagerMBean
{
/**
* Adds a new job to the JobManager's Queue. We pass in a configuration
* file, and the JobManager will pass back the job name.
*
* @param configuration The job's configuration information
*
* @return the name of the job
*
* @throws JobException if the job is improperly defined
*/
String addJob( Configuration conf ) throws JobException;
/**
* Removes an existing job from the JobManager's Queue. If the job does not
* exist, the JobManager will ignore it.
*
* @param name The name of the job we want to remove.
*/
void removeJob( String name );
/**
* Execute an existing job in the JobManager's Queue. If the job does not
* exist, the JobManager will throw an exception.
*
* @param name The name of the job we want to remove.
*
* @throws JobException if there is no job by the name or there is a problem
* running the job.
*/
void executeJob( String name ) throws JobException;
/**
* Execute a job without adding it to the Queue. The Job described by the
* configuration file is run only once, unless the configuration does not
* represent a valid job.
*
* @param configuration The configuration that defines the job.
*
* @throws JobException when the configuration does not represent a valid job.
*/
void executeOneOff( Configuration config ) throws JobException;
/**
* Lists all the jobs that are in the Job queue. We return the Job reference
* itself so that we can directly execute it, or we can get its name.
*
* @return an array of Jobs.
*/
JobDescriptor[] availableJobs();
}
1.1 jakarta-avalon-apps/infomover/src/java/org/apache/infomover/jobmanager/impl/JobManagerImpl.java
Index: JobManagerImpl.java
===================================================================
/* Copyright 2002, D-Haven.org. All rights reserved.
*
* Permission to distribute and modify the software is granted provided the
* copyright notice and the license is the same.
*/
package org.apache.infomover.jobmanager.impl;
import org.apache.infomover.jobmanager.*;
import org.apache.avalon.framework.configuration.*;
import org.apache.avalon.framework.service.*;
/**
* The <code>JobManager</code> interface exposes how we control the JobManager
* externally. We can use other Avalon applications, or the JMX interface.
*
* @phoenix:block
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
*/
public class JobManagerImpl
implements JobManager, JobManagerMBean, Serviceable
{
/**
*
* @phoenix:dependency name="org.apache.avalon.cornerstone.services.sockets.SocketManager"
* @phoenix:dependency name="org.apache.avalon.cornerstone.services.connection.ConnectionManager"
*
*/
public void service( final ServiceManager serviceManager )
throws ServiceException
{
// getLogger().info( "HelloWorldServer.compose()" );
// m_socketManager = (SocketManager)serviceManager.lookup( SocketManager.ROLE );
// m_connectionManager = (ConnectionManager)serviceManager.lookup( ConnectionManager.ROLE );
}
/**
* Adds a new job to the JobManager's Queue. We pass in a configuration
* file, and the JobManager will pass back the job name.
*
* @param configuration The job's configuration information
*
* @return the name of the job
*
* @throws JobException if the job is improperly defined
*/
public String addJob( Configuration conf ) throws JobException
{
throw new UnsupportedOperationException();
}
/**
* Removes an existing job from the JobManager's Queue. If the job does not
* exist, the JobManager will ignore it.
*
* @param name The name of the job we want to remove.
*/
public void removeJob( String name )
{
throw new UnsupportedOperationException();
}
/**
* Cancel a running job. It will return immediately if the Job does not exist.
*
* @param name The name of the job we want to remove.
*
* @throws JobException if there is no job by the name or there is a problem
* running the job.
*/
public void cancelJob( String name ) throws JobException
{
throw new UnsupportedOperationException();
}
/**
* Execute an existing job in the JobManager's Queue. If the job does not
* exist, the JobManager will throw an exception.
*
* @param name The name of the job we want to remove.
*
* @throws JobException if there is no job by the name or there is a problem
* running the job.
*/
public void executeJob( String name ) throws JobException
{
throw new UnsupportedOperationException();
}
/**
* Execute a job without adding it to the Queue. The Job described by the
* configuration file is run only once, unless the configuration does not
* represent a valid job.
*
* @param configuration The configuration that defines the job.
*
* @throws JobException when the configuration does not represent a valid job.
*/
public void executeOneOff( Configuration config ) throws JobException
{
throw new UnsupportedOperationException();
}
/**
* Lists all the jobs that are in the Job queue. We return the Job reference
* itself so that we can directly execute it, or we can get its name.
*
* @return an array of Jobs.
*/
public JobDescriptor[] availableJobs()
{
throw new UnsupportedOperationException();
}
}
1.1 jakarta-avalon-apps/infomover/src/java/org/apache/infomover/transaction/Field.java
Index: Field.java
===================================================================
/* Copyright 2002, D-Haven.org. All rights reserved.
*
* Permission to distribute and modify the software is granted provided the
* copyright notice and the license is the same.
*/
package org.apache.infomover.transaction;
import java.util.Date;
/**
* The <code>Field</code> class represents the smallest unit of information
* that InfoMover can understand.
*/
public class Field implements FieldTypes
{
private String m_name;
private Object m_value;
private int m_type;
/**
* Initialize the field with its values. The filters can alter the
* value and type in transformation.
*/
public Field( String name, Object value, int type )
{
m_name = name;
checkType( value, type );
m_value = value;
m_type = type;
}
/**
* Change the value of the Field without changing the type.
*
* @throws RuntimeException if the value is not of the right type.
*/
public void changeValue( Object value )
{
// Validate to make sure that the value matches the expected type.
checkType( value, m_type );
m_value = value;
}
/**
* Change the value and type of the field.
*
* @throws RuntimeException if the value is not of the right type.
*/
public void changeValue( Object value, int type )
{
// Validate to make sure the value matches the expected type.
checkType( value, type );
m_value = value;
m_type = type;
}
/**
* Make the field <code>null</code>.
*/
public void setNull()
{
m_value = null;
}
/**
* Return the name of the Field.
*/
public String getName()
{
return m_name;
}
/**
* Return the type of value for the Field.
*/
public int getType()
{
return m_type;
}
/**
* Return the value for the field.
*/
public Object getValue()
{
return m_value;
}
/**
* Ensure that the value is of the right type.
*
* @throws RuntimeException if it is not.
*/
public void checkType( Object value, int type )
{
if ( value == null ) return;
switch ( type )
{
case INTEGER:
if ( value instanceof Long || value instanceof Integer)
{
return;
}
break;
case STRING:
if ( value instanceof String )
{
return;
}
break;
case FLOAT:
if ( value instanceof Double || value instanceof Float )
{
return;
}
break;
case DATE:
case TIME:
case TIMESTAMP:
if ( value instanceof Date )
{
return;
}
break;
case BOOLEAN:
if ( value instanceof Boolean )
{
return;
}
break;
}
throw new RuntimeException( "Invalid value type" );
}
}
1.1 jakarta-avalon-apps/infomover/src/java/org/apache/infomover/transaction/FieldTypes.java
Index: FieldTypes.java
===================================================================
/* Copyright 2002, D-Haven.org. All rights reserved.
*
* Permission to distribute and modify the software is granted provided the
* copyright notice and the license is the same.
*/
package org.apache.infomover.transaction;
/**
* The <code>FieldTypes</code> interface holds the constants for the field
* types that InfoMover is aware of.
*/
public interface FieldTypes
{
int INTEGER = 0;
int STRING = 1;
int FLOAT = 2;
int DATE = 3;
int TIME = 4;
int TIMESTAMP = 5;
int BOOLEAN = 6;
}
1.1 jakarta-avalon-apps/infomover/src/java/org/apache/infomover/transaction/Record.java
Index: Record.java
===================================================================
/* Copyright 2002, D-Haven.org. All rights reserved.
*
* Permission to distribute and modify the software is granted provided the
* copyright notice and the license is the same.
*/
package org.apache.infomover.transaction;
import java.util.List;
import java.util.ArrayList;
import java.util.Iterator;
/**
* The <code>Record</code> class represents the a group of fields that are
* passed to the next stage.
*/
public class Record implements RecordTypes
{
private int m_type;
private String m_name;
private List m_fields;
/**
* Initialize a record of a specific type, with an empty list of fields.
*/
public Record( String name, int type )
{
this( name, type, new ArrayList() );
}
/**
* Initializes a record of a specific type, with an initial list of fields.
*/
public Record( String name, int type, List fields )
{
m_name = name;
m_type = type;
m_fields = fields;
}
/**
* Adds a field to the end of the list of fields.
*/
public void addField( Field field )
{
m_fields.add( field );
}
/**
* Add a field to a specific position in the list of fields.
*/
public void addField( int position, Field field )
{
m_fields.add( position, field );
}
/**
* Remove a field from the list of fields.
*/
public Field removeField( int position )
{
return (Field) m_fields.remove( position );
}
/**
* Remove a field from the list of fields.
*/
public Field removeField( String name )
{
Iterator i = m_fields.iterator();
while (i.hasNext())
{
Field field = (Field) i.next();
if (field.getName().equals(name))
{
i.remove();
return field;
}
}
return null;
}
/**
* Return the specified field
*/
public Field getField( int position )
{
return (Field)m_fields.get( position );
}
/**
* Return the named field
*/
public Field getField( String name )
{
Iterator i = m_fields.iterator();
while (i.hasNext())
{
Field field = (Field) i.next();
if (field.getName().equals(name))
{
return field;
}
}
return null;
}
/**
* Get the field iterator
*/
public Iterator iterator()
{
return m_fields.iterator();
}
/**
* Get the number of fields in the Record
*/
public int numberOfFields()
{
return m_fields.size();
}
/**
* Get the name of the Record.
*/
public String getName()
{
return m_name;
}
/**
* Get the type of record
*/
public int getType()
{
return m_type;
}
}
1.1 jakarta-avalon-apps/infomover/src/java/org/apache/infomover/transaction/RecordException.java
Index: RecordException.java
===================================================================
/* Copyright 2002, D-Haven.org. All rights reserved.
*
* Permission to distribute and modify the software is granted provided the
* copyright notice and the license is the same.
*/
package org.apache.infomover.transaction;
/**
* The <code>FieldTypes</code> interface holds the constants for the field
* types that InfoMover is aware of.
*/
public class RecordException extends Exception
{
public RecordException()
{
super();
}
public RecordException( String message )
{
super( message );
}
}
1.1 jakarta-avalon-apps/infomover/src/java/org/apache/infomover/transaction/RecordTypes.java
Index: RecordTypes.java
===================================================================
/* Copyright 2002, D-Haven.org. All rights reserved.
*
* Permission to distribute and modify the software is granted provided the
* copyright notice and the license is the same.
*/
package org.apache.infomover.transaction;
/**
* The <code>RecordTypes</code> interface holds the constants for the record
* types that InfoMover is aware of.
*/
public interface RecordTypes
{
int UPDATE = 0;
int ADD = 1;
int DELETE = 2;
int REFERENCE = 3;
}
1.1 jakarta-avalon-apps/infomover/src/java/org/apache/infomover/transaction/Response.java
Index: Response.java
===================================================================
/* Copyright 2002, D-Haven.org. All rights reserved.
*
* Permission to distribute and modify the software is granted provided the
* copyright notice and the license is the same.
*/
package org.apache.infomover.transaction;
/**
* The <code>Response</code> object represents whether the transaction is
* successful. If the transaction is not successful, the Response object
* provides additional information to help figuring out what went wrong.
*/
public final class Response
{
private final boolean m_isSuccessful;
private final String m_message;
private final Exception m_failureCause;
/**
* Default constructor that sets the Response object to successful, and the
* message to "Processed successfully".
*/
public Response()
{
this( true, "Processed successfully" );
}
/**
* Constructor that allows you to customize the message, and set the success
* status of the constructor.
*
* @param isSuccessful Set the success status of the Response
* @param message Set the message of the Response
*/
public Response( boolean isSuccessful, String message )
{
m_isSuccessful = isSuccessful;
m_message = message;
m_failureCause = null;
}
/**
* Constructor that signifies failure, where the message is extracted from the
* exception that caused the failure.
*
* @param cause The exception that caused failure
*/
public Response( Exception cause )
{
this( cause.getMessage(), cause );
}
/**
* Constructor that signifies failure, allowing you to add your own custom
* message.
*
* @param message New message that overrides the one from the exception
* @param cause The exception that caused the failure
*/
public Response( String message, Exception cause )
{
m_isSuccessful = false;
m_message = message;
m_failureCause = cause;
}
/**
* Gets the status of whether the <code>Transaction</code> was successful
*
* @return <code>true</code> if <code>Transaction</code> was successful.
*/
public boolean isSuccessful()
{
return m_isSuccessful;
}
/**
* Get the associated message with the <code>Response</code>.
*
* @return <code>java.lang.String</code> for the message.
*/
public String getMessage()
{
return m_message;
}
/**
* Get the cause of the failure if it exists.
*
* @return <code>java.lang.Exception</code> if there is an associated
* exception, or <code>null</code> if not.
*/
public Exception getCauseOfFailure()
{
return m_failureCause;
}
}
1.1 jakarta-avalon-apps/infomover/src/java/org/apache/infomover/transaction/Transaction.java
Index: Transaction.java
===================================================================
/* Copyright 2002, D-Haven.org. All rights reserved.
*
* Permission to distribute and modify the software is granted provided the
* copyright notice and the license is the same.
*/
package org.apache.infomover.transaction;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
/**
* The <code>Transaction</code> class represents the most granular level of
* abstraction. Once a transaction is processed, it must be successful or
* roll back any changes.
*/
public class Transaction
{
private List m_records;
/**
* Initialize a transaction
*/
public Transaction()
{
this (new ArrayList());
}
/**
* Initialize a transaction with an initial set of records
*/
public Transaction( List initRecords )
{
m_records = initRecords;
}
/**
* Adds a Record to the end of the list of Records.
*/
public void addRecord( Record Record )
{
m_records.add( Record );
}
/**
* Add a Record to a specific position in the list of Records.
*/
public void addRecord( int position, Record Record )
{
m_records.add( position, Record );
}
/**
* Remove a Record from the list of Records.
*/
public Record removeRecord( int position )
{
return (Record) m_records.remove( position );
}
/**
* Return the specified Record
*/
public Record getRecord( int position )
{
return (Record)m_records.get( position );
}
/**
* Get a set of records with the same name.
*/
public Set getRecordset( String name )
{
Set recordSet = new HashSet();
Iterator it = m_records.iterator();
while (it.hasNext())
{
Record currRecord = (Record) it.next();
if ( currRecord.getName().equals(name) )
{
recordSet.add( currRecord );
}
}
return recordSet;
}
/**
* Get the Record iterator
*/
public Iterator iterator()
{
return m_records.iterator();
}
/**
* Get the number of Records in the Record
*/
public int numberOfRecords()
{
return m_records.size();
}
}
1.1 jakarta-avalon-apps/infomover/src/manifest/AltrmiHelloWorldTest.mf
Index: AltrmiHelloWorldTest.mf
===================================================================
Manifest-Version: 1.0
Main-Class: org.apache.avalon.apps.demos.altrmihelloworldserver.AltrmiHelloWorldServerTester
1.1 jakarta-avalon-apps/infomover/src/test/org/apache/infomover/transaction/test/FieldTestCase.java
Index: FieldTestCase.java
===================================================================
/* Copyright 2002, D-Haven.org. All rights reserved.
*
* Permission to distribute and modify the software is granted provided the
* copyright notice and the license is the same.
*/
package org.apache.infomover.transaction.test;
import org.apache.infomover.transaction.Field;
import junit.framework.TestCase;
/**
* The <code>Field</code> class represents the smallest unit of information
* that InfoMover can understand.
*/
public class FieldTestCase extends TestCase
{
public FieldTestCase( String name )
{
super( name );
}
public void testInitialValues() throws Exception
{
Field testField = new Field("test", new Integer(7), Field.INTEGER);
assertEquals( "test", testField.getName() );
assertEquals( Field.INTEGER, testField.getType() );
assertEquals( 7, ((Integer)testField.getValue()).intValue() );
}
public void testChangeValue() throws Exception
{
Field testField = new Field("test", new Integer(7), Field.INTEGER);
assertEquals( 7, ((Integer)testField.getValue()).intValue() );
assertEquals( Field.INTEGER, testField.getType() );
testField.changeValue( new Integer(5) );
assertEquals( 5, ((Integer)testField.getValue()).intValue() );
assertEquals( Field.INTEGER, testField.getType() );
}
public void testChangeValueAndType() throws Exception
{
Field testField = new Field("test", new Integer(7), Field.INTEGER);
assertEquals( 7, ((Integer)testField.getValue()).intValue() );
assertEquals( Field.INTEGER, testField.getType() );
testField.changeValue( new Double(1.23), Field.FLOAT );
assertTrue( 1.23 == ((Double)testField.getValue()).doubleValue() );
assertEquals( Field.FLOAT, testField.getType() );
}
public void testNullable() throws Exception
{
Field testField = new Field("test", new Integer(7), Field.INTEGER);
assertEquals( 7, ((Integer)testField.getValue()).intValue() );
assertEquals( Field.INTEGER, testField.getType() );
testField.setNull();
assertEquals( null, testField.getValue() );
assertEquals( Field.INTEGER, testField.getType() );
}
}
1.1 jakarta-avalon-apps/infomover/src/test/org/apache/infomover/transaction/test/RecordTestCase.java
Index: RecordTestCase.java
===================================================================
/* Copyright 2002, D-Haven.org. All rights reserved.
*
* Permission to distribute and modify the software is granted provided the
* copyright notice and the license is the same.
*/
package org.apache.infomover.transaction.test;
import java.util.Iterator;
import java.util.ArrayList;
import org.apache.infomover.transaction.Record;
import org.apache.infomover.transaction.Field;
import junit.framework.TestCase;
/**
* The <code>Field</code> class represents the smallest unit of information
* that InfoMover can understand.
*/
public class RecordTestCase extends TestCase
{
public RecordTestCase( String name )
{
super( name );
}
public void testInitialValues() throws Exception
{
Record record = new Record( Record.ADD );
ArrayList initialList = new ArrayList();
assertEquals( 0, record.numberOfFields());
assertEquals( 0, initialList.size() );
for (int i = 1; i <= 7; i++) // from 1 to 7
{
record.addField( new Field("test" + i, new Integer(i), Field.INTEGER) );
initialList.add( new Field("test" + i, new Integer(i), Field.INTEGER) );
}
Record testRecord = new Record( Record.ADD, initialList );
assertEquals( Record.ADD, record.getType() );
assertEquals( Record.ADD, testRecord.getType() );
assertEquals( record.numberOfFields(), testRecord.numberOfFields() );
assertEquals( 7, record.numberOfFields() );
assertEquals( 7, testRecord.numberOfFields() );
for (int i = 0; i < record.numberOfFields(); i++)
{
assertEquals( record.getField( i ).getValue(), new Integer(i + 1) );
assertEquals( testRecord.getField( i ).getValue(), new Integer(i + 1) );
}
assertEquals( record.getField( 6 ).getValue(), testRecord.getField( "test7" ).getValue() );
}
public void testRemoveFields() throws Exception
{
Record record = new Record( Record.ADD );
for (int i = 1; i <= 7; i++) // from 1 to 7
{
record.addField( new Field("test" + i, new Integer(i), Field.INTEGER) );
}
assertEquals( 7, record.numberOfFields() );
Field field1 = record.removeField( 3 );
Field field2 = record.removeField( 3 );
assertTrue( ((Integer)field1.getValue()).intValue() ==
((Integer)field2.getValue()).intValue() - 1 );
assertEquals( "test7", record.removeField( "test7" ).getName() );
assertEquals( 4, record.numberOfFields() );
}
public void testAccessFields() throws Exception
{
Record record = new Record( Record.ADD );
for (int i = 1; i <= 7; i++) // from 1 to 7
{
record.addField( new Field("test" + i, new Integer(i), Field.INTEGER) );
}
assertEquals( 7, record.numberOfFields() );
Field field1 = record.getField( 2 );
Field field2 = record.getField( "test3" );
assertSame( field1, field2 );
}
public void testIterator() throws Exception
{
Record record = new Record( Record.ADD );
for (int i = 1; i <= 7; i++) // from 1 to 7
{
record.addField( new Field("test" + i, new Integer(i), Field.INTEGER) );
}
assertEquals( 7, record.numberOfFields() );
Iterator i = record.iterator();
while( i.hasNext() )
{
Field field = (Field) i.next();
if ( field.getName().equals( "test3" ) )
{
i.remove();
}
}
assertEquals( 6, record.numberOfFields() );
assertEquals( null, record.getField( "test3" ) );
}
}
1.1 jakarta-avalon-apps/infomover/src/test/org/apache/infomover/transaction/test/TransactionTest.java
Index: TransactionTest.java
===================================================================
/* Copyright 2002, D-Haven.org. All rights reserved.
*
* Permission to distribute and modify the software is granted provided the
* copyright notice and the license is the same.
*/
package org.apache.infomover.transaction.test;
import org.apache.infomover.transaction.Transaction;
import org.apache.infomover.transaction.Record;
import junit.framework.TestCase;
import java.util.List;
import java.util.ArrayList;
import java.util.Iterator;
/**
* The <code>Transaction</code> class represents the most granular level of
* abstraction. Once a transaction is processed, it must be successful or
* roll back any changes.
*
* We test it here.
*/
public class TransactionTest extends TestCase
{
/**
* Constructor for TransactionTest.
* @param arg0
*/
public TransactionTest(String name)
{
super(name);
}
public static void main(String[] args)
{
junit.swingui.TestRunner.run(TransactionTest.class);
}
/*
* Test for void Transaction(List)
*/
public void testTransactionList()
{
Transaction t1 = new Transaction();
List l = new ArrayList();
for (int i = 0; i < 10; i++)
{
Record r = new Record( Record.ADD );
l.add( r );
t1.addRecord( r );
}
Transaction t2 = new Transaction( l );
for (int i = 0; i < 10; i++)
{
assertSame( t1.getRecord( i ), t2.getRecord( i ) );
}
}
/*
* Test for void addRecord(int, Record)
*/
public void testAddRecordIRecord()
{
Transaction t = new Transaction();
for (int i = 0; i < 10; i++)
{
t.addRecord( new Record( Record.ADD ) );
}
t.addRecord(5, new Record( Record.REFERENCE ) );
assertEquals( t.getRecord(5).getType(), Record.REFERENCE);
assertEquals( t.numberOfRecords(), 11 );
}
public void testRemoveRecord()
{
Transaction t = new Transaction();
for (int i = 0; i < 10; i++)
{
t.addRecord( new Record( Record.ADD ) );
}
t.removeRecord( 5 );
assertEquals( t.numberOfRecords(), 9 );
}
public void testIterator()
{
List l = new ArrayList();
for (int i = 0; i < 10; i++)
{
l.add( new Record( Record.ADD ) );
}
Transaction t = new Transaction( l );
Iterator i = t.iterator();
int j = 0;
while ( i.hasNext() )
{
assertSame( l.get(j), i.next() );
j++;
}
assertEquals( t.numberOfRecords(), 10 );
}
}
1.1 jakarta-avalon-apps/infomover/src/xdocs/index.xml
Index: index.xml
===================================================================
<?xml version="1.0"?>
<!DOCTYPE document SYSTEM "dtd/document-v10.dtd">
<document>
<header>
<title>Avalon Applications / Demo</title>
<subtitle>Introduction</subtitle>
<authors>
<person name="Avalon Documentation Team" email="avalon-dev@jakarta.apache.org"/>
</authors>
</header>
<body>
<s1 title="Introduction">
<p>
Demos are a few very simple blocks for phoenix.
</p>
</s1>
</body>
<footer>
<legal>
Copyright (c) @year@ The Jakarta Apache Project All rights reserved.
$Revision: 1.1 $ $Date: 2002/08/13 15:41:58 $
</legal>
</footer>
</document>
1.1 jakarta-avalon-apps/infomover/src/xdocs/menu.xml
Index: menu.xml
===================================================================
<?xml version="1.0"?>
<project software="Avalon Applications"
name="Avalon Applications Documentation - Demo"
href="http://jakarta.apache.org/avalon/apps/apps/demo/">
<title>Apache Avalon Apps - InfoMover</title>
<body>
<menu name="About">
<item name="Overview" href="index.html"/>
<item name="API Docs" href="api/"/>
<item name="Download" href="http://jakarta.apache.org/builds/jakarta-avalon-apps/"/>
</menu>
</body>
</project>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>