hammant 2002/10/27 06:57:04
Modified: demo build.xml
demo/src/xdocs demo-helloworld.xml demo-soaphelloworld.xml
index.xml menu.xml
Added: demo/src/xdocs demo-altrmi-helloworld.xml demo-lifecycle.xml
Log:
Better worlds. Dist being readied.
Revision Changes Path
1.68 +18 -24 jakarta-avalon-apps/demo/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-avalon-apps/demo/build.xml,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -r1.67 -r1.68
--- build.xml 27 Oct 2002 11:41:03 -0000 1.67
+++ build.xml 27 Oct 2002 14:57:03 -0000 1.68
@@ -48,7 +48,7 @@
<include name="**/*.jar" />
</fileset>
<fileset dir="lib">
- <include name="*.jar" />
+ <include name="readme.txt" />
</fileset>
</path>
@@ -140,7 +140,6 @@
</fileset>
<blockinfo/>
<mxinfo/>
- <manifest manifestFile="helloworld-demo.mf" />
</phoenix-blocks>
<phoenix-blocks
@@ -151,7 +150,6 @@
</fileset>
<blockinfo/>
<mxinfo/>
- <manifest manifestFile="soaphelloworld-demo.mf" />
</phoenix-blocks>
<phoenix-blocks
@@ -162,7 +160,6 @@
</fileset>
<blockinfo/>
<mxinfo/>
- <manifest manifestFile="rmihelloworld-demo.mf" />
</phoenix-blocks>
<phoenix-blocks
@@ -173,7 +170,6 @@
</fileset>
<blockinfo/>
<mxinfo/>
- <manifest manifestFile="altrmihelloworld-demo.mf" />
</phoenix-blocks>
<phoenix-blocks
@@ -184,7 +180,6 @@
</fileset>
<blockinfo/>
<mxinfo/>
- <manifest manifestFile="lifecycle-demo.mf" />
</phoenix-blocks>
@@ -196,7 +191,7 @@
<mkdir dir="${build.lib}"/>
<jar jarfile="${build.lib}/demo-helloworld.jar"
- basedir="${build.classes}" manifest="${build.xdoclet}/helloworld-demo.mf">
+ basedir="${build.classes}">
<include name="org/apache/avalon/apps/demos/helloworldserver/*"/>
<fileset dir="${build.xdoclet}">
@@ -206,8 +201,7 @@
</jar>
<jar jarfile="${build.lib}/demo-soaphelloworld.jar"
- basedir="${build.classes}"
- manifest="${build.xdoclet}/soaphelloworld-demo.mf">
+ basedir="${build.classes}">
<include name="org/apache/avalon/apps/demos/soaphelloworldserver/*"/>
<fileset dir="${build.xdoclet}">
<include name="org/apache/avalon/apps/demos/soaphelloworldserver/*.xinfo"/>
@@ -216,8 +210,7 @@
</jar>
<jar jarfile="${build.lib}/demo-rmihelloworld.jar"
- basedir="${build.classes}"
- manifest="${build.xdoclet}/rmihelloworld-demo.mf">
+ basedir="${build.classes}">
<include name="org/apache/avalon/apps/demos/rmihelloworldserver/*"/>
<fileset dir="${build.xdoclet}">
<include name="org/apache/avalon/apps/demos/rmihelloworldserver/*.xinfo"/>
@@ -226,8 +219,7 @@
</jar>
- <jar jarfile="${build.lib}/demo-altrmihelloworld.jar"
- manifest="${build.xdoclet}/altrmihelloworld-demo.mf">
+ <jar jarfile="${build.lib}/demo-altrmihelloworld.jar">
<fileset dir="${build.classes}">
<include name="org/apache/avalon/apps/demos/altrmihelloworldserver/*"/>
</fileset>
@@ -245,7 +237,7 @@
</jar>
<jar jarfile="${build.lib}/demo-lifecycle.jar"
- basedir="${build.classes}" manifest="${build.xdoclet}/lifecycle-demo.mf">
+ basedir="${build.classes}">
<include name="org/apache/avalon/apps/demos/lifecycledemo/*"/>
<fileset dir="${build.xdoclet}">
@@ -264,7 +256,7 @@
<include name="**"/>
</fileset>
<fileset dir="build/temp">
- <include name="org/apache/commons/**"/>
+ <include name="org/apache/excalibur/altrmi/**"/>
</fileset>
<fileset dir="build/classes">
<include
name="org/apache/avalon/apps/demos/altrmihelloworldserver/AltrmiHelloWorldServer.class"/>
@@ -281,7 +273,17 @@
<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, demo-sar, soapdemo-sar, rmidemo-sar,
altrmidemo-sar, lifecycledemo-sar" description="Create SARs"/>
+ <target name="sars" depends="jars, demo-sar, soapdemo-sar, rmidemo-sar,
altrmidemo-sar, lifecycledemo-sar" description="Create SARs">
+
+ <mkdir dir="dist"/>
+
+ <copy todir="dist">
+ <fileset dir="${build.lib}">
+ <include name="*.sar"/>
+ </fileset>
+ </copy>
+
+ </target>
<target name="demo-sar" depends="jars" description="Create the demo SAR">
@@ -299,14 +301,6 @@
</lib>
</sar>
-
- <mkdir dir="dist"/>
-
- <copy todir="dist">
- <fileset dir="${build.lib}">
- <include name="*.sar"/>
- </fileset>
- </copy>
</target>
1.7 +8 -26 jakarta-avalon-apps/demo/src/xdocs/demo-helloworld.xml
Index: demo-helloworld.xml
===================================================================
RCS file: /home/cvs/jakarta-avalon-apps/demo/src/xdocs/demo-helloworld.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- demo-helloworld.xml 9 Mar 2002 15:21:27 -0000 1.6
+++ demo-helloworld.xml 27 Oct 2002 14:57:04 -0000 1.7
@@ -4,7 +4,7 @@
<document>
<header>
- <title>Avalon Applications / Demo</title>
+ <title>Avalon Applications / HelloWorld Demo</title>
<subtitle>The 'Hello World' Example Application</subtitle>
<authors>
<person name="Paul Hammant" email="[EMAIL PROTECTED]"/>
@@ -21,22 +21,21 @@
The following shows how the HelloWorld demo block depends on
ConnectionManager from cornerstone. These
two blocks packaged as a server application (.SAR file) are loaded and
launched by Phoenix, itself sitting on top of Avalon's framework.
</p>
-<!-- <figure src="images/helloworld.gif" alt="Layer diag"/> -->
</s1>
<s1 title="Relevant source modules">
<p>
- The HelloWorld demo compiles as part of the build process for cornerstone.
The important modules that contribute to the demo are listed here. All are within the
src directory
+ The HelloWorld demo compiles as part of the build process for avalon-apps
demo. The important modules that contribute to the demo are listed here. All are
within the src directory
</p>
<ol>
<li>
<strong>org.apache.avalon.apps.demos.helloworldserver package</strong>
This package contains the Java source for 'Hello World' and the xinfo block descriptor.
</li>
<li>
- <strong>manifest/helloworld-demo.mf</strong> This contains a manifest for
use in the bar file that details what's inside the block archive 'demo-helloworld.bar'
+ <strong>conf\avalon-demo-assembly.xml</strong> This contains the assembly
instructions for the resulting server archive (sar) file.
</li>
<li>
- <strong>conf\avalon-demo-assembly.xml</strong> This contains the assembly
configuration for the resulting server archive (sar) file.
- </li>
+ <strong>conf\avalon-demo-config.xml</strong> This contains the
configuration for the resulting server archive (sar) file.
+ </li>
</ol>
</s1>
<s1 title="Java Source">
@@ -55,23 +54,6 @@
This like all impls implements an interface. Which interface is rather
obvious in this case. It's a standard pattern that uses other blocks (SocketManager
and ConnectionManager) to do the hard work of listening on a port, pooling threads and
connections and organizing socket invokations in a queue and multi app friendly way.
</p>
</s2>
- <s2 title="HelloWorldServerImpl.xinfo">
- <p>
- This is obviously associated with the impl. It expresses that impls
needs in respect of other blocks in a way that Avalon can readily use for rapid
deployment.
- </p>
- </s2>
- </s1>
- <s1 title="helloworld-demo.mf">
- <p>
- The file is renamed as part of the build process to MANIFEST.MF and placed
in the ususal directory (META-INF). It's used to allow Avalon to quickly index the
contents of blocks.
- </p>
-<source>
-Manifest-Version: 1.0
-Created-By: Apache Avalon Project
-
-Name: org/apache/apps/demos/helloworldserver/HelloWorldServerImpl.class
-Avalon-Block: true
-</source>
</s1>
<s1 title="avalon-demo-assembly xml">
<p>
@@ -91,7 +73,7 @@
Of the block element, listed attributes are the instatiatable class
implementing the HelloWorld interface (not mentioned itself in this assembly xml), the
display name of the block, and two services that HelloWorld needs.
</p>
</s1>
- <s1 title="avalon-demo-config xml">
+ <s1 title="avalon-altrmidemo-config xml">
<p>
The file is renamed as part of the build process to config.xml, and only has
a separate name here to aid development. Again here is the pertinent section:
</p>
@@ -110,7 +92,7 @@
The configuration element named <helloworldserver> is used as it's
name suggests and is passed the blocks being used for the app. Elements port and bind
are used by the socket manager.
</p>
<p>
- If you had configuration for an app, you'd specify it here in with eelement
and attribute names that are invented for the application.
+ If you had configuration for an app, you'd specify it here in with element
and attribute names that are invented for the application.
</p>
</s1>
<s1 title="Starting your own server project">
1.7 +2 -23 jakarta-avalon-apps/demo/src/xdocs/demo-soaphelloworld.xml
Index: demo-soaphelloworld.xml
===================================================================
RCS file: /home/cvs/jakarta-avalon-apps/demo/src/xdocs/demo-soaphelloworld.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- demo-soaphelloworld.xml 9 Mar 2002 15:21:27 -0000 1.6
+++ demo-soaphelloworld.xml 27 Oct 2002 14:57:04 -0000 1.7
@@ -4,7 +4,7 @@
<document>
<header>
- <title>Avalon Applications / Demo</title>
+ <title>Avalon Applications / SOAP Demo</title>
<subtitle>The 'Hello World' Example Application</subtitle>
<authors>
<person name="Paul Hammant" email="[EMAIL PROTECTED]"/>
@@ -20,7 +20,6 @@
<p>
The following shows the HelloWorld demo block depending on
ConnectionManager from cornerstone. It also shows the Soapification service (Glue STD
implementation) and the SOAPHelloWorld block depending on it and the HelloWorld block.
All these blocks are placed together on in one sar file as a server application.
</p>
-<!-- <figure src="images/soaphelloworld.gif" alt="Layer diag"/> -->
</s1>
<s1 title="Relevant source modules">
<p>
@@ -31,9 +30,6 @@
<strong>org.apache.avalon.apps.demos.soaphelloworldserver
package</strong> This package contains the Java source for 'SOAP Hello World' and the
xinfo block descriptor.
</li>
<li>
- <strong>manifest/soaphelloworld-demo.mf</strong> This contains a manifest
for use in the bar file that details what's inside the block archive
'demo-soaphelloworld.bar'
- </li>
- <li>
<strong>conf\avalon-soapdemo-assembly.xml</strong> This contains the
assembly configuration for the resulting server archive (sar) file.
</li>
</ol>
@@ -54,28 +50,11 @@
This, like all impls, implements a service interface. Quite simply it
gets its dependancies, SOAP (Glue) and HelloWorld server, ties them toegether and then
launches publishes the HelloWorld interface (via Glue).
</p>
</s2>
- <s2 title="SOAPHelloWorldServerImpl.xinfo">
- <p>
- This is obviously associated with the impl. It expresses that impls
needs in respect of other blocks in a way that Avalon can readily use for rapid
deployment.
- </p>
- </s2>
<s2 title="SOAPHelloWorldServerTester.java">
<p>
This class illustrates the SOAP served WDSL page in use. It uses Glue
again to bind to the service and invoke the setGreeting(String) method passing in
"Howdie Partner" as the greeting. We're using Glue here, but any SOAP compliant
language could be used invoke methods in the published WSDL definition.
</p>
</s2>
- </s1>
- <s1 title="soaphelloworld-demo.mf">
- <p>
- The file is renamed as part of the build process to MANIFEST.MF and placed
in the ususal directory (META-INF). It's used to allow Avalon to quickly index the
contents of blocks.
- </p>
-<source>
-Manifest-Version: 1.0
-Created-By: Apache Avalon Project
-
-Name: org/apache/apps/demos/soaphelloworldserver/SOAPHelloWorldServerImpl.class
-Avalon-Block: true
-</source>
</s1>
<s1 title="avalon-soapdemo-assembly xml">
<p>
1.4 +3 -3 jakarta-avalon-apps/demo/src/xdocs/index.xml
Index: index.xml
===================================================================
RCS file: /home/cvs/jakarta-avalon-apps/demo/src/xdocs/index.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- index.xml 9 Mar 2002 15:21:27 -0000 1.3
+++ index.xml 27 Oct 2002 14:57:04 -0000 1.4
@@ -4,7 +4,7 @@
<document>
<header>
- <title>Avalon Applications / Demo</title>
+ <title>Avalon Applications / Demo Overview</title>
<subtitle>Introduction</subtitle>
<authors>
<person name="Avalon Documentation Team"
email="[EMAIL PROTECTED]"/>
@@ -13,7 +13,7 @@
<body>
<s1 title="Introduction">
<p>
- Demos are a few very simple blocks for phoenix.
+ Demos are a few very simple demos for Phoenix. See the left margin of this
page.
</p>
</s1>
</body>
1.2 +2 -0 jakarta-avalon-apps/demo/src/xdocs/menu.xml
Index: menu.xml
===================================================================
RCS file: /home/cvs/jakarta-avalon-apps/demo/src/xdocs/menu.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- menu.xml 26 Jul 2002 14:26:56 -0000 1.1
+++ menu.xml 27 Oct 2002 14:57:04 -0000 1.2
@@ -14,6 +14,8 @@
<menu label="Demo Components">
<item name="Hello World" href="demo-helloworld.html"/>
+ <item name="Lifecycle Demo" href="demo-lifecycle.html"/>
+ <item name="AltRMI Hello World" href="demo-altrmi-helloworld.html"/>
<item name="SOAP Hello World" href="demo-soaphelloworld.html"/>
</menu>
1.1 jakarta-avalon-apps/demo/src/xdocs/demo-altrmi-helloworld.xml
Index: demo-altrmi-helloworld.xml
===================================================================
<?xml version="1.0"?>
<!DOCTYPE document SYSTEM "dtd/document-v10.dtd">
<document>
<header>
<title>Avalon Applications / AltRMI HelloWorld Demo</title>
<subtitle>The 'Hello World' Example Application</subtitle>
<authors>
<person name="Paul Hammant" email="[EMAIL PROTECTED]"/>
</authors>
</header>
<body>
<s1 title="Introduction">
<p>
This demo reuses the Helloworld component, and retrofits remote capability.
It does this with the autopublisher tool from the Cornerstone project.
</p>
</s1>
<s1 title="Autopublishing">
<p>
The following shows how the HelloWorld demo block depends on
ConnectionManager from cornerstone. These
two blocks packaged as a server application (.SAR file) are loaded and
launched by Phoenix, itself sitting on top of Avalon's framework.
</p>
</s1>
<s1 title="Relevant source modules">
<p>
The HelloWorld demo compiles as part of the build process for cornerstone.
The important modules that contribute to the demo are listed here. All are within the
src directory
</p>
<ol>
<li>
<strong>org.apache.avalon.apps.demos.altrmihelloworldserver
package</strong> This package contains the Java source the testing block.
</li>
<li>
<strong>conf\avalon-altrmidemo-assembly.xml</strong> This contains the
assembly instructions for the resulting server archive (sar) file.
</li>
<li>
<strong>conf\avalon-altrmidemo-config.xml</strong> This contains the
configuration for the resulting server archive (sar) file.
</li>
</ol>
</s1>
<s1 title="Java Source">
<s2 title="AltrmiHelloWorldServerTester.java">
<p>
This forms part of an executable jar that allows you to remotely change
the HelloWorld demo block.
</p>
</s2>
</s1>
<s1 title="avalon-altrmidemo-assembly xml">
<p>
The file is renamed as part of the build process to assembly.xml, and only has
a separate name here to aid development. The bulk of the contents of the file pertain
to other blocks including the HelloWorld one. Here's the section that's for
autopublishing
</p>
<source>
(text snipped)
<listener
class="org.apache.avalon.cornerstone.blocks.transport.autopublishing.AutoPublisher"
name="altrmification-listener"/>
<block
class="org.apache.avalon.cornerstone.blocks.transport.authentication.DefaultAuthenticator"
name="altrmi-authenticator" >
</block>
<block
class="org.apache.avalon.cornerstone.blocks.transport.publishing.SocketStreamPublisher"
name="altrmi-publisher" >
<provide name="sockets"
role="org.apache.avalon.cornerstone.services.sockets.SocketManager"/>
<provide name="connections"
role="org.apache.avalon.cornerstone.services.connection.ConnectionManager"
/>
<provide name="altrmi-authenticator"
role="org.apache.excalibur.altrmi.server.AltrmiAuthenticator"/>
</block>
(text snipped)
</source>
<p>
Autopublisher needs an authenicator (the default), and a publisher
(SocketStreamPublisher).
</p>
</s1>
<s1 title="avalon-demo-config xml">
<p>
The file is renamed as part of the build process to config.xml, and only has a
separate name here to aid development. Again here is the pertinent section:
</p>
<source>
(text snipped)
<altrmi-publisher>
<port>8666</port>
<bind>127.0.0.1</bind>
<socketObjectStreamHandler>
<connectiontimeout>360000</connectiontimeout>
</socketObjectStreamHandler>
<classRetrieverType>jarFile</classRetrieverType>
<socketStreamServerClass>org.apache.excalibur.altrmi.server.impl.socket.PartialSocketObjectStreamServer</socketStreamServerClass>
<gerneratedClassJarURLs>./HelloWorldAltrmiProxy.jar</gerneratedClassJarURLs>
</altrmi-publisher>
<altrmi-authenticator>
</altrmi-authenticator>
<altrmification-listener>
<publisher>altrmi-publisher</publisher>
<publish block="helloworldserver"
interfaceToPublish="org.apache.avalon.apps.demos.helloworldserver.HelloWorldServer"
publishAsName="helloworld"/>
</altrmification-listener>
(text snipped)
</source>
<p>
The autopublisher and publisher onfiguration are here.
</p>
</s1>
</body>
<footer>
<legal>
Copyright (c) @year@ The Jakarta Apache Project All rights reserved.
$Revision: 1.1 $ $Date: 2002/10/27 14:57:04 $
</legal>
</footer>
</document>
1.1 jakarta-avalon-apps/demo/src/xdocs/demo-lifecycle.xml
Index: demo-lifecycle.xml
===================================================================
<?xml version="1.0"?>
<!DOCTYPE document SYSTEM "dtd/document-v10.dtd">
<document>
<header>
<title>Avalon Applications / Lifecycle Demo</title>
<subtitle>The 'Lifecycle' Demo Application</subtitle>
<authors>
<person name="Paul Hammant" email="[EMAIL PROTECTED]"/>
</authors>
</header>
<body>
<s1 title="Introduction">
<p>
The lifecycle demo shows only the calling of the lifecycle methods under
Phoenix control. This app has meaning when you consider the <link
href="http://jakarta.apache.org/avalon/framework/reference-the-lifecycle.html">lifecycle</link>
page.
</p>
<p>
Do not forget that the lifecycle methods are optional. You cann implement
all of them, as this demo does, some or none of them.
</p>
</s1>
<s1 title="Output">
<p>
This is the output that appears in the Console that Phoenix was called from:
</p>
<source>
Phoenix 4.0.1
LifecycleDemo1Impl.constructor() called. (You should never do too much in here)
LifecycleDemo1Impl.enableLogging() called.
LifecycleDemo1Impl.contextualize() called (things like base directory passed in
here).
LifecycleDemo1Impl.service() called (lookup on other services possible now).
LifecycleDemo1Impl.configure() called (configuration from config.xml passed here).
LifecycleDemo1Impl.initialize() called.
LifecycleDemo1Impl.start() called.
LifecycleDemo2Impl.constructor() called. (You should never do too much in here)
LifecycleDemo2Impl.enableLogging() called.
LifecycleDemo2Impl.contextualize() called (things like base directory passed in
here).
LifecycleDemo2Impl.service() called (lookup on other services possible now).
LifecycleDemo2Impl.service(), LifecycleDemo1 service looked up
LifecycleDemo2Impl.configure() called (configuration from config.xml passed here).
LifecycleDemo2Impl.initialize() called.
LifecycleDemo1Impl.myServiceMethod() called.
LifecycleDemo2Impl.initialize(), LifecycleDemo1.myServiceMethod() method called
result = 123
LifecycleDemo2Impl.start() called.
(Ctrl-C pressed in console) JVM exiting abnormally. Shutting down Phoenix.
LifecycleDemo2Impl.stop() called.
LifecycleDemo2Impl.dispose() Called
LifecycleDemo1Impl.stop() called.
LifecycleDemo1Impl.dispose() Called </source>
</s1>
</body>
<footer>
<legal>
Copyright (c) @year@ The Jakarta Apache Project All rights reserved.
$Revision: 1.1 $ $Date: 2002/10/27 14:57:04 $
</legal>
</footer>
</document>
--
To unsubscribe, e-mail: <mailto:avalon-cvs-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@;jakarta.apache.org>