Outline
OverviewXDoclet tags can be inserted into source code to automatically generate the mxinfo file. There are a number of advantages to doing it this way:
Any class or interface can be used to produce mxinfo files. How they get used is up to container and its Management subsystem. The TagsThe following tags are defined: phoenix:mx-topic
Example: /** * This is the interface via which you can manager * the root container of Applications. * * @phoenix:mx-topic name="Kernel" * * @author */ phoenix:mx-attribute
Example: /**
* Gets the list of applications running in the container
*
* @phoenix:mx-attribute
*
* @return applicationNames The array of application names
*/
String[] getApplicationNames();
phoenix:mx-operation
Example: /**
* Removes the application from the container
*
* @phoenix:mx-operation
*
* @param name the name of application to remove
*/
void removeApplication( String name )
phoenix:mx-description
Example: /**
* Retrieve a string identifying version of server.
* Usually looks like "v4.0.1a".
*
* @phoenix:mx-attribute
* @phoenix:mx-description Retrieve a string identifying version of server.
*
* @return version string of server.
*/
String getVersion();
phoenix:mx-proxy
Example: /** * Ftp server starting point. Avalon framework will load this * from the jar file. This is also the starting point of remote * admin. * * @phoenix:block * @phoenix:service name="org.apache.avalon.ftpserver.interfaces.FtpServerInterface" * * @phoenix:mx-proxy class="org.apache.avalon.ftpserver.FtpServerMxProxy" * * @author Rana Bhattacharyya <rana_b@yahoo.com> * @author Paul Hammant <Paul_Hammant@yahoo.com> * @version 1.0 */ Build InstructionsTo have mxinfo files generated as part as your ant build script, include a task like that this: <!-- Make .mxinfo automatically for blocks -->
<target name="phoenix-xdoclet" depends="compile">
<mkdir dir="${build.xdoclet}"/>
<taskdef name="phoenix-mxinfo"
classname="org.apache.avalon.phoenix.tools.xdoclet.PhoenixXDoclet"
classpathref="project.class.path"/>
<phoenix-mxinfo
destdir="${build.xdoclet}"
classpathref="project.class.path">
<fileset dir="${java.dir}">
<include name="**" />
</fileset>
<mxinfo/>
</phoenix-mxinfo>
</target>
Where build.xdoclet is where the .mxinfo files should be placed, and java.dir is the location of the source files. The xdoclet jars, phoenix-client.jar and log4j.jar need to be in ant's classpath. |