<h1>JBoss.net xdoclet module</h1>

<p> 

<img SRC="../../../../../modules/html/developers/guides/jboss.net/jboss-net.png" align=LEFT>

Deployment descriptors are a pain in the ass and you want to keep meta-data and source
in sync, at least for the development stage of your project? The answer is Attribute-Oriented
Programming and the beloved <a href="http://xdoclet.sourceforge.net">XDoclet</a> tool
which is used throughout the jboss environment very extensively.</p>

<p>So do we provide an xdocletextension that may be used as a sub-module to
both the existing jmx und ejb modules and that generates the web-service.xml (i.e. Axis wsdd)
from correctly tagged java-, entity- and jmx-beans, such 
as in <a href="../../../../../modules/html/developers/guides/jboss.net/HelloBean.java">this example</a>. </p>

<p> Here is an excerpt from an ant script that demonstrates the embedding
into a build environment and the usage of the basic parameters "prefix",
 "targetnamespace" and "webDeploymentName":
 
<code>
<pre>
    &lt;!-- The classpath should include xdoclet basics and the jboss-net module --&gt;
    &lt;path id="jbossnetxdoclet.classpath"&gt;
      &lt;path refid="xdoclet.task.classpath"/&gt;
      &lt;pathelement path="${libdir}/xdoclet-module-jboss-net.jar"/&gt;
    &lt;/path&gt;
    
    &lt;!-- we define two ws-enabled tasks --&gt;
    &lt;taskdef name="webserviceejbdoclet" classname="xdoclet.modules.ejb.EjbDocletTask" 
                classpathref="jbossnetxdoclet.classpath"/&gt;
    &lt;taskdef name="webservicejmxdoclet" classname="xdoclet.modules.jmx.JMXDocletTask" 
                classpathref="jbossnetxdoclet.classpath"/&gt;
    
    &lt;!-- here is how you call it --&gt;
    &lt;webserviceejbdoclet destdir="${build.gen-src}"
	     ejbspec="2.0"
	     excludedtags="@version,@author"&gt;
      &lt;fileset dir="${source.java}"&gt;
        &lt;include name="**Bean.java"/&gt;
      &lt;/fileset&gt;
      &lt;entitycmp cmpspec="2.x"/&gt;
      &lt;remoteinterface/&gt;
      &lt;homeinterface/&gt;
      &lt;deploymentdescriptor xmlencoding ="UTF-8"
         destdir="${build.resources}/ejb/META-INF"/&gt;
      &lt;jboss xmlencoding="UTF-8"
         version="3.0"
         destdir="${build.resources}/ejb/META-INF"/&gt;
      &lt;jbossnet webDeploymentName="SampleEjb" 
      	prefix="sampleejb" 
      	destdir="${build.resources}/wsr/META-INF" 
      	targetNameSpace="http://net.jboss.org/sampleejb" />
    &lt;/webserviceejbdoclet&gt;

    &lt;webservicejmxdoclet destdir="${build.gen-src}"
	     excludedtags="@version,@author"&gt;
      &lt;fileset dir="${source.java}"&gt;
        &lt;include name="*Service.java"/&gt;
      &lt;/fileset&gt;
      &lt;mbeaninterface/&gt;
      &lt;jbossnet webDeploymentName="SampleJMX" 
      	prefix="samplejmx" 
      	destdir="${build.resources}/wsr/META-INF" 
      	targetNameSpace="http://net.jboss.org/samplejmx" /&gt;
    &lt;/webservicejmxdoclet&gt;
</pre>
</code></p>

<p> <a href="../../../../../modules/html/developers/guides/jboss.net/xdoclet-tags.xml">Here is a complete reference </a> of the 
available tags for annotating your beans (which still needs to be rendered, but I did not yet
find the xdocs2html stylesheet).</p>

<p>"Dr. Schorsch" (<a ref="mailto:christoph.Jung@jboss.org">christoph.jung@jboss.org</a>) - 2001/09/29, Last update on 2003/10/15</p>

<p><small>All mentioned trademarks on this page are 
copyright of their respective owners ... like that ... </small></p>

