Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2307 - in development/central: central tutorials/metro tutorials/metro/composition tutorials/metro/composition/application/impl/conf tutorials/metro/composition/location/impl/src/main/tutorial/location tutorials/metro/composition/publisher/api/src/main/tutorial/publisher tutorials/metro/composition/publisher/impl/src/main/tutorial/publisher tutorials/metro/configuration/block tutorials/metro/configuration/block/conf tutorials/metro/configuration/defaults tutorials/metro/configuration/defaults/conf tutorials/metro/configuration/defaults/src/main/tutorial tutorials/metro/configuration/injection tutorials/metro/configuration/injection/conf tutorials/metro/configuration/injection/src/main/tutorial tutorials/metro/configuration/override tutorials/metro/configuration/override/conf tutorials/metro/context/alias tutorials/metro/context/alias/conf tutorials/metro/context/custom tutorials/metro/context/custom/conf tutorials/metro/context/injection tutorials/metro/context/injection/conf tutorials/metro/context/injection/src/main/tutorial tutorials/metro/context/phased tutorials/metro/context/phased/conf tutorials/metro/context/phased/src/main/tutorial tutorials/metro/dependencies/auto tutorials/metro/dependencies/auto/conf tutorials/metro/dependencies/manual tutorials/metro/dependencies/manual/conf tutorials/metro/dynamics tutorials/metro/dynamics/conf tutorials/metro/dynamics/src/main/tutorial tutorials/metro/hello tutorials/metro/hello/conf tutorials/metro/main tutorials/metro/main/etc tutorials/metro/main/src/main/tutorial tutorials/metro/parameterization tutorials/metro/parameterization/conf tutorials/metro/parameterization/src/main/tutorial tutorials/metro/profiles/conf tutorials/metro/selection tutorials/metro/selection/conf tutorials/metro/selection/src/main/tutorial tutorials/metro/startable/conf tutorials/metro/startable/src/main/tutorial

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: niclas AT hedhman.org
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r2307 - in development/central: central tutorials/metro tutorials/metro/composition tutorials/metro/composition/application/impl/conf tutorials/metro/composition/location/impl/src/main/tutorial/location tutorials/metro/composition/publisher/api/src/main/tutorial/publisher tutorials/metro/composition/publisher/impl/src/main/tutorial/publisher tutorials/metro/configuration/block tutorials/metro/configuration/block/conf tutorials/metro/configuration/defaults tutorials/metro/configuration/defaults/conf tutorials/metro/configuration/defaults/src/main/tutorial tutorials/metro/configuration/injection tutorials/metro/configuration/injection/conf tutorials/metro/configuration/injection/src/main/tutorial tutorials/metro/configuration/override tutorials/metro/configuration/override/conf tutorials/metro/context/alias tutorials/metro/context/alias/conf tutorials/metro/context/custom tutorials/metro/context/custom/conf tutorials/metro/context/injection tutorials/metro/context/injection/conf tutorials/metro/context/injection/src/main/tutorial tutorials/metro/context/phased tutorials/metro/context/phased/conf tutorials/metro/context/phased/src/main/tutorial tutorials/metro/dependencies/auto tutorials/metro/dependencies/auto/conf tutorials/metro/dependencies/manual tutorials/metro/dependencies/manual/conf tutorials/metro/dynamics tutorials/metro/dynamics/conf tutorials/metro/dynamics/src/main/tutorial tutorials/metro/hello tutorials/metro/hello/conf tutorials/metro/main tutorials/metro/main/etc tutorials/metro/main/src/main/tutorial tutorials/metro/parameterization tutorials/metro/parameterization/conf tutorials/metro/parameterization/src/main/tutorial tutorials/metro/profiles/conf tutorials/metro/selection tutorials/metro/selection/conf tutorials/metro/selection/src/main/tutorial tutorials/metro/startable/conf tutorials/metro/startable/src/main/tutorial
  • Date: Mon, 18 Apr 2005 14:33:49 -0400

Author: niclas AT hedhman.org
Date: Mon Apr 18 14:33:48 2005
New Revision: 2307

Added:

development/central/tutorials/metro/composition/application/impl/conf/debug.xml
- copied unchanged from r2290,
development/central/tutorials/metro/composition/application/impl/conf/config.xml
development/central/tutorials/metro/configuration/block/conf/debug.xml
- copied, changed from r2290,
development/central/tutorials/metro/configuration/block/conf/categories.xml
development/central/tutorials/metro/configuration/defaults/conf/
development/central/tutorials/metro/configuration/defaults/conf/debug.xml
development/central/tutorials/metro/configuration/injection/conf/
development/central/tutorials/metro/configuration/injection/conf/debug.xml
development/central/tutorials/metro/configuration/override/conf/debug.xml
development/central/tutorials/metro/context/alias/conf/
development/central/tutorials/metro/context/alias/conf/debug.xml
development/central/tutorials/metro/context/custom/conf/
development/central/tutorials/metro/context/custom/conf/debug.xml
development/central/tutorials/metro/context/injection/conf/
development/central/tutorials/metro/context/injection/conf/debug.xml
development/central/tutorials/metro/context/phased/conf/
development/central/tutorials/metro/context/phased/conf/debug.xml
development/central/tutorials/metro/dependencies/auto/conf/
development/central/tutorials/metro/dependencies/auto/conf/debug.xml
development/central/tutorials/metro/dependencies/manual/conf/
development/central/tutorials/metro/dependencies/manual/conf/debug.xml
development/central/tutorials/metro/dynamics/conf/
development/central/tutorials/metro/dynamics/conf/debug.xml
development/central/tutorials/metro/hello/conf/debug.xml
development/central/tutorials/metro/parameterization/conf/
development/central/tutorials/metro/parameterization/conf/debug.xml
development/central/tutorials/metro/profiles/conf/
development/central/tutorials/metro/profiles/conf/debug.xml
development/central/tutorials/metro/selection/conf/
development/central/tutorials/metro/selection/conf/debug.xml
development/central/tutorials/metro/startable/conf/
development/central/tutorials/metro/startable/conf/debug.xml
Removed:
development/central/central/

development/central/tutorials/metro/composition/application/impl/conf/config.xml
development/central/tutorials/metro/configuration/block/conf/categories.xml
development/central/tutorials/metro/main/etc/
development/central/tutorials/metro/parameterization/README.txt
Modified:
development/central/tutorials/metro/README.TXT
development/central/tutorials/metro/composition/README.txt

development/central/tutorials/metro/composition/location/impl/src/main/tutorial/location/LocationComponent.java

development/central/tutorials/metro/composition/publisher/api/src/main/tutorial/publisher/PublisherService.java

development/central/tutorials/metro/composition/publisher/impl/src/main/tutorial/publisher/PublisherComponent.java
development/central/tutorials/metro/configuration/block/README.TXT
development/central/tutorials/metro/configuration/defaults/README.TXT

development/central/tutorials/metro/configuration/defaults/src/main/tutorial/HelloComponent.java
development/central/tutorials/metro/configuration/injection/README.TXT

development/central/tutorials/metro/configuration/injection/src/main/tutorial/HelloComponent.java
development/central/tutorials/metro/configuration/override/README.TXT
development/central/tutorials/metro/context/alias/README.TXT
development/central/tutorials/metro/context/custom/README.TXT
development/central/tutorials/metro/context/injection/README.TXT

development/central/tutorials/metro/context/injection/src/main/tutorial/HelloComponent.java
development/central/tutorials/metro/context/phased/README.TXT

development/central/tutorials/metro/context/phased/src/main/tutorial/HelloComponent.java
development/central/tutorials/metro/dependencies/auto/README.txt
development/central/tutorials/metro/dependencies/manual/README.txt
development/central/tutorials/metro/dynamics/README.txt

development/central/tutorials/metro/dynamics/src/main/tutorial/DefaultGizmo.java

development/central/tutorials/metro/dynamics/src/main/tutorial/DefaultWidget.java

development/central/tutorials/metro/dynamics/src/main/tutorial/HelloFacility.java
development/central/tutorials/metro/hello/README.txt
development/central/tutorials/metro/main/README.txt
development/central/tutorials/metro/main/build.xml
development/central/tutorials/metro/main/src/main/tutorial/Main.java
development/central/tutorials/metro/parameterization/build.xml

development/central/tutorials/metro/parameterization/src/main/tutorial/HelloComponent.java
development/central/tutorials/metro/selection/build.xml

development/central/tutorials/metro/selection/src/main/tutorial/HelloComponent.java

development/central/tutorials/metro/selection/src/main/tutorial/RandomGeneratorProvider.java

development/central/tutorials/metro/startable/src/main/tutorial/HelloComponent.java
Log:
touching up the tutorials some more. Remove merlin and avalon references.

Modified: development/central/tutorials/metro/README.TXT
==============================================================================
--- development/central/tutorials/metro/README.TXT (original)
+++ development/central/tutorials/metro/README.TXT Mon Apr 18 14:33:48
2005
@@ -1,9 +1,9 @@

-Merlin Tutorials
+Metro Tutorials
----------------

A set of buildable and executable projects that demonstrate
-different features of the Merlin platform.
+different features of the Metro platform.

* hello - a very simple single component
demloyment example
@@ -29,7 +29,7 @@

* lifecycle - lifecycle extension examples

- * main - merlin embedded in a main method
+ * main - Metro embedded in a main method

* parameterization - demonstration of the parameterizable
lifecycle stage
@@ -41,7 +41,7 @@
using the following command (assuming you have installed
Ant 1.6.1 or later and the Magic antlib):

- $ cd [a-tutorial-dir-containing-a-project.xml-file]
+ $ cd [a-tutorial-directory-in-the-above-list]
$ ant

Runtime execution can normally by simulation relative to the
@@ -49,19 +49,36 @@
file as shown in the following commands (check tutorial
readme.txt for additional details).

- $ cd [a-tutorial-containing-a-project.xml]
+ $ cd [a-directory-containing-the-main-project]

then:

- $ metro -execute target\classes
+ $ metro -execute target/classes

or:

- $ metro -execute target\deliverables\jars\<jar-name>.jar
+ $ metro -execute target/deliverables/jars/<jar-name>.jar
+
+The -execute parameter in the above command line simply tells
+Metro to deploy and decomission the component. If we didn't
+include the -execute option, then Metro would stay running
+until we forced termination using ^C.
+
+To get an idea of what is happening behing the scenes you can
+override the logging priorities using a configuration override
+argument.
+
+ $ metro -execute target/classes -config conf/debug.xml
+
+which contains the <categories> logging configuration for each
+component in respective demo.
+
+
+In addition, the -debug CLI parameter presents a
+summary of the resources pulling together to handle deployment:
+

Additional tutorials are in constant preparation.
Questions and comments should be directed to
support-dpml AT lists.ibiblio.org.

-
-

Modified: development/central/tutorials/metro/composition/README.txt
==============================================================================
--- development/central/tutorials/metro/composition/README.txt (original)
+++ development/central/tutorials/metro/composition/README.txt Mon Apr 18
14:33:48 2005
@@ -21,7 +21,7 @@
---------------------------------

$ ant
- $ metro -execute application\impl\target\deliverables\blocks\*.block
+ $ metro -execute application/impl/target/deliverables/blocks/*.block

[INFO ] (application.application): servicing application
[INFO ] (application.location.info): location: Paris
@@ -38,7 +38,7 @@
Use the following command to include container debug level log entries for
the
demanding developer.

- $ merlin -execute application\impl\target\deliverables\bars\*.* -config
application\impl\conf\config.xml
+ $ metro -execute application/impl/target/deliverables/bars/*.* -config
application/impl/conf/config.xml

Summary
-------

Modified:
development/central/tutorials/metro/composition/location/impl/src/main/tutorial/location/LocationComponent.java
==============================================================================
---
development/central/tutorials/metro/composition/location/impl/src/main/tutorial/location/LocationComponent.java
(original)
+++
development/central/tutorials/metro/composition/location/impl/src/main/tutorial/location/LocationComponent.java
Mon Apr 18 14:33:48 2005
@@ -28,10 +28,10 @@
*
* @metro.component version="1.0" name="location-provider"
* @metro.service type="tutorial.location.LocationService"
- * @author <a href="mailto:dev-dpml AT lists.ibiblio.org";>The Digital Product
Meta Library</a>
+ * @author <a href="http://www.dpml.net";>The Digital Product Meta Library</a>
*/
-public class LocationComponent extends AbstractLogEnabled implements
-Configurable, Disposable, LocationService
+public class LocationComponent extends AbstractLogEnabled
+ implements Configurable, Disposable, LocationService
{
private String m_location = "unknown";

@@ -43,8 +43,8 @@
* @param config the component configuration
* @exception ConfigurationException if a configuration error occurs
*/
- public void configure( Configuration config ) throws
- ConfigurationException
+ public void configure( Configuration config )
+ throws ConfigurationException
{
m_location = config.getChild( "source" ).getValue( "unknown" );
getLogger().info( "location: " + m_location );

Modified:
development/central/tutorials/metro/composition/publisher/api/src/main/tutorial/publisher/PublisherService.java
==============================================================================
---
development/central/tutorials/metro/composition/publisher/api/src/main/tutorial/publisher/PublisherService.java
(original)
+++
development/central/tutorials/metro/composition/publisher/api/src/main/tutorial/publisher/PublisherService.java
Mon Apr 18 14:33:48 2005
@@ -20,7 +20,7 @@
/**
* HelloComponent from Merlin's Tutorial
*
- * @author <a href="mailto:dev-dpml AT lists.ibiblio.org";>The Digital Product
Meta Library</a>
+ * @author <a href="http://www.dpml.net";>The Digital Product Meta Library</a>
*/
public interface PublisherService
{

Modified:
development/central/tutorials/metro/composition/publisher/impl/src/main/tutorial/publisher/PublisherComponent.java
==============================================================================
---
development/central/tutorials/metro/composition/publisher/impl/src/main/tutorial/publisher/PublisherComponent.java
(original)
+++
development/central/tutorials/metro/composition/publisher/impl/src/main/tutorial/publisher/PublisherComponent.java
Mon Apr 18 14:33:48 2005
@@ -26,9 +26,10 @@
*
* @metro.component version="1.0" name="publisher"
* @metro.service type="tutorial.publisher.PublisherService"
- * @author <a href="mailto:dev-dpml AT lists.ibiblio.org";>The Digital Product
Meta Library</a>
+ * @author <a href="http://www.dpml.net";>The Digital Product Meta Library</a>
*/
-public class PublisherComponent extends AbstractLogEnabled implements
PublisherService, Disposable
+public class PublisherComponent extends AbstractLogEnabled
+ implements PublisherService, Disposable
{
/**
* Supply of the logging channel by the container.

Modified: development/central/tutorials/metro/configuration/block/README.TXT
==============================================================================
--- development/central/tutorials/metro/configuration/block/README.TXT
(original)
+++ development/central/tutorials/metro/configuration/block/README.TXT Mon
Apr 18 14:33:48 2005
@@ -13,15 +13,15 @@
In the example the configuration is based on the directive included
under the <conponent> tag.

- $ metro target\classes -execute
+ $ metro target/classes -execute

Execute the demo again using an alternative configuration target.

- $ metro target\classes -execute - config conf/config.xml
+ $ metro target/classes -execute -config conf/config.xml

Note that the configuration source has changed based on the
target declared in config.xml. Just for fun you can also see how
you can use targets to modify logging priorities:

- $ metro target\classes -execute - config conf/categories.xml
+ $ metro target/classes -execute -config conf/categories.xml


Copied:
development/central/tutorials/metro/configuration/block/conf/debug.xml (from
r2290,
development/central/tutorials/metro/configuration/block/conf/categories.xml)
==============================================================================
---
development/central/tutorials/metro/configuration/block/conf/categories.xml
(original)
+++ development/central/tutorials/metro/configuration/block/conf/debug.xml
Mon Apr 18 14:33:48 2005
@@ -2,6 +2,9 @@
<targets>

<target path="/tutorial/hello">
+ <configuration>
+ <source>Custom configuration from target in debug.xml.</source>
+ </configuration>
<categories priority="DEBUG"/>
</target>


Modified:
development/central/tutorials/metro/configuration/defaults/README.TXT
==============================================================================
--- development/central/tutorials/metro/configuration/defaults/README.TXT
(original)
+++ development/central/tutorials/metro/configuration/defaults/README.TXT
Mon Apr 18 14:33:48 2005
@@ -1,15 +1,15 @@
-
-Configuration Management
-------------------------
-
-This tutorial covers default configuration using the <classname>.xconfig
resource.
-
-$ ant
-$ merlin target\classes -execute
-[INFO ] (tutorial.hello): configuration stage
-[INFO ] (tutorial.hello): initialization stage
-[INFO ] (tutorial.hello): source: packaged default
-
-In the above example the configuration source is resolved from a
-configuration default packaged with the class (see <classname>.xconfig).
-
+
+Configuration Management
+------------------------
+
+This tutorial covers default configuration using the <classname>.xconfig
resource.
+
+$ ant
+$ metro target/classes -execute
+[INFO ] (tutorial.hello): configuration stage
+[INFO ] (tutorial.hello): initialization stage
+[INFO ] (tutorial.hello): source: packaged default
+
+In the above example the configuration source is resolved from a
+configuration default packaged with the class (see <classname>.xconfig).
+

Added:
development/central/tutorials/metro/configuration/defaults/conf/debug.xml
==============================================================================
--- (empty file)
+++ development/central/tutorials/metro/configuration/defaults/conf/debug.xml
Mon Apr 18 14:33:48 2005
@@ -0,0 +1,5 @@
+<targets>
+ <target path="/tutorial" >
+ <categories priority="DEBUG"/>
+ </target>
+</targets>
\ No newline at end of file

Modified:
development/central/tutorials/metro/configuration/defaults/src/main/tutorial/HelloComponent.java
==============================================================================
---
development/central/tutorials/metro/configuration/defaults/src/main/tutorial/HelloComponent.java
(original)
+++
development/central/tutorials/metro/configuration/defaults/src/main/tutorial/HelloComponent.java
Mon Apr 18 14:33:48 2005
@@ -18,7 +18,9 @@
package tutorial;

import net.dpml.logging.AbstractLogEnabled;
+
import net.dpml.activity.Initializable;
+
import net.dpml.configuration.Configurable;
import net.dpml.configuration.Configuration;
import net.dpml.configuration.ConfigurationException;
@@ -29,7 +31,7 @@
* @metro.component version="1.0" name="simple" lifestyle="singleton"
*/
public class HelloComponent extends AbstractLogEnabled
- implements Configurable, Initializable
+ implements Configurable, Initializable
{
private String m_source = "undefined";

@@ -54,8 +56,7 @@
public void initialize() throws Exception
{
getLogger().info( "initialization stage" );
- final String message =
- "source: " + m_source;
+ final String message = "source: " + m_source;
getLogger().info( message );
}
}

Modified:
development/central/tutorials/metro/configuration/injection/README.TXT
==============================================================================
--- development/central/tutorials/metro/configuration/injection/README.TXT
(original)
+++ development/central/tutorials/metro/configuration/injection/README.TXT
Mon Apr 18 14:33:48 2005
@@ -1,15 +1,15 @@
-
-Configuration Management (constructor injection)
-------------------------------------------------
-
-This tutorial demonstrates the injection of a configuration
-via a component constructor.
-
-Build using:
-
+
+Configuration Management (constructor injection)
+------------------------------------------------
+
+This tutorial demonstrates the injection of a configuration
+via a component constructor.
+
+Build using:
+
$ ant

Execute using:
-
- $ merlin target\classes -execute
-
+
+ $ metro target/classes -execute
+

Added:
development/central/tutorials/metro/configuration/injection/conf/debug.xml
==============================================================================
--- (empty file)
+++
development/central/tutorials/metro/configuration/injection/conf/debug.xml
Mon Apr 18 14:33:48 2005
@@ -0,0 +1,5 @@
+<targets>
+ <target path="/tutorial" >
+ <categories priority="DEBUG"/>
+ </target>
+</targets>
\ No newline at end of file

Modified:
development/central/tutorials/metro/configuration/injection/src/main/tutorial/HelloComponent.java
==============================================================================
---
development/central/tutorials/metro/configuration/injection/src/main/tutorial/HelloComponent.java
(original)
+++
development/central/tutorials/metro/configuration/injection/src/main/tutorial/HelloComponent.java
Mon Apr 18 14:33:48 2005
@@ -36,14 +36,13 @@
* @param config the component configuration
* @exception ConfigurationException if a configuration error occurs
*/
- public HelloComponent(
- final Logger logger, final Configuration config )
- throws ConfigurationException
+ public HelloComponent( Logger logger, Configuration config )
+ throws ConfigurationException
{
logger.info( "instantiation" );
- final String source =
- config.getChild( "source" ).getValue( "unknown" );
- final String message = "source: " + source;
+ Configuration child = config.getChild( "source" );
+ String source = child.getValue( "unknown" );
+ String message = "source: " + source;
logger.info( message );
}
}

Modified:
development/central/tutorials/metro/configuration/override/README.TXT
==============================================================================
--- development/central/tutorials/metro/configuration/override/README.TXT
(original)
+++ development/central/tutorials/metro/configuration/override/README.TXT
Mon Apr 18 14:33:48 2005
@@ -6,7 +6,7 @@
target that overrides block or packaged configuration directives.

$ ant
-$ metro target\deliverables\blocks\*.blocki -execute -config conf\config.xml
+$ metro target/deliverables/blocks/*.blocki -execute -config conf/config.xml

[INFO ] (tutorial.hello): instantiation
[INFO ] (tutorial.hello): source: Custom configuration target.
\ No newline at end of file

Added:
development/central/tutorials/metro/configuration/override/conf/debug.xml
==============================================================================
--- (empty file)
+++ development/central/tutorials/metro/configuration/override/conf/debug.xml
Mon Apr 18 14:33:48 2005
@@ -0,0 +1,9 @@
+
+<targets>
+ <target path="/tutorial/hello">
+ <configuration>
+ <source>Custom configuration target from debug.xml.</source>
+ </configuration>
+ <categories priority="DEBUG"/>
+ </target>
+</targets>
\ No newline at end of file

Modified: development/central/tutorials/metro/context/alias/README.TXT
==============================================================================
--- development/central/tutorials/metro/context/alias/README.TXT
(original)
+++ development/central/tutorials/metro/context/alias/README.TXT Mon
Apr 18 14:33:48 2005
@@ -7,10 +7,10 @@
the metro standard uri.

$ ant
-$ metro -execute target\classes
+$ metro -execute target/classes

[INFO ] (tutorial.hello): standard context entries
name: hello
- dir: [your-directory]\home\tutorial\hello
- temp: C:\TEMP\tutorial\hello
+ dir: [your-directory]/home/tutorial/hello
+ temp: /tmp/tutorial/hello
partition: /tutorial/

Added: development/central/tutorials/metro/context/alias/conf/debug.xml
==============================================================================
--- (empty file)
+++ development/central/tutorials/metro/context/alias/conf/debug.xml Mon
Apr 18 14:33:48 2005
@@ -0,0 +1,6 @@
+
+<targets>
+ <target path="/tutorial/hello">
+ <categories priority="DEBUG" />
+ </target>
+</targets>
\ No newline at end of file

Modified: development/central/tutorials/metro/context/custom/README.TXT
==============================================================================
--- development/central/tutorials/metro/context/custom/README.TXT
(original)
+++ development/central/tutorials/metro/context/custom/README.TXT Mon
Apr 18 14:33:48 2005
@@ -1,11 +1,11 @@
-
-Typesafe context casting
-------------------------
-
-This tutorial covers the declaration of custom constructed context entry.
-
-$ maven
-$ merlin -execute target\classes
-
-[INFO ] (tutorial.hello): result: 10.5
-
+
+Typesafe context casting
+------------------------
+
+This tutorial covers the declaration of custom constructed context entry.
+
+$ ant
+$ metro -execute target/classes
+
+[INFO ] (tutorial.hello): result: 10.5
+

Added: development/central/tutorials/metro/context/custom/conf/debug.xml
==============================================================================
--- (empty file)
+++ development/central/tutorials/metro/context/custom/conf/debug.xml Mon
Apr 18 14:33:48 2005
@@ -0,0 +1,6 @@
+
+<targets>
+ <target path="/hello/hello">
+ <categories priority="DEBUG" />
+ </target>
+</targets>
\ No newline at end of file

Modified: development/central/tutorials/metro/context/injection/README.TXT
==============================================================================
--- development/central/tutorials/metro/context/injection/README.TXT
(original)
+++ development/central/tutorials/metro/context/injection/README.TXT Mon
Apr 18 14:33:48 2005
@@ -1,16 +1,16 @@
-
-Constructor Injection of a Context.
------------------------------------
-
-This tutorial covers usage of standard context entries using
-a constructor supplied context (as opposed to the classic
-Contextualization delivery mecahanism).
-
-$ ant
-$ merlin -execute target\classes
-
-[INFO ] (tutorial.hello): standard context entries
- name: hello
- home: [your-directory]\home\tutorial\hello
- temp: C:\TEMP\tutorial\hello
- partition: /tutorial/
+
+Constructor Injection of a Context.
+-----------------------------------
+
+This tutorial covers usage of standard context entries using
+a constructor supplied context (as opposed to the classic
+Contextualization delivery mecahanism).
+
+$ ant
+$ metro -execute target/classes
+
+[INFO ] (tutorial.hello): standard context entries
+ name: hello
+ home: [your-directory]/home/tutorial/hello
+ temp: /tmp/tutorial/hello
+ partition: /tutorial/

Added: development/central/tutorials/metro/context/injection/conf/debug.xml
==============================================================================
--- (empty file)
+++ development/central/tutorials/metro/context/injection/conf/debug.xml
Mon Apr 18 14:33:48 2005
@@ -0,0 +1,6 @@
+
+<targets>
+ <target path="/classic/hello">
+ <categories priority="DEBUG" />
+ </target>
+</targets>
\ No newline at end of file

Modified:
development/central/tutorials/metro/context/injection/src/main/tutorial/HelloComponent.java
==============================================================================
---
development/central/tutorials/metro/context/injection/src/main/tutorial/HelloComponent.java
(original)
+++
development/central/tutorials/metro/context/injection/src/main/tutorial/HelloComponent.java
Mon Apr 18 14:33:48 2005
@@ -50,7 +50,7 @@
String name = (String) context.get( "urn:metro:name" );
String partition = (String) context.get( "urn:metro:partition" );

- StringBuffer buffer = new StringBuffer( "standard context entries" );
+ StringBuffer buffer = new StringBuffer( "\standard context entries"
);
buffer.append( "\n name: " + name );
buffer.append( "\n home: " + home );
buffer.append( "\n temp: " + temp );

Modified: development/central/tutorials/metro/context/phased/README.TXT
==============================================================================
--- development/central/tutorials/metro/context/phased/README.TXT
(original)
+++ development/central/tutorials/metro/context/phased/README.TXT Mon
Apr 18 14:33:48 2005
@@ -6,10 +6,10 @@
lifecycle stage contextualization interface.

$ ant
-$ metro -execute target\classes
+$ metro -execute target/classes

[INFO ] (context.phased.hello): standard context entries (phased delivery)
name: hello
- dir: [your-directory]\home\tutorial\hello
- temp: C:\TEMP\tutorial\hello
+ dir: [your-directory]/home/tutorial/hello
+ temp: /tmp/tutorial/hello
partition: /context-phased/

Added: development/central/tutorials/metro/context/phased/conf/debug.xml
==============================================================================
--- (empty file)
+++ development/central/tutorials/metro/context/phased/conf/debug.xml Mon
Apr 18 14:33:48 2005
@@ -0,0 +1,6 @@
+
+<targets>
+ <target path="/context-phased/hello">
+ <categories priority="DEBUG" />
+ </target>
+</targets>
\ No newline at end of file

Modified:
development/central/tutorials/metro/context/phased/src/main/tutorial/HelloComponent.java
==============================================================================
---
development/central/tutorials/metro/context/phased/src/main/tutorial/HelloComponent.java
(original)
+++
development/central/tutorials/metro/context/phased/src/main/tutorial/HelloComponent.java
Mon Apr 18 14:33:48 2005
@@ -42,7 +42,7 @@
/**
* Contextualization of the component by the container.
* The context supplied by the container holds the
- * Merlin standard context entries for the home and
+ * Metro standard context entries for the home and
* working directories, component name and partition.
*
* @metro.context
@@ -59,7 +59,7 @@
m_name = (String) context.get( "urn:metro:name" );
m_partition = (String) context.get( "urn:metro:partition" );

- StringBuffer buffer = new StringBuffer( "standard context entries
(phased delivery)" );
+ StringBuffer buffer = new StringBuffer( "\nstandard context entries
(phased delivery)" );
buffer.append( "\n name: " + m_name );
buffer.append( "\n dir: " + m_dir );
buffer.append( "\n temp: " + m_temp );

Modified: development/central/tutorials/metro/dependencies/auto/README.txt
==============================================================================
--- development/central/tutorials/metro/dependencies/auto/README.txt
(original)
+++ development/central/tutorials/metro/dependencies/auto/README.txt Mon
Apr 18 14:33:48 2005
@@ -13,10 +13,10 @@
Service dependecies are declared in the component sources using the javadoc
tag:

- @avalon.dependency type="org.somewhere.MyInterface"
+ @metro.dependency type="org.somewhere.MyInterface"

Components that provide services declare the service export using the
-tag @avalon.service. Merlin builds and validates a dependency graph before
+tag @metro.service. Metro builds and validates a dependency graph before
component initialization, and ensures that componets are actived in the
correct order. Consumers are always activated after suppliers and
deactivated before deactivation of respective suppliers.
@@ -29,7 +29,7 @@
Runtime
-------

- $ merlin target\classes -execute
+ $ metro target/classes -execute

[INFO ] (tutorial.random): initialization
[INFO ] (tutorial.hello): initialization
@@ -43,15 +43,15 @@

The purpose of this demonstration is to show the following:

- 1. usage of @avalon.dependency tags
- 2. usage of @avalon.service tags
+ 1. usage of @metro.dependency tags
+ 2. usage of @metro.service tags
3. functionality of the container in handling automated
assembly
4. orderly commissioning and decommissioning provided
by the container

While the demonstration deals with the very simple case of a
-single supplier and a single consumer component, Merlin provides
+single supplier and a single consumer component, Metro provides
complete support for n-to-n relationships across arbitarily deep
dependency graphs.


Added: development/central/tutorials/metro/dependencies/auto/conf/debug.xml
==============================================================================
--- (empty file)
+++ development/central/tutorials/metro/dependencies/auto/conf/debug.xml
Mon Apr 18 14:33:48 2005
@@ -0,0 +1,6 @@
+
+<targets>
+ <target path="/tutorial/hello">
+ <categories priority="DEBUG" />
+ </target>
+</targets>
\ No newline at end of file

Modified: development/central/tutorials/metro/dependencies/manual/README.txt
==============================================================================
--- development/central/tutorials/metro/dependencies/manual/README.txt
(original)
+++ development/central/tutorials/metro/dependencies/manual/README.txt Mon
Apr 18 14:33:48 2005
@@ -8,8 +8,8 @@
The manual dependencies tutorial covers additional information dealing
with the explict control over dependency binding. In this example we
have HelloComponent with a dependency on two services of the same type. If
we
-depended on classic merlin auto-assembly we would not necessarily get the
-desired result. In such a situation, Merlin provides support for
+depended on classic Metro auto-assembly we would not necessarily get the
+desired result. In such a situation, Metro provides support for
overriding the auto assembly process though explicit dependency directives
included inside a <component/> tag.

@@ -25,7 +25,9 @@
</dependencies>
</component>

-The "hello" component has been manually wired together using named
components references under a set of <dependency/> directives, thereby
overriding Merlin auto-assembly huristics.
+The "hello" component has been manually wired together using named
components
+references under a set of <dependency/> directives, thereby overriding Metro
+auto-assembly huristics.

Build instructions
------------------
@@ -35,7 +37,7 @@
Runtime
-------

- $ merlin target\classes -execute
+ $ metro target/classes -execute

[INFO ] (tutorial.nancy): contextualize
[INFO ] (tutorial.gloria): contextualize

Added: development/central/tutorials/metro/dependencies/manual/conf/debug.xml
==============================================================================
--- (empty file)
+++ development/central/tutorials/metro/dependencies/manual/conf/debug.xml
Mon Apr 18 14:33:48 2005
@@ -0,0 +1,6 @@
+
+<targets>
+ <target path="/tutorial">
+ <categories priority="DEBUG" />
+ </target>
+</targets>
\ No newline at end of file

Modified: development/central/tutorials/metro/dynamics/README.txt
==============================================================================
--- development/central/tutorials/metro/dynamics/README.txt (original)
+++ development/central/tutorials/metro/dynamics/README.txt Mon Apr 18
14:33:48 2005
@@ -28,6 +28,6 @@
Runtime
-------

-$ merlin target\deliverables\jars\avalon-tutorial-dynamics.jar -execute
+$ metro target/classes -execute



Added: development/central/tutorials/metro/dynamics/conf/debug.xml
==============================================================================
--- (empty file)
+++ development/central/tutorials/metro/dynamics/conf/debug.xml Mon Apr 18
14:33:48 2005
@@ -0,0 +1,6 @@
+
+<targets>
+ <target path="/dynamics">
+ <categories priority="DEBUG" />
+ </target>
+</targets>
\ No newline at end of file

Modified:
development/central/tutorials/metro/dynamics/src/main/tutorial/DefaultGizmo.java
==============================================================================
---
development/central/tutorials/metro/dynamics/src/main/tutorial/DefaultGizmo.java
(original)
+++
development/central/tutorials/metro/dynamics/src/main/tutorial/DefaultGizmo.java
Mon Apr 18 14:33:48 2005
@@ -30,39 +30,40 @@
*/
public class DefaultGizmo implements Gizmo
{
- //---------------------------------------------------------
- // immutable state
- //---------------------------------------------------------
+ //---------------------------------------------------------
+ // immutable state
+ //---------------------------------------------------------

- /**
- * The logging channel supplied by the container.
- */
- private final Logger m_logger;
+ /**
+ * The logging channel supplied by the container.
+ */
+ private final Logger m_logger;

- //---------------------------------------------------------
- // constructor
- //---------------------------------------------------------
+ //---------------------------------------------------------
+ // constructor
+ //---------------------------------------------------------

- /**
- * Creation of a new hello facility.
- * @param logger a logging channel
- * @param context the supplied runtime context
- * @metro.entry key="urn:metro:dir"
- */
- public DefaultGizmo( Logger logger, Context context ) throws
ContextException
- {
- m_logger = logger;
- m_logger.info( "I've been created" );
- File home = (File) context.get( "urn:metro:dir" );
- m_logger.info( "home: " + home );
- }
+ /**
+ * Creation of a new hello facility.
+ * @param logger a logging channel
+ * @param context the supplied runtime context
+ * @metro.entry key="urn:metro:dir"
+ */
+ public DefaultGizmo( Logger logger, Context context )
+ throws ContextException
+ {
+ m_logger = logger;
+ m_logger.info( "I've been created" );
+ File home = (File) context.get( "urn:metro:dir" );
+ m_logger.info( "home: " + home );
+ }

- //---------------------------------------------------------
- // Object
- //---------------------------------------------------------
-
- public String toString()
- {
- return "[gizmo:" + System.identityHashCode( this ) + "]";
- }
+ //---------------------------------------------------------
+ // Object
+ //---------------------------------------------------------
+
+ public String toString()
+ {
+ return "[gizmo:" + System.identityHashCode( this ) + "]";
+ }
}

Modified:
development/central/tutorials/metro/dynamics/src/main/tutorial/DefaultWidget.java
==============================================================================
---
development/central/tutorials/metro/dynamics/src/main/tutorial/DefaultWidget.java
(original)
+++
development/central/tutorials/metro/dynamics/src/main/tutorial/DefaultWidget.java
Mon Apr 18 14:33:48 2005
@@ -26,55 +26,57 @@
* @metro.component name="widget" lifestyle="singleton"
* @metro.service type="tutorial.Widget"
*/
-public class DefaultWidget implements Widget, Disposable
+public class DefaultWidget
+ implements Widget, Disposable
{
- //---------------------------------------------------------
- // immutable state
- //---------------------------------------------------------
-
- /**
- * The logging channel supplied by the container.
- */
- private final Logger m_logger;
-
- //---------------------------------------------------------
- // constructor
- //---------------------------------------------------------
-
- /**
- * Creation of a new hello facility.
- * @param logger a logging channel
- */
- public DefaultWidget( Logger logger, Configuration config )
- {
- m_logger = logger;
- m_logger.info( "hello" );
- final String message = config.getChild( "message" ).getValue( null );
- if( null != message )
- {
- m_logger.info( message );
- }
- }
-
- //---------------------------------------------------------
- // Disposable
- //---------------------------------------------------------
-
- /**
- * End-of-life processing initiated by the container.
- */
- public void dispose()
- {
+ //---------------------------------------------------------
+ // immutable state
+ //---------------------------------------------------------
+
+ /**
+ * The logging channel supplied by the container.
+ */
+ private final Logger m_logger;
+
+ //---------------------------------------------------------
+ // constructor
+ //---------------------------------------------------------
+
+ /**
+ * Creation of a new hello facility.
+ * @param logger a logging channel
+ */
+ public DefaultWidget( Logger logger, Configuration config )
+ {
+ m_logger = logger;
+ m_logger.info( "hello" );
+ Configuration child = config.getChild( "message" );
+ final String message = child.getValue( null );
+ if( null != message )
+ {
+ m_logger.info( message );
+ }
+ }
+
+ //---------------------------------------------------------
+ // Disposable
+ //---------------------------------------------------------
+
+ /**
+ * End-of-life processing initiated by the container.
+ */
+ public void dispose()
+ {
m_logger.info( "time to die" );
- }
-
- //---------------------------------------------------------
- // Object
- //---------------------------------------------------------
-
- public String toString()
- {
- return "[widget:" + System.identityHashCode( this ) + "]";
- }
+ }
+
+ //---------------------------------------------------------
+ // Object
+ //---------------------------------------------------------
+
+ public String toString()
+ {
+ return "[widget:" + System.identityHashCode( this ) + "]";
+ }
}


Modified:
development/central/tutorials/metro/dynamics/src/main/tutorial/HelloFacility.java
==============================================================================
---
development/central/tutorials/metro/dynamics/src/main/tutorial/HelloFacility.java
(original)
+++
development/central/tutorials/metro/dynamics/src/main/tutorial/HelloFacility.java
Mon Apr 18 14:33:48 2005
@@ -38,152 +38,151 @@
implements Executable
{

- //---------------------------------------------------------
- // immutable state
- //---------------------------------------------------------
-
- /**
- * The logging channel supplied by the container.
- */
- private final Logger m_logger;
-
- //---------------------------------------------------------
- // mutable state
- //---------------------------------------------------------
-
- /**
- * The containment model (establish via contexualization)
- */
- private ContainmentModel m_model;
-
- //---------------------------------------------------------
- // constructor
- //---------------------------------------------------------
-
- /**
- * Creation of a new hello facility.
- *
- * @param logger a logging channel
- * @param context the supplied context
- * @metro.entry key="urn:composition:containment.model"
- * type="net.dpml.composition.model.ContainmentModel"
- * @exception ContextException if a contextualization error occurs
- */
- public HelloFacility( Logger logger, Context context )
- throws ContextException
- {
- m_logger = logger;
- m_model =
- (ContainmentModel) context.get(
- "urn:composition:containment.model" );
- }
-
- //---------------------------------------------------------
- // Executable
- //---------------------------------------------------------
-
- /**
- * Request for execution trigger by the container. The implementation
- * uses the containment model supplied during the contextualization phase
- * to dynamically resolve a reference to a deployment model capable of
- * supporting the Widget service interface. The implementation uses this
- * model to instantiate the instance. Subsequent steps in the example
- * show the decommissining of the widget model, the modification of the
- * model state (by updating the models configuration) and the
- * recommissioning of the model. Finally a new widget instance is
- * resolved and we can see (via logging messages) that the widget behaviour
- * has been modified as a result of the modification to the configuration.
- *
- * @exception Exception is a runtime error occurs
- */
- public void execute() throws Exception
- {
- getLogger().info( "looking for a widget" );
-
- //
- // create a reference to the widget service and resolve a reference
- // to a component model using the service reference
- //
-
- ReferenceDescriptor reference = new ReferenceDescriptor(
Widget.class.getName() );
- ComponentModel model = (ComponentModel) m_model.getModel( reference );
- getLogger().info( "got a widget model: " + model );
-
- //
- // commission the model and resolve a component instance
- //
-
- getLogger().info( "commissioning the widget model" );
- model.commission();
- Widget widget = (Widget) model.resolve();
- getLogger().info( "got the widget: " + widget );
-
- getLogger().info( "releasing the widget" );
- model.release( widget );
-
- getLogger().info( "time for a change" );
- getLogger().info( "decommissioning the widget model" );
- model.decommission();
-
- //
- // create an alternative configuration and apply it to the
- // widget model
- //
-
- getLogger().info( "building alternative configuration" );
- DefaultConfiguration message = new DefaultConfiguration( "message" );
- message.setValue( "bonjour!" );
- DefaultConfiguration config = new DefaultConfiguration( "config" );
- config.addChild( message );
- model.setConfiguration( config );
-
- //
- // redeploy the model and create a new instance
- //
-
- getLogger().info( "recommissioning the widget model" );
- model.commission();
- widget = (Widget) model.resolve();
- getLogger().info( "got the updated widget: " + widget );
- model.release( widget );
- model.decommission();
-
- //
- // that's enought playing around with configurations - lets
- // grab a gizmo model and fiddle with its context
- //
-
- /*
- DISABLED AS I'VE BROKEN THIS AS PART OF FREIGHT-TRAIN DEVELOPMENT
- */
-
- /*
- getLogger().info( "lets play with the gizmo" );
- reference = new ReferenceDescriptor( Gizmo.class.getName() );
- model = (ComponentModel) m_model.getModel( reference );
- getLogger().info( "got a gizmo model: " + model );
-
- //
- // override the standard home context entry with something
- // we have derived
- //
-
- getLogger().info( "building alternative context entry" );
- model.getContextModel().setEntry(
- "urn:metro:dir",
- new File( System.getProperty( "user.dir" ) ) );
- model.commission();
- Gizmo gizmo = (Gizmo) model.resolve();
- getLogger().info( "got gizmo: " + gizmo );
- */
- }
-
- //---------------------------------------------------------
- // private
- //---------------------------------------------------------
-
- private Logger getLogger()
- {
- return m_logger;
- }
+ //---------------------------------------------------------
+ // immutable state
+ //---------------------------------------------------------
+
+ /**
+ * The logging channel supplied by the container.
+ */
+ private final Logger m_logger;
+
+ //---------------------------------------------------------
+ // mutable state
+ //---------------------------------------------------------
+
+ /**
+ * The containment model (establish via contexualization)
+ */
+ private ContainmentModel m_model;
+
+ //---------------------------------------------------------
+ // constructor
+ //---------------------------------------------------------
+
+ /**
+ * Creation of a new hello facility.
+ *
+ * @param logger a logging channel
+ * @param context the supplied context
+ * @metro.entry key="urn:composition:containment.model"
+ * type="net.dpml.composition.model.ContainmentModel"
+ * @exception ContextException if a contextualization error occurs
+ */
+ public HelloFacility( Logger logger, Context context )
+ throws ContextException
+ {
+ m_logger = logger;
+ m_model = (ContainmentModel) context.get(
"urn:composition:containment.model" );
+ }
+
+ //---------------------------------------------------------
+ // Executable
+ //---------------------------------------------------------
+
+ /**
+ * Request for execution trigger by the container. The implementation
+ * uses the containment model supplied during the contextualization phase
+ * to dynamically resolve a reference to a deployment model capable of
+ * supporting the Widget service interface. The implementation uses this
+ * model to instantiate the instance. Subsequent steps in the example
+ * show the decommissining of the widget model, the modification of the
+ * model state (by updating the models configuration) and the
+ * recommissioning of the model. Finally a new widget instance is
+ * resolved and we can see (via logging messages) that the widget
behaviour
+ * has been modified as a result of the modification to the configuration.
+ *
+ * @exception Exception is a runtime error occurs
+ */
+ public void execute() throws Exception
+ {
+ getLogger().info( "looking for a widget" );
+
+ //
+ // create a reference to the widget service and resolve a reference
+ // to a component model using the service reference
+ //
+
+ ReferenceDescriptor reference = new ReferenceDescriptor(
Widget.class.getName() );
+ ComponentModel model = (ComponentModel) m_model.getModel( reference
);
+ getLogger().info( "got a widget model: " + model );
+
+ //
+ // commission the model and resolve a component instance
+ //
+
+ getLogger().info( "commissioning the widget model" );
+ model.commission();
+ Widget widget = (Widget) model.resolve();
+ getLogger().info( "got the widget: " + widget );
+
+ getLogger().info( "releasing the widget" );
+ model.release( widget );
+
+ getLogger().info( "time for a change" );
+ getLogger().info( "decommissioning the widget model" );
+ model.decommission();
+
+ //
+ // create an alternative configuration and apply it to the
+ // widget model
+ //
+
+ getLogger().info( "building alternative configuration" );
+ DefaultConfiguration message = new DefaultConfiguration( "message" );
+ message.setValue( "bonjour!" );
+ DefaultConfiguration config = new DefaultConfiguration( "config" );
+ config.addChild( message );
+ model.setConfiguration( config );
+
+ //
+ // redeploy the model and create a new instance
+ //
+
+ getLogger().info( "recommissioning the widget model" );
+ model.commission();
+ widget = (Widget) model.resolve();
+ getLogger().info( "got the updated widget: " + widget );
+ model.release( widget );
+ model.decommission();
+
+ //
+ // that's enough playing around with configurations - lets
+ // grab a gizmo model and fiddle with its context
+ //
+
+ /*
+ DISABLED AS I'VE BROKEN THIS AS PART OF FREIGHT-TRAIN DEVELOPMENT
+ */
+
+ /*
+ getLogger().info( "lets play with the gizmo" );
+ reference = new ReferenceDescriptor( Gizmo.class.getName() );
+ model = (ComponentModel) m_model.getModel( reference );
+ getLogger().info( "got a gizmo model: " + model );
+
+ //
+ // override the standard home context entry with something
+ // we have derived
+ //
+
+ getLogger().info( "building alternative context entry" );
+ String entryName = "urn:metro:dir";
+ String cwd = System.getProperty( "user.dir" );
+ File currentDir = new File( cwd );
+ model.getContextModel().setEntry( entryName, currentDir );
+ model.commission();
+ Gizmo gizmo = (Gizmo) model.resolve();
+ getLogger().info( "got gizmo: " + gizmo );
+ */
+ }
+
+ //---------------------------------------------------------
+ // private
+ //---------------------------------------------------------
+
+ private Logger getLogger()
+ {
+ return m_logger;
+ }
}

Modified: development/central/tutorials/metro/hello/README.txt
==============================================================================
--- development/central/tutorials/metro/hello/README.txt (original)
+++ development/central/tutorials/metro/hello/README.txt Mon Apr 18
14:33:48 2005
@@ -3,13 +3,13 @@
=====

Hello is a demonstration component used as part of the
-Merlin Tutorial.
+Metro Tutorial.

Overview
--------

An example of a minimal componet, packaged under a container,
-deployable under Merlin. The project includes:
+deployable under Metro. The project includes:

* HelloComponent.java - the component source
* block.xml - the container defintion
@@ -29,19 +29,19 @@
Runtime
-------

-To see Merlin in action, execute Merlin and give it either the
+To see Metro in action, execute Metro and give it either the
jar file of the target/classes directory as the deployment
argument.

-$ merlin target\classes -execute
+$ metro target/classes -execute

Or:

-$ merlin target\deliverables\jars\hello.jar -execute
+$ metro target/deliverables/jars/hello.jar -execute

The -execute parameter in the above command line simply tells
-Merlin to deploy and decomission the component. If we didn't
-include the -execute option, then Merlin would stay running
+Metro to deploy and decomission the component. If we didn't
+include the -execute option, then Metro would stay running
until we forced termination using ^C.

To get an idea of what is happening behing the scenes you can
@@ -49,6 +49,6 @@
argument. In addition, the -debug CLI parameter presents a
summary of the resources pulling together to handle deployment:

-$ merlin target\classes -execute -debug -config conf\config.xml
+$ metro target/classes -execute -debug -config conf/config.xml



Added: development/central/tutorials/metro/hello/conf/debug.xml
==============================================================================
--- (empty file)
+++ development/central/tutorials/metro/hello/conf/debug.xml Mon Apr 18
14:33:48 2005
@@ -0,0 +1,6 @@
+
+<targets>
+ <target path="/tutorial/hello">
+ <categories priority="DEBUG" />
+ </target>
+</targets>
\ No newline at end of file

Modified: development/central/tutorials/metro/main/README.txt
==============================================================================
--- development/central/tutorials/metro/main/README.txt (original)
+++ development/central/tutorials/metro/main/README.txt Mon Apr 18 14:33:48
2005
@@ -7,7 +7,7 @@

The tutorial includes a single class tutorial.Main. This class
contains a single main method that demonstrates the creation of
-a merlin kernel. Details of the embedding and activation
+a Metro kernel. Details of the embedding and activation
process are included in the source.

Build

Modified: development/central/tutorials/metro/main/build.xml
==============================================================================
--- development/central/tutorials/metro/main/build.xml (original)
+++ development/central/tutorials/metro/main/build.xml Mon Apr 18 14:33:48
2005
@@ -16,7 +16,7 @@

<target name="test" depends="standard.test">
<x:path id="deps"/>
- <java classname="tutorial.Main" fork="true" dir="target\test"
failonerror="true">
+ <java classname="tutorial.Main" fork="true" dir="target/test"
failonerror="true">
<classpath>
<path refid="deps"/>
<pathelement
location="target/deliverables/jars/${project.filename}"/>

Modified: development/central/tutorials/metro/main/src/main/tutorial/Main.java
==============================================================================
--- development/central/tutorials/metro/main/src/main/tutorial/Main.java
(original)
+++ development/central/tutorials/metro/main/src/main/tutorial/Main.java
Mon Apr 18 14:33:48 2005
@@ -73,8 +73,7 @@
// setup the criteria
//

- CompositionCriteria criteria =
- compositionFactory.createCompositionCriteria();
+ CompositionCriteria criteria =
compositionFactory.createCompositionCriteria();
criteria.setAuditMode( true );
criteria.setDeploymentPath(
new String[]{ "@HELLO-TUTORIAL-URI@" } );

Modified: development/central/tutorials/metro/parameterization/build.xml
==============================================================================
--- development/central/tutorials/metro/parameterization/build.xml
(original)
+++ development/central/tutorials/metro/parameterization/build.xml Mon
Apr 18 14:33:48 2005
@@ -7,12 +7,18 @@

<target name="build" depends="standard.build">
<x:block name="tutorial" embed="MAIN">
- <x:component name="hello" class="tutorial.HelloComponent">
+ <x:component name="hello1" class="tutorial.HelloComponent">
<x:parameters>
<x:parameter name="color" value="magenta"/>
<x:parameter name="size" value="relative"/>
</x:parameters>
</x:component>
+ <x:component name="hello2" class="tutorial.HelloComponent">
+ <x:parameters>
+ <x:parameter name="color" value="yellow"/>
+ <x:parameter name="size" value="large"/>
+ </x:parameters>
+ </x:component>
</x:block>
</target>


Added: development/central/tutorials/metro/parameterization/conf/debug.xml
==============================================================================
--- (empty file)
+++ development/central/tutorials/metro/parameterization/conf/debug.xml Mon
Apr 18 14:33:48 2005
@@ -0,0 +1,6 @@
+
+<targets>
+ <target path="/tutorial">
+ <categories priority="DEBUG" />
+ </target>
+</targets>
\ No newline at end of file

Modified:
development/central/tutorials/metro/parameterization/src/main/tutorial/HelloComponent.java
==============================================================================
---
development/central/tutorials/metro/parameterization/src/main/tutorial/HelloComponent.java
(original)
+++
development/central/tutorials/metro/parameterization/src/main/tutorial/HelloComponent.java
Mon Apr 18 14:33:48 2005
@@ -40,7 +40,7 @@
* @metro.service type="tutorial.Hello"
*/
public class HelloComponent extends AbstractLogEnabled
- implements Parameterizable, Initializable, Hello
+ implements Parameterizable, Initializable, Hello
{
private String m_color = null;
private String m_size = null;
@@ -60,7 +60,8 @@
* Component execution trigger by the container following
* completion of the initialization stage.
*/
- public void parameterize( Parameters params ) throws ParameterException
+ public void parameterize( Parameters params )
+ throws ParameterException
{
getLogger().info( "execution" );
m_color = params.getParameter( "color" );
@@ -71,7 +72,8 @@
* Initialization of the component by the container.
* @exception Exception if an initialization error occurs
*/
- public void initialize() throws Exception
+ public void initialize()
+ throws Exception
{
getLogger().info( "initialization [" + m_color + ", " + m_size + "]"
);
}

Added: development/central/tutorials/metro/profiles/conf/debug.xml
==============================================================================
--- (empty file)
+++ development/central/tutorials/metro/profiles/conf/debug.xml Mon Apr 18
14:33:48 2005
@@ -0,0 +1,6 @@
+
+<targets>
+ <target path="/tutorial/hello">
+ <categories priority="DEBUG" />
+ </target>
+</targets>
\ No newline at end of file

Modified: development/central/tutorials/metro/selection/build.xml
==============================================================================
--- development/central/tutorials/metro/selection/build.xml (original)
+++ development/central/tutorials/metro/selection/build.xml Mon Apr 18
14:33:48 2005
@@ -7,6 +7,8 @@

<target name="build" depends="standard.build">
<x:block name="tutorial" embed="MAIN">
+ <x:component name="hello"
+ class="tutorial.HelloComponent" />
<x:component name="randomizer"
class="tutorial.RandomGeneratorProvider"
profile="secondary"/>

Added: development/central/tutorials/metro/selection/conf/debug.xml
==============================================================================
--- (empty file)
+++ development/central/tutorials/metro/selection/conf/debug.xml Mon
Apr 18 14:33:48 2005
@@ -0,0 +1,6 @@
+
+<targets>
+ <target path="/tutorial">
+ <categories priority="DEBUG" />
+ </target>
+</targets>
\ No newline at end of file

Modified:
development/central/tutorials/metro/selection/src/main/tutorial/HelloComponent.java
==============================================================================
---
development/central/tutorials/metro/selection/src/main/tutorial/HelloComponent.java
(original)
+++
development/central/tutorials/metro/selection/src/main/tutorial/HelloComponent.java
Mon Apr 18 14:33:48 2005
@@ -17,6 +17,7 @@
package tutorial;

import net.dpml.logging.AbstractLogEnabled;
+
import net.dpml.service.Serviceable;
import net.dpml.service.ServiceManager;
import net.dpml.service.ServiceException;

Modified:
development/central/tutorials/metro/selection/src/main/tutorial/RandomGeneratorProvider.java
==============================================================================
---
development/central/tutorials/metro/selection/src/main/tutorial/RandomGeneratorProvider.java
(original)
+++
development/central/tutorials/metro/selection/src/main/tutorial/RandomGeneratorProvider.java
Mon Apr 18 14:33:48 2005
@@ -29,7 +29,7 @@
* @metro.service type="tutorial.RandomGenerator"
*/
public class RandomGeneratorProvider extends AbstractLogEnabled
- implements Configurable, RandomGenerator
+ implements Configurable, RandomGenerator
{

private Random m_random = null;

Added: development/central/tutorials/metro/startable/conf/debug.xml
==============================================================================
--- (empty file)
+++ development/central/tutorials/metro/startable/conf/debug.xml Mon
Apr 18 14:33:48 2005
@@ -0,0 +1,6 @@
+
+<targets>
+ <target path="/tutorial/hello">
+ <categories priority="DEBUG" />
+ </target>
+</targets>
\ No newline at end of file

Modified:
development/central/tutorials/metro/startable/src/main/tutorial/HelloComponent.java
==============================================================================
---
development/central/tutorials/metro/startable/src/main/tutorial/HelloComponent.java
(original)
+++
development/central/tutorials/metro/startable/src/main/tutorial/HelloComponent.java
Mon Apr 18 14:33:48 2005
@@ -31,7 +31,8 @@
* name="hello"
* lifestyle="singleton"
*/
-public class HelloComponent implements Startable
+public class HelloComponent
+ implements Startable
{
//-------------------------------------------------------
// state
@@ -77,13 +78,12 @@
public void stop()
{
m_thread.interrupt();
- m_logger.info( "Goodbye World!" );
}

/**
* A little worker thread to do the background stuff.
*/
- private static class Worker extends Thread
+ private class Worker extends Thread
{
private boolean m_continue = true;

@@ -104,6 +104,7 @@
m_continue = false;
}
}
+ m_logger.info( "Goodbye World!" );
}
}
}



  • svn commit: r2307 - in development/central: central tutorials/metro tutorials/metro/composition tutorials/metro/composition/application/impl/conf tutorials/metro/composition/location/impl/src/main/tutorial/location tutorials/metro/composition/publisher/api/src/main/tutorial/publisher tutorials/metro/composition/publisher/impl/src/main/tutorial/publisher tutorials/metro/configuration/block tutorials/metro/configuration/block/conf tutorials/metro/configuration/defaults tutorials/metro/configuration/defaults/conf tutorials/metro/configuration/defaults/src/main/tutorial tutorials/metro/configuration/injection tutorials/metro/configuration/injection/conf tutorials/metro/configuration/injection/src/main/tutorial tutorials/metro/configuration/override tutorials/metro/configuration/override/conf tutorials/metro/context/alias tutorials/metro/context/alias/conf tutorials/metro/context/custom tutorials/metro/context/custom/conf tutorials/metro/context/injection tutorials/metro/context/injection/conf tutorials/metro/context/injection/src/main/tutorial tutorials/metro/context/phased tutorials/metro/context/phased/conf tutorials/metro/context/phased/src/main/tutorial tutorials/metro/dependencies/auto tutorials/metro/dependencies/auto/conf tutorials/metro/dependencies/manual tutorials/metro/dependencies/manual/conf tutorials/metro/dynamics tutorials/metro/dynamics/conf tutorials/metro/dynamics/src/main/tutorial tutorials/metro/hello tutorials/metro/hello/conf tutorials/metro/main tutorials/metro/main/etc tutorials/metro/main/src/main/tutorial tutorials/metro/parameterization tutorials/metro/parameterization/conf tutorials/metro/parameterization/src/main/tutorial tutorials/metro/profiles/conf tutorials/metro/selection tutorials/metro/selection/conf tutorials/metro/selection/src/main/tutorial tutorials/metro/startable/conf tutorials/metro/startable/src/main/tutorial, niclas, 04/18/2005

Archive powered by MHonArc 2.6.24.

Top of Page