You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by ni...@apache.org on 2004/04/03 17:49:18 UTC
cvs commit: avalon/merlin/platform/tutorials/jmx/conf block.xml config.xml hello.block
niclas 2004/04/03 07:49:18
Added: merlin/platform/tutorials/jmx .cvsignore README.txt
merlin.properties project.xml
merlin/platform/tutorials/jmx/conf block.xml config.xml
hello.block
Log:
A tutorial around the JMX facility. Not complete yet.
Revision Changes Path
1.1 avalon/merlin/platform/tutorials/jmx/.cvsignore
Index: .cvsignore
===================================================================
maven.log
velocity.log
build.xml
build.properties
target
maven.log
working
.classpath
.project
1.1 avalon/merlin/platform/tutorials/jmx/README.txt
Index: README.txt
===================================================================
JMX
=====
JMX is a demonstration component used as part of the
Merlin Tutorial, showing how to establish JMX for Merlin hosted
components.
Overview
--------
We are using the simplest form of component, the Hello component,
and adding an simple management interface, which allows to set
the output string.
* HelloComponent.java - the component source
* block.xml - the container defintion
Build
-----
Build the project using the following command:
$ maven
The above command triggers the default goal jar:jar which will
create a jar file under the target directory named
merlin-hello-tutorial-1.0.jar. The jar file contains a single
component, generated .xinfo descriptor, and a bundled block.xml
deployment descriptor.
Runtime
-------
To see Merlin in action, execute Merlin and give it either the
jar file of the target/classes directory as the deployment
argument.
$ merlin target\classes -execute
Or:
$ merlin target\merlin-hello-tutorial-1.0.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
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. 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
1.1 avalon/merlin/platform/tutorials/jmx/merlin.properties
Index: merlin.properties
===================================================================
#
# example properties
#
# merlin.info = true
# merlin.debug = false
1.1 avalon/merlin/platform/tutorials/jmx/project.xml
Index: project.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<project>
<extend>${basedir}/../project.xml</extend>
<groupId>merlin/tutorial</groupId>
<id>jmx-hello</id>
<name>Merlin Hello Tutorials</name>
<package>tutorial</package>
<currentVersion>1.0</currentVersion>
<inceptionYear>2003</inceptionYear>
<shortDescription>Merlin JMX-enabled Hello Tutorial</shortDescription>
<description>
JMX enabled 'Hello' tutorial
</description>
<dependencies>
<dependency>
<groupId>avalon-framework</groupId>
<artifactId>avalon-framework-api</artifactId>
<version>4.1.5</version>
</dependency>
<dependency>
<groupId>merlin</groupId>
<artifactId>merlin-unit</artifactId>
<version>3.3-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
1.1 avalon/merlin/platform/tutorials/jmx/conf/block.xml
Index: block.xml
===================================================================
<container name="tutorial">
<component name="hello" class="tutorial.HelloComponent" activation="startup">
<configuration>
<hello>Hello, World!</hello>
</configuration>
</component>
</container>
1.1 avalon/merlin/platform/tutorials/jmx/conf/config.xml
Index: config.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<targets>
<target path="/tutorial/hello">
<categories priority="DEBUG"/>
<configuration>
<hello>Hello, Avalon!</hello>
</configuration>
</target>
</targets>
1.1 avalon/merlin/platform/tutorials/jmx/conf/hello.block
Index: hello.block
===================================================================
<container name="tutorial">
<classloader>
<classpath>
<repository>
<resource id="merlin/tutorial:jmx-hello" version="1.0"/>
<resource id="avalon-merlin-jmx:merlin-jmx-management-api" version="1.0"/>
<resource id="avalon-merlin-jmx:merlin-jmx-management-spi" version="1.0"/>
<resource id="avalon-merlin-jmx:merlin-jmx-management-mx4j" version="1.0"/>
<resource id="avalon-merlin-jmx:merlin-jmx-util" version="1.0"/>
<resource id="avalon-merlin-jmx:merlin-jmx-handler" version="1.0"/>
<resource id="mx4j:mx4j-jmx" version="1.1.1"/>
<resource id="mx4j:mx4j-tools" version="1.1.1"/>
</repository>
</classpath>
</classloader>
<include name="ComponentRegistrationManager" id="avalon-merlin-jmx:merlin-jmx-management-handler" version="1.0"/>
<component name="JmxManagementHandler" class="org.apache.avalon.merlin.jmx.handler.JmxManagementHandler"/>
<component name="hello" class="tutorial.HelloComponent">
<configuration>
<hello>Hello, Apache!</hello>
</configuration>
</component>
</container>
---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org