You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2003/05/04 14:19:50 UTC
cvs commit: avalon-cornerstone/threads/threads-impl/src/java/org/apache/avalon/cornerstone/blocks/threads DefaultThreadManager-schema.xml DefaultThreadManager.java DefaultThreadManager.xinfo package.html
mcconnell 2003/05/04 05:19:50
Modified: . .cvsignore default.properties threads.properties
threads.xml
Added: . maven.xml project.properties project.xml
site .cvsignore maven.xml project.xml
site/xdocs index.xml navigation.xml
site/xdocs/components connection.xml datasource.xml
index.xml navigation.xml scheduler.xml sockets.xml
store.xml threads.xml
site/xdocs/examples index.xml navigation.xml
site/xdocs/notes build.xml download.xml index.xml
navigation.xml
threads .cvsignore maven.xml project.xml
threads/threads-api .cvsignore maven.xml project.properties
project.xml
threads/threads-api/src/java/org/apache/avalon/cornerstone/services/threads
ThreadManager.java package.html
threads/threads-impl .cvsignore maven.xml project.properties
project.xml
threads/threads-impl/src/conf/BLOCK-INF block.xml
threads/threads-impl/src/java/org/apache/avalon/cornerstone/blocks/threads
DefaultThreadManager-schema.xml
DefaultThreadManager.java
DefaultThreadManager.xinfo package.html
Log:
Initial addition of a threads component sub-project.
Revision Changes Path
1.12 +1 -0 avalon-cornerstone/.cvsignore
Index: .cvsignore
===================================================================
RCS file: /home/cvs/avalon-cornerstone/.cvsignore,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- .cvsignore 22 Mar 2003 11:21:24 -0000 1.11
+++ .cvsignore 4 May 2003 12:19:48 -0000 1.12
@@ -6,3 +6,4 @@
distributions
docs
*.ipr
+maven.log
1.4 +4 -4 avalon-cornerstone/default.properties
Index: default.properties
===================================================================
RCS file: /home/cvs/avalon-cornerstone/default.properties,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- default.properties 6 Feb 2003 13:33:15 -0000 1.3
+++ default.properties 4 May 2003 12:19:48 -0000 1.4
@@ -27,10 +27,10 @@
# ----- Tools -----
tools.dir=${avalon-framework.home}/tools
-tools.lib=${tools.dir}/lib
-xalan.jar=${tools.lib}/xalan-2.3.1.jar
-xerces.jar=${tools.lib}/xerces-2.0.1.jar
-xml-apis.jar=${tools.lib}/xml-apis.jar
+#tools.lib=${tools.dir}/lib
+#xalan.jar=${tools.lib}/xalan-2.3.1.jar
+#xerces.jar=${tools.lib}/xerces-2.0.1.jar
+#xml-apis.jar=${tools.lib}/xml-apis.jar
# ----- Metagenate Tools -----
metagenerate.jar=lib/phoenix-metagenerate.jar
1.6 +1 -1 avalon-cornerstone/threads.properties
Index: threads.properties
===================================================================
RCS file: /home/cvs/avalon-cornerstone/threads.properties,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- threads.properties 28 Jan 2003 12:18:38 -0000 1.5
+++ threads.properties 4 May 2003 12:19:48 -0000 1.6
@@ -39,7 +39,7 @@
# ----- Excalibur thread, version 1.0 or later -----
excalibur-thread.home=${excalibur.home}/thread
excalibur-thread.lib=${excalibur-thread.home}/build/lib
-excalibur-thread.jar=${excalibur-thread.lib}/excalibur-thread-1.1.jar
+excalibur-thread.jar=lib/excalibur-thread-1.1.1.jar
excalibur-thread.ext.name=excalibur-thread
excalibur-thread.ext.version=1.0
excalibur-thread.ext.impl=1.1
1.5 +1 -1 avalon-cornerstone/threads.xml
Index: threads.xml
===================================================================
RCS file: /home/cvs/avalon-cornerstone/threads.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- threads.xml 6 Apr 2003 02:09:58 -0000 1.4
+++ threads.xml 4 May 2003 12:19:48 -0000 1.5
@@ -14,7 +14,7 @@
<pathelement location="${xml-apis.jar}"/>
<pathelement location="${avalon-framework.jar}"/>
<pathelement location="${excalibur-thread.jar}"/>
- <pathelement location="${excalibur-threadcontext.jar}"/>
+ <!--<pathelement location="${excalibur-threadcontext.jar}"/>-->
<pathelement location="${metagenerate.jar}"/>
<pathelement location="${qdox.jar}"/>
<pathelement path="${java.class.path}" />
1.1 avalon-cornerstone/maven.xml
Index: maven.xml
===================================================================
<project default="jar:jar" xmlns:maven="jelly:maven" xmlns:j="jelly:core" xmlns:util="jelly:util">
<property file="${basedir}/project.properties"/>
<property file="${basedir}/../project.properties"/>
</project>
1.1 avalon-cornerstone/project.properties
Index: project.properties
===================================================================
#
# Banner background and foreground colors.
#
maven.ui.banner.background = #fff
maven.ui.banner.foreground = #000
maven.xdoc.jsl = file:/${basedir}/../src/etc/site.jsl
maven.javadoc.stylesheet =${basedir}/../src/etc/stylesheet.css
maven.license.licenseFile = ${basedir}/../src/etc/LICENSE.txt
maven.checkstyle.format = avalon
pom.organization.identifier = ASF
pom.specificationVersion = 1.0
#
# Declaration of the remote links to assign on javadoc generation.
# Link declarations can be overriden in the user's build.properties
# file.
#
sun.j2se.link = http://java.sun.com/j2se/1.4/docs/api/
avalon.framework.link = http://avalon.apache.org/framework/api/
avalon.logkit.link = http://avalon.apache.org/logkit/api/
excalibur.thread.link = http://avalon.apache.org/excalibur/thread/api/
excalibur.event.link = http://avalon.apache.org/excalibur/event/api/
maven.javadoc.links = ${sun.j2se.link},${avalon.logkit.link},${avalon.framework.link},${excalibur.thread.link},${excalibur.event.link}
1.1 avalon-cornerstone/project.xml
Index: project.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<project>
<pomVersion>3</pomVersion>
<groupId>cornerstone</groupId>
<id>cornerstone-home</id>
<name>Cornerstone Component Suite</name>
<currentVersion>1.0</currentVersion>
<organization>
<name>Apache Software Foundation</name>
<url>http://avalon.apache.org/</url>
<logo>http://avalon.apache.org/images/apache-avalon-logo.png</logo>
</organization>
<inceptionYear>1997</inceptionYear>
<package>org.apache.avalon.cornerstone</package>
<gumpRepositoryId>avalon-cornerstone</gumpRepositoryId>
<url>http://avalon.apache.org/cornerstone/</url>
<issueTrackingUrl>http://nagoya.apache.org/</issueTrackingUrl>
<siteAddress>avalon.apache.org</siteAddress>
<siteDirectory>${root.site.directory}/cornerstone</siteDirectory>
<distributionDirectory></distributionDirectory>
<repository>
<connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:avalon-cornerstone</connection>
<url>http://cvs.apache.org/viewcvs/avalon-cornerstone/</url>
</repository>
<mailingLists>
<mailingList>
<name>Avalon Developer List</name>
<subscribe>avalon-dev-subscribe@avalon.apache.org</subscribe>
<unsubscribe>avalon-dev-unsubscribe@avalon.apache.org</unsubscribe>
<archive>http://nagoya.apache.org/eyebrowse/SummarizeList?listName=dev@avalon.apache.org</archive>
</mailingList>
<mailingList>
<name>Avalon User List</name>
<subscribe>avalon-users-subscribe@avalon.apache.org</subscribe>
<unsubscribe>avalon-users-unsubscribe@avalon.apache.org</unsubscribe>
<archive>http://nagoya.apache.org/eyebrowse/SummarizeList?listName=users@avalon.apache.org</archive>
</mailingList>
</mailingLists>
<developers>
<developer>
<name>Stephen McConnell</name>
<id>mcconnell</id>
<email>mcconnell@apache.org</email>
</developer>
<developer>
<name>Leo Simons</name>
<id>leosimons</id>
<email>leosimons@apache.org</email>
</developer>
<developer>
<name>Berin Loritsch</name>
<id>bloritsch</id>
<email>bloritsch@apache.org</email>
</developer>
<developer>
<name>Jeff Turner</name>
<id>jefft</id>
<email>jefft@apache.org</email>
</developer>
<developer>
<name>Peter Donald</name>
<email>donaldp@apache.org</email>
<id>donaldp</id>
</developer>
<developer>
<name>Paul Hammant</name>
<email>hammant@apache.org</email>
<id>hammant</id>
</developer>
</developers>
<build>
<nagEmailAddress>dev@avalon.apache.org</nagEmailAddress>
<sourceDirectory>${basedir}/src/java</sourceDirectory>
<unitTestSourceDirectory>${basedir}/src/test</unitTestSourceDirectory>
<integrationUnitTestSourceDirectory/>
<aspectSourceDirectory/>
<unitTest>
<includes>
<include>**/*TestCase*</include>
</includes>
<excludes>
</excludes>
<resources>
<resource>
<directory>${basedir}/src/test</directory>
<includes>
<include>**/*.dtd</include>
<include>**/*.properties</include>
<include>**/*.xinfo</include>
<include>**/*.xtype</include>
<include>**/*.xprofile</include>
<include>**/*.xconfig</include>
<include>**/*.xml</include>
<include>**/*.xservice</include>
</includes>
</resource>
</resources>
</unitTest>
<integrationUnitTestPatterns></integrationUnitTestPatterns>
<resources>
<resource>
<directory>${basedir}/src/java</directory>
<includes>
<include>**/*.dtd</include>
<include>**/*.properties</include>
<include>**/*.xinfo</include>
<include>**/*.xtype</include>
<include>**/*.xprofile</include>
<include>**/*.xconfig</include>
<include>**/*.xml</include>
<include>**/*.xservice</include>
</includes>
</resource>
<resource>
<directory>${basedir}/../site/src/etc</directory>
<includes>
<include>LICENSE.txt</include>
</includes>
</resource>
</resources>
<jars></jars>
</build>
</project>
1.1 avalon-cornerstone/site/.cvsignore
Index: .cvsignore
===================================================================
maven.log
velocity.log
build.properties
target
maven.log
1.1 avalon-cornerstone/site/maven.xml
Index: maven.xml
===================================================================
<project default="build" xmlns:maven="jelly:maven" xmlns:j="jelly:core" xmlns:util="jelly:util" xmlns:ant="jelly:ant">
<preGoal name="site">
<attainGoal name="license"/>
<attainGoal name="xjavadoc"/>
</preGoal>
<goal name="xjavadoc">
<mkdir dir="${basedir}/target/docs/api" />
<property name="copyright"
value="Copyright &copy; ${year} ${pom.organization.name}. All Rights Reserved." />
<property name="title" value="${pom.name} ${pom.currentVersion} API"/>
<javadoc destdir="${basedir}/target/docs/api"
doctitle="<h1>Cornerstone API</h1>"
noindex="false" author="true" use="true"
windowtitle="${title}"
bottom="${copyright}"
additionalparam="-breakiterator -J-Xmx128m "
packagenames="*,org.*">
<j:forEach var="packageGroup" items="${pom.packageGroups}">
<group title="${packageGroup.title}" packages="${packageGroup.packages}"/>
</j:forEach>
<sourcepath path="${basedir}/../threads/threads-api/src/java"/>
<sourcepath path="${basedir}/../threads/threads-impl/src/java"/>
<classpath>
<path refid="maven.dependency.classpath"/>
</classpath>
<link href="${sun.j2se.link}" />
<link href="${avalon.logkit.link}" />
<link href="${avalon.framework.link}" />
<link href="${excalibur.thread.link}" />
<link href="${excalibur.event.link}" />
</javadoc>
</goal>
</project>
1.1 avalon-cornerstone/site/project.xml
Index: project.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<project>
<extend>${basedir}/../project.xml</extend>
<groupId>cornerstone</groupId>
<id>cornerstone-threads</id>
<name>Cornerstone Threads Package</name>
<package>org.apache.avalon.cornerstone.threads</package>
<inceptionYear>2001</inceptionYear>
<shortDescription>Cornerstone Threads Package</shortDescription>
<dependencies>
<dependency>
<groupId>avalon</groupId>
<artifactId>avalon-framework</artifactId>
<version>4.1.4</version>
</dependency>
<!-- excalibur dependencies -->
<dependency>
<groupId>excalibur</groupId>
<artifactId>excalibur-thread</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>excalibur</groupId>
<artifactId>excalibur-event</artifactId>
<version>2.0</version>
</dependency>
<!-- local dependencies -->
<dependency>
<groupId>cornerstone</groupId>
<artifactId>cornerstone-threads</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
<build>
<nagEmailAddress>dev@avalon.apache.org</nagEmailAddress>
<sourceDirectory>${basedir}/src/java</sourceDirectory>
<unitTestSourceDirectory>${basedir}/src/test</unitTestSourceDirectory>
<integrationUnitTestSourceDirectory/>
<aspectSourceDirectory/>
<unitTest>
<includes>
<include>**/*TestCase*</include>
</includes>
<excludes>
</excludes>
<resources>
<resource>
<directory>${basedir}/src/test</directory>
<includes>
<include>**/*.dtd</include>
<include>**/*.properties</include>
<include>**/*.xinfo</include>
<include>**/*.xtype</include>
<include>**/*.xprofile</include>
<include>**/*.xconfig</include>
<include>**/*.xml</include>
<include>**/*.xservice</include>
</includes>
</resource>
</resources>
</unitTest>
<integrationUnitTestPatterns></integrationUnitTestPatterns>
<resources>
<resource>
<directory>${basedir}/src/java</directory>
<includes>
<include>**/*.dtd</include>
<include>**/*.properties</include>
<include>**/*.xinfo</include>
<include>**/*.xtype</include>
<include>**/*.xprofile</include>
<include>**/*.xconfig</include>
<include>**/*.xml</include>
<include>**/*.xservice</include>
</includes>
</resource>
</resources>
<jars></jars>
</build>
<reports>
<report>maven-changelog-plugin</report>
<report>maven-file-activity-plugin</report>
<report>maven-developer-activity-plugin</report>
</reports>
</project>
1.1 avalon-cornerstone/site/xdocs/index.xml
Index: index.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<author email="mcconnell@apache.org">Stephen McConnell</author>
<title>Cornerstone</title>
</properties>
<body>
<section name="Cornerstone">
<subsection name="About">
<p>
The cornerstone project is the home of a set of utility components
that can be used to simplify application development. These components
and typically singleton components that represent structural building
blocks.
</p>
<p>
The <a href="components/index.html">Cornerstone Component List</a> details
the set of available components and release status.
</p>
<p>
These components have been tested and validated under a number of
Avalon containers. Further information concerning container support
or container specific deployment requirements, please consult the respective
component fact sheet.
</p>
</subsection>
</section>
</body>
</document>
1.1 avalon-cornerstone/site/xdocs/navigation.xml
Index: navigation.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<project>
<title>Cornerstone Threads</title>
<body>
<links>
<item name="Home" href="http://avalon.apache.org/"/>
<item name="Framework" href="http://avalon.apache.org/framework/"/>
<item name="Components" href="http://avalon.apache.org/components"/>
<item name="Containers" href="http://avalon.apache.org/containers/"/>
<item name="Sandbox" href="http://avalon.apache.org/sandbox/"/>
</links>
<menu name="About Cornerstone">
<item name="Overview" href="/index.html"/>
<item name="Components" href="/components/index.html"/>
<item name="Examples" href="/examples/index.html"/>
<item name="Developer Info" href="/notes/index.html"/>
</menu>
</body>
</project>
1.1 avalon-cornerstone/site/xdocs/components/connection.xml
Index: connection.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<author email="mcconnell@apache.org">Stephen McConnell</author>
<title>Cornerstone Scheduler</title>
</properties>
<body>
<section name="Cornerstone Components - Connnection">
<p><strong>PLACEHOLDER</strong></p>
</section>
</body>
</document>
1.1 avalon-cornerstone/site/xdocs/components/datasource.xml
Index: datasource.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<author email="mcconnell@apache.org">Stephen McConnell</author>
<title>Cornerstone Datasource</title>
</properties>
<body>
<section name="Cornerstone Components - Datasource">
<p><strong>PLACEHOLDER</strong></p>
</section>
</body>
</document>
1.1 avalon-cornerstone/site/xdocs/components/index.xml
Index: index.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<author email="mcconnell@apache.org">Stephen McConnell</author>
<title>Cornerstone Thread Manager</title>
</properties>
<body>
<section name="Cornerstone Components">
<subsection name="Index">
<table>
<tr><th>Topic</th><th>Description</th><th>Status</th></tr>
<tr><td><a href="connection.html">Connection</a></td>
<td>
<p>
The ConnectionManager service provides a facility to listen
for incoming socket connections.
The DefaultConnectionManager compoent gives a thread pooled
implementation of this service. If there are multiple server
components depending on this component, they would all share
the same thread pool.
</p>
</td>
<td>IN-PROCESS</td>
</tr>
<tr><td><a href="datasource.html">Deatsource</a></td>
<td>
<p>
The DataSourceSelector service provides a way to select
DataSourceComponent.
The DefaultDataSourceSelector component provides a set of
ready to use DataSourceComponents.
</p>
</td>
<td>IN-PROCESS</td>
</tr>
<tr><td><a href="scheduler.html">Scheduler</a></td>
<td>
<p>
The TimeScheduler service provides a services supporting the
scheduling of activities to occur an certain intervals.
The DefaultTimeScheduler block implements the service. When
used in conjunction with the service is it a TimeTrigger.
There are two such tiggers provided within the implementation
CronTimeTrigger and PeriodicTimeTigger.
</p>
</td>
<td>IN-PROCESS</td>
</tr>
<tr><td><a href="sockets.html">Sockets</a></td>
<td>
<p>
The SocketManager service provides a way to lookup a factory
for server of client sockets. This service is provided by the
DefaultSocketManager component.
</p>
</td>
<td>IN-PROCESS</td>
</tr>
<tr><td><a href="store.html">Store</a></td>
<td>
<p>
The Store service provides a way to store named Objects or
Streams without knowing how they are stored.
The RepositoryManager block implements this service and
provides (in invocation of select(..) ) an appropriate
Respository. The two configurable implementations use the
local file system for storage.
</p>
</td>
<td>IN-PROCESS</td>
</tr>
<tr><td><a href="threads.html">Threads</a></td>
<td>
<p>
The ThreadManager service provides a way get default or named
Thread Pool.
The DefaultThreadManager block implements this service based on
the Excalibur implementations of ThreadPool.
</p>
</td>
<td>CANDIDATE</td>
</tr>
</table>
</subsection>
</section>
</body>
</document>
1.1 avalon-cornerstone/site/xdocs/components/navigation.xml
Index: navigation.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<project>
<title>Cornerstone Threads</title>
<body>
<links>
<item name="Home" href="http://avalon.apache.org/"/>
<item name="Framework" href="http://avalon.apache.org/framework/"/>
<item name="Components" href="http://avalon.apache.org/components"/>
<item name="Containers" href="http://avalon.apache.org/containers/"/>
<item name="Sandbox" href="http://avalon.apache.org/sandbox/"/>
</links>
<menu name="About Cornerstone">
<item name="Overview" href="/index.html"/>
<item name="Components" href="/components/index.html">
<item name="Connection" href="/components/connection.html"/>
<item name="Datasource" href="/components/datasource.html"/>
<item name="Scheduler" href="/components/scheduler.html"/>
<item name="Sockets" href="/components/sockets.html"/>
<item name="Store" href="/components/store.html"/>
<item name="Threads" href="/components/threads.html"/>
</item>
<item name="Examples" href="/examples/index.html"/>
<item name="Developer Info" href="/notes/index.html"/>
</menu>
</body>
</project>
1.1 avalon-cornerstone/site/xdocs/components/scheduler.xml
Index: scheduler.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<author email="mcconnell@apache.org">Stephen McConnell</author>
<title>Cornerstone Scheduler</title>
</properties>
<body>
<section name="Cornerstone Components - Scheduler">
<p><strong>PLACEHOLDER</strong></p>
</section>
</body>
</document>
1.1 avalon-cornerstone/site/xdocs/components/sockets.xml
Index: sockets.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<author email="mcconnell@apache.org">Stephen McConnell</author>
<title>Cornerstone Scheduler</title>
</properties>
<body>
<section name="Cornerstone Components - Sockets">
<p><strong>PLACEHOLDER</strong></p>
</section>
</body>
</document>
1.1 avalon-cornerstone/site/xdocs/components/store.xml
Index: store.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<author email="mcconnell@apache.org">Stephen McConnell</author>
<title>Cornerstone Datasource</title>
</properties>
<body>
<section name="Cornerstone Components - Store">
<p><strong>PLACEHOLDER</strong></p>
</section>
</body>
</document>
1.1 avalon-cornerstone/site/xdocs/components/threads.xml
Index: threads.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<author email="mcconnell@apache.org">Stephen McConnell</author>
<title>Cornerstone Scheduler</title>
</properties>
<body>
<section name="Cornerstone Components - Threads">
<subsection name="Description">
<p>The threads component provides support for the establishment
a set of named thread pools. The component implementation can be configured
such that multiple thread pools may be defined within which each pool has
a minimum and maximum pool criteria and daemon property. Consumer components
can access threads from named or default pool using the ThreadManager
service interface.</p>
</subsection>
<subsection name="Deployment Facts">
<table>
<tr><td>Container Support</td><td>
<a href="http://avalon.apache.org/excalibur/fortress/">Fortress</a>,
<a href="http://avalon.apache.org/sandbox/merlin/">Merlin</a>,
<a href="http://avalon.apache.org/phoenix/">Phoenix</a>.</td>
</tr>
<tr><td>Lifestyle</td><td>singleton</td></tr>
<tr><td>Lifecycle</td>
<td>
<table>
<tr><th>Stage</th><th>Description</th></tr>
<tr><td>LogEnabled</td><td>Logs information concerning created pools during
configuration at the DEBUG level.</td></tr>
<tr>
<td>Configurable</td>
<td>
Declaration of the thread pools and associated
pool establishment criteria. An example configuration is
presented below.
<source><![CDATA[
<configuration>
<thread-group>
<name>default</name>
<is-daemon>false</is-daemon>
<max-threads>100</max-threads>
<min-threads>20</min-threads>
</thread-group>
</configuration>
]]></source>
</td>
</tr>
</table>
</td>
</tr>
</table>
</subsection>
<subsection name="Example">
<p>In preparation.</p>
</subsection>
</section>
</body>
</document>
1.1 avalon-cornerstone/site/xdocs/examples/index.xml
Index: index.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<author email="mcconnell@apache.org">Stephen McConnell</author>
<title>Cornerstone Examples</title>
</properties>
<body>
<section name="Cornerstone - Examples">
<subsection name="Index">
<p>PLACEHOLDER</p>
</subsection>
</section>
</body>
</document>
1.1 avalon-cornerstone/site/xdocs/examples/navigation.xml
Index: navigation.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<project>
<title>Cornerstone Threads</title>
<body>
<links>
<item name="Home" href="http://avalon.apache.org/"/>
<item name="Framework" href="http://avalon.apache.org/framework/"/>
<item name="Components" href="http://avalon.apache.org/components"/>
<item name="Containers" href="http://avalon.apache.org/containers/"/>
<item name="Sandbox" href="http://avalon.apache.org/sandbox/"/>
</links>
<menu name="About Cornerstone">
<item name="Overview" href="/index.html"/>
<item name="Components" href="/components/index.html"/>
<item name="Examples" href="/examples/index.html"/>
<item name="Developer Info" href="/notes/index.html"/>
</menu>
</body>
</project>
1.1 avalon-cornerstone/site/xdocs/notes/build.xml
Index: build.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<author email="mcconnell@apache.org">Stephen McConnell</author>
<title>Cornerstone Notes</title>
</properties>
<body>
<section name="Cornerstone - Developer Info">
<subsection name="Build Instructions">
<p>PLACEHOLDER</p>
</subsection>
</section>
</body>
</document>
1.1 avalon-cornerstone/site/xdocs/notes/download.xml
Index: download.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<author email="mcconnell@apache.org">Stephen McConnell</author>
<title>Cornerstone</title>
</properties>
<body>
<section name="Cornerstone - Developer Info">
<subsection name="Download">
<p>PLACEHOLDER</p>
</subsection>
</section>
</body>
</document>
1.1 avalon-cornerstone/site/xdocs/notes/index.xml
Index: index.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<author email="mcconnell@apache.org">Stephen McConnell</author>
<title>Cornerstone Examples</title>
</properties>
<body>
<section name="Cornerstone - Developer Info">
<subsection name="Index">
<p>PLACEHOLDER</p>
</subsection>
</section>
</body>
</document>
1.1 avalon-cornerstone/site/xdocs/notes/navigation.xml
Index: navigation.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<project>
<title>Cornerstone Threads</title>
<body>
<links>
<item name="Home" href="http://avalon.apache.org/"/>
<item name="Framework" href="http://avalon.apache.org/framework/"/>
<item name="Components" href="http://avalon.apache.org/components"/>
<item name="Containers" href="http://avalon.apache.org/containers/"/>
<item name="Sandbox" href="http://avalon.apache.org/sandbox/"/>
</links>
<menu name="About Cornerstone">
<item name="Overview" href="/index.html"/>
<item name="Components" href="/components/index.html"/>
<item name="Examples" href="/examples/index.html"/>
<item name="Developer Info" href="/notes/index.html">
<item name="Download" href="/notes/download.html"/>
<item name="Build Instructions" href="/notes/build.html"/>
<item name="Javadoc" href="/api/index.html"/>
</item>
</menu>
</body>
</project>
1.1 avalon-cornerstone/threads/.cvsignore
Index: .cvsignore
===================================================================
maven.log
velocity.log
build.properties
target
maven.log
1.1 avalon-cornerstone/threads/maven.xml
Index: maven.xml
===================================================================
<project default="build" xmlns:maven="jelly:maven" xmlns:j="jelly:core" xmlns:util="jelly:util" xmlns:ant="jelly:ant">
<!--
Top level build target for the cornerstone thread package. Triggers
jar:install of api and impl subprojects
-->
<goal name="build">
<maven:reactor
basedir="${basedir}"
includes="*/project.xml"
goals="jar:install"
banner="Installing jar:"
ignoreFailures="false" />
</goal>
<postGoal name="build">
<attainGoal name="jar:install"/>
</postGoal>
<!--
Invoke clean on the subprojects (impl and api).
-->
<preGoal name="clean:clean">
<maven:reactor
basedir="${basedir}"
includes="*/project.xml"
goals="clean"
banner="Clean:"
ignoreFailures="false" />
</preGoal>
</project>
1.1 avalon-cornerstone/threads/project.xml
Index: project.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<project>
<extend>${basedir}/../project.xml</extend>
<groupId>cornerstone</groupId>
<id>cornerstone-threads</id>
<name>Cornerstone Threads Package</name>
<package>org.apache.avalon.cornerstone.threads</package>
<inceptionYear>2001</inceptionYear>
<shortDescription>Cornerstone Threads Package</shortDescription>
<build>
<nagEmailAddress>dev@avalon.apache.org</nagEmailAddress>
<sourceDirectory>${basedir}/src/java</sourceDirectory>
<unitTestSourceDirectory>${basedir}/src/test</unitTestSourceDirectory>
<integrationUnitTestSourceDirectory/>
<aspectSourceDirectory/>
<unitTest>
<includes>
<include>**/*TestCase*</include>
</includes>
<excludes>
</excludes>
<resources>
<resource>
<directory>${basedir}/src/test</directory>
<includes>
<include>**/*.dtd</include>
<include>**/*.properties</include>
<include>**/*.xinfo</include>
<include>**/*.xtype</include>
<include>**/*.xprofile</include>
<include>**/*.xconfig</include>
<include>**/*.xml</include>
<include>**/*.xservice</include>
</includes>
</resource>
</resources>
</unitTest>
<integrationUnitTestPatterns></integrationUnitTestPatterns>
<resources>
<resource>
<directory>${basedir}/src/java</directory>
<includes>
<include>**/*.dtd</include>
<include>**/*.properties</include>
<include>**/*.xinfo</include>
<include>**/*.xtype</include>
<include>**/*.xprofile</include>
<include>**/*.xconfig</include>
<include>**/*.xml</include>
<include>**/*.xservice</include>
</includes>
</resource>
<resource>
<directory>${basedir}/src/conf</directory>
<includes>
<include>**/block.xml</include>
</includes>
</resource>
</resources>
<jars></jars>
</build>
</project>
1.1 avalon-cornerstone/threads/threads-api/.cvsignore
Index: .cvsignore
===================================================================
maven.log
velocity.log
build.properties
target
maven.log
1.1 avalon-cornerstone/threads/threads-api/maven.xml
Index: maven.xml
===================================================================
<project default="jar:jar" xmlns:maven="jelly:maven" xmlns:j="jelly:core" xmlns:util="jelly:util" xmlns:ant="jelly:ant">
<!--
Postgoal invoked by suprojects that causes the replication of
content into the threads project target classes directory, enabling
the creation of a composite jar file.
-->
<postGoal name="jar:jar">
<unzip src="${maven.build.dir}/${maven.final.name}.jar"
dest="../target/classes"/>
</postGoal>
</project>
1.1 avalon-cornerstone/threads/threads-api/project.properties
Index: project.properties
===================================================================
#
# Override the standard Maven site script.
#
maven.xdoc.jsl = file:/${basedir}/../../src/etc/site.jsl
#
# Declaration of the remote links to assign on javadoc generation.
# Link declarations can be overriden in the user's build.properties
# file.
#
excalibur.thread.link = http://avalon.apache.org/excalibur/thread/api/
excalibur.event.link = http://avalon.apache.org/excalibur/event/api/
maven.javadoc.links = ${sun.j2se.link},${avalon.framework.link},${excalibur.thread.link},${excalibur.event.link}
1.1 avalon-cornerstone/threads/threads-api/project.xml
Index: project.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<project>
<extend>${basedir}/../project.xml</extend>
<groupId>cornerstone</groupId>
<id>cornerstone-threads-api</id>
<name>Cornerstone Threads API</name>
<currentVersion>1.0</currentVersion>
<package>org.apache.avalon.cornerstone.services.threads</package>
<inceptionYear>2001</inceptionYear>
<shortDescription>Cornerstone Threads API</shortDescription>
<dependencies>
<!-- excalibur dependencies -->
<dependency>
<groupId>excalibur</groupId>
<artifactId>excalibur-thread</artifactId>
<version>1.1.1</version>
</dependency>
</dependencies>
</project>
1.1 avalon-cornerstone/threads/threads-api/src/java/org/apache/avalon/cornerstone/services/threads/ThreadManager.java
Index: ThreadManager.java
===================================================================
/*
============================================================================
The Apache Software License, Version 1.1
============================================================================
Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. The end-user documentation included with the redistribution, if any, must
include the following acknowledgment: "This product includes software
developed by the Apache Software Foundation (http://www.apache.org/)."
Alternately, this acknowledgment may appear in the software itself, if
and wherever such third-party acknowledgments normally appear.
4. The names "Jakarta", "Apache Avalon", "Avalon Cornerstone", "Avalon
Framework" and "Apache Software Foundation" must not be used to endorse
or promote products derived from this software without prior written
permission. For written permission, please contact apache@apache.org.
5. Products derived from this software may not be called "Apache", nor may
"Apache" appear in their name, without prior written permission of the
Apache Software Foundation.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This software consists of voluntary contributions made by many individuals
on behalf of the Apache Software Foundation. For more information on the
Apache Software Foundation, please see <http://www.apache.org/>.
*/
package org.apache.avalon.cornerstone.services.threads;
import org.apache.avalon.excalibur.thread.ThreadPool;
/**
* Manage a set of ThreadPools.
*
* @author <a href="mailto:peter at apache.org">Peter Donald</a>
* @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a>
* @version $Revision: 1.1 $ $Date: 2003/05/04 12:19:50 $
*/
public interface ThreadManager
{
String ROLE = ThreadManager.class.getName();
/**
* Retrieve a thread pool by name.
*
* @param name the name of thread pool
* @return the threadpool
* @exception IllegalArgumentException if the name of thread pool is
* invalid or named pool does not exist
*/
ThreadPool getThreadPool( String name )
throws IllegalArgumentException;
/**
* Retrieve the default thread pool.
*
* @return the thread pool
*/
ThreadPool getDefaultThreadPool();
}
1.1 avalon-cornerstone/threads/threads-api/src/java/org/apache/avalon/cornerstone/services/threads/package.html
Index: package.html
===================================================================
<body>
Defintion of the thread pool service.
</body>
1.1 avalon-cornerstone/threads/threads-impl/.cvsignore
Index: .cvsignore
===================================================================
maven.log
velocity.log
build.properties
target
maven.log
1.1 avalon-cornerstone/threads/threads-impl/maven.xml
Index: maven.xml
===================================================================
<project default="jar:jar" xmlns:maven="jelly:maven" xmlns:j="jelly:core" xmlns:util="jelly:util" xmlns:ant="jelly:ant">
<!--
Postgoal invoked by suprojects that causes the replication of
content into the threads project target classes directory, enabling
the creation of a composite jar file.
-->
<postGoal name="jar:jar">
<unzip src="${maven.build.dir}/${maven.final.name}.jar"
dest="../target/classes"/>
</postGoal>
</project>
1.1 avalon-cornerstone/threads/threads-impl/project.properties
Index: project.properties
===================================================================
#
# Declaration of the remote links to assign on javadoc generation.
# Link declarations can be overriden in the user's build.properties
# file.
#
excalibur.thread.link = http://avalon.apache.org/excalibur/thread/api/
excalibur.event.link = http://avalon.apache.org/excalibur/event/api/
maven.javadoc.links = ${sun.j2se.link},${avalon.framework.link},${excalibur.thread.link},${excalibur.event.link}
1.1 avalon-cornerstone/threads/threads-impl/project.xml
Index: project.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<project>
<extend>${basedir}/../project.xml</extend>
<groupId>cornerstone</groupId>
<id>cornerstone-threads-impl</id>
<name>Cornerstone Thread Manager Implementation</name>
<currentVersion>1.0</currentVersion>
<package>org.apache.avalon.cornerstone.threads</package>
<inceptionYear>2001</inceptionYear>
<shortDescription>Cornerstone Threads</shortDescription>
<dependencies>
<!-- cornerstone api dependencies -->
<dependency>
<groupId>cornerstone</groupId>
<artifactId>cornerstone-threads-api</artifactId>
<version>1.0</version>
</dependency>
<!-- avalon dependencies -->
<dependency>
<groupId>avalon</groupId>
<artifactId>avalon-framework</artifactId>
<version>4.1.4</version>
</dependency>
<!-- excalibur dependencies -->
<dependency>
<groupId>excalibur</groupId>
<artifactId>excalibur-thread</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>excalibur</groupId>
<artifactId>excalibur-event</artifactId>
<version>2.0</version>
</dependency>
<!-- pre JDK 1.4 dependencies -->
<dependency>
<id>xml-apis</id>
<version>1.0.b2</version>
<url>http://xml.apache.org/xerces2-j/</url>
</dependency>
<dependency>
<id>xerces</id>
<version>2.2.1</version>
<url>http://xml.apache.org/xerces2-j/</url>
</dependency>
</dependencies>
</project>
1.1 avalon-cornerstone/threads/threads-impl/src/conf/BLOCK-INF/block.xml
Index: block.xml
===================================================================
<!--
Thread Block deployment directive.
-->
<block>
<info>
<name>threads</name>
</info>
<services>
<service type="org.apache.avalon.cornerstone.services.threads.ThreadManager">
<source>manager</source>
</service>
</services>
<implementation>
<categories priority="INFO"/>
<engine>
<classpath>
<repository>
<resource id="excalibur:excalibur-thread" version="1.1.1"/>
<resource id="excalibur:excalibur-event" version="2.0"/>
<resource id="cornerstone:cornerstone-threads-api" version="1.0"/>
</repository>
</classpath>
</engine>
<component name="manager"
class="org.apache.avalon.cornerstone.blocks.threads.DefaultThreadManager"
activation="true">
<configuration>
<thread-group>
<name>default</name>
<priority>5</priority>
<is-daemon>false</is-daemon>
<max-threads>100</max-threads>
<min-threads>20</min-threads>
<min-spare-threads>20</min-spare-threads>
</thread-group>
</configuration>
</component>
</implementation>
</block>
1.1 avalon-cornerstone/threads/threads-impl/src/java/org/apache/avalon/cornerstone/blocks/threads/DefaultThreadManager-schema.xml
Index: DefaultThreadManager-schema.xml
===================================================================
<?xml version="1.0"?>
<element
name="root"
xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
xmlns:a="http://jakarta.apache.org/phoenix/schema-annotations/1.0"
>
<oneOrMore>
<element name="thread-group">
<interleave>
<element name="name"><text/></element>
<element name="priority"><data type="integer"/></element>
<element name="is-daemon"><data type="boolean"/></element>
<element name="min-threads"><data type="integer"/></element>
<element name="max-threads"><data type="integer"/></element>
<element name="min-spare-threads"><data type="integer"/></element>
</interleave>
</element>
</oneOrMore>
</element>
1.1 avalon-cornerstone/threads/threads-impl/src/java/org/apache/avalon/cornerstone/blocks/threads/DefaultThreadManager.java
Index: DefaultThreadManager.java
===================================================================
/*
============================================================================
The Apache Software License, Version 1.1
============================================================================
Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. The end-user documentation included with the redistribution, if any, must
include the following acknowledgment: "This product includes software
developed by the Apache Software Foundation (http://www.apache.org/)."
Alternately, this acknowledgment may appear in the software itself, if
and wherever such third-party acknowledgments normally appear.
4. The names "Jakarta", "Apache Avalon", "Avalon Cornerstone", "Avalon
Framework" and "Apache Software Foundation" must not be used to endorse
or promote products derived from this software without prior written
permission. For written permission, please contact apache@apache.org.
5. Products derived from this software may not be called "Apache", nor may
"Apache" appear in their name, without prior written permission of the
Apache Software Foundation.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This software consists of voluntary contributions made by many individuals
on behalf of the Apache Software Foundation. For more information on the
Apache Software Foundation, please see <http://www.apache.org/>.
*/
package org.apache.avalon.cornerstone.blocks.threads;
import java.util.HashMap;
import org.apache.avalon.cornerstone.services.threads.ThreadManager;
import org.apache.avalon.excalibur.thread.ThreadPool;
import org.apache.avalon.excalibur.thread.impl.DefaultThreadPool;
import org.apache.avalon.framework.configuration.Configurable;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.ConfigurationException;
import org.apache.avalon.framework.logger.AbstractLogEnabled;
/**
* Default implementation of ThreadManager.
*
* @author <a href="mailto:peter at apache.org">Peter Donald</a>
* @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a>
* @version $Revision: 1.1 $ $Date: 2003/05/04 12:19:50 $
*/
public class DefaultThreadManager
extends AbstractLogEnabled
implements ThreadManager, Configurable
{
///Map of thread pools for application
private HashMap m_threadPools = new HashMap();
/**
* Setup thread pools based on configuration data.
*
* @param configuration the configuration data
* @exception ConfigurationException if an error occurs
*/
public void configure( final Configuration configuration )
throws ConfigurationException
{
final Configuration[] groups = configuration.getChildren( "thread-group" );
for( int i = 0; i < groups.length; i++ )
{
configureThreadPool( groups[ i ] );
}
}
private void configureThreadPool( final Configuration configuration )
throws ConfigurationException
{
final String name = configuration.getChild( "name" ).getValue();
if( getLogger().isDebugEnabled() )
{
final String message = "Configuring thread pool: " + name;
getLogger().debug( message );
}
// NEVER USED!!
//final int priority = configuration.getChild( "priority" ).getValueAsInteger( 5 );
final boolean isDaemon = configuration.getChild( "is-daemon" ).getValueAsBoolean( false );
final int minThreads = configuration.getChild( "min-threads" ).getValueAsInteger( 5 );
final int maxThreads = configuration.getChild( "max-threads" ).getValueAsInteger( 10 );
// NEVER USED!!
//final int minSpareThreads = configuration.getChild( "min-spare-threads" ).
// getValueAsInteger( maxThreads - minThreads );
try
{
final DefaultThreadPool threadPool =
new DefaultThreadPool( name, minThreads, maxThreads );
threadPool.setDaemon( isDaemon );
threadPool.enableLogging( getLogger() );
m_threadPools.put( name, threadPool );
}
catch( final Exception e )
{
final String message = "Error creating ThreadPool named " + name;
throw new ConfigurationException( message, e );
}
}
/**
* Retrieve a thread pool by name.
*
* @param name the name of thread pool
* @return the threadpool
* @exception IllegalArgumentException if the name of thread pool is
* invalid or named pool does not exist
*/
public ThreadPool getThreadPool( final String name )
throws IllegalArgumentException
{
final ThreadPool threadPool = (ThreadPool)m_threadPools.get( name );
if( null == threadPool )
{
final String message = "Unable to locate ThreadPool named " + name;
throw new IllegalArgumentException( message );
}
return threadPool;
}
/**
* Retrieve the default thread pool.
*
* @return the thread pool
*/
public ThreadPool getDefaultThreadPool()
{
return getThreadPool( "default" );
}
}
1.1 avalon-cornerstone/threads/threads-impl/src/java/org/apache/avalon/cornerstone/blocks/threads/DefaultThreadManager.xinfo
Index: DefaultThreadManager.xinfo
===================================================================
<?xml version="1.0"?>
<!DOCTYPE blockinfo PUBLIC "-//PHOENIX/Block Info DTD Version 1.0//EN"
"http://jakarta.apache.org/avalon/dtds/phoenix/blockinfo_1_0.dtd">
<blockinfo>
<block>
<version>1.0</version>
<schema-type>http://relaxng.org/ns/structure/1.0</schema-type>
</block>
<services>
<service name="org.apache.avalon.cornerstone.services.threads.ThreadManager"/>
</services>
</blockinfo>
1.1 avalon-cornerstone/threads/threads-impl/src/java/org/apache/avalon/cornerstone/blocks/threads/package.html
Index: package.html
===================================================================
<body>
Default implementation of a thread pool manager.
</body>
---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org