long anticipated documentation for ejbjar/websphere deployment tool ;-)
Holger
Index: docs/manual/OptionalTasks/ejb.html =================================================================== RCS file: /home/cvspublic/jakarta-ant/docs/manual/OptionalTasks/ejb.html,v retrieving revision 1.12 diff -u -w -r1.12 ejb.html --- docs/manual/OptionalTasks/ejb.html 10 Jan 2002 08:48:31 -0000 1.12 +++ docs/manual/OptionalTasks/ejb.html 18 Jan 2002 15:45:19 -0000 @@ -13,6 +13,7 @@ <!-- Names are in alphabetical order, on last name --> <ul> <li>Paul Austin (<a href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>)</li> + <li>Holger Engels (<a href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>)</li> <li>Tim Fennell (<a href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>)</li> <li>Martin Gee (<a href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>)</li> <li>Conor MacNeill (<a href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>)</li> @@ -64,11 +65,12 @@ <tr><td><a href="#ddcreator">ddcreator</a></td><td colspan="2">Weblogic 4.5.1</td></tr> <tr><td><a href="#ejbc">ejbc</a></td><td colspan="2">Weblogic 4.5.1</td></tr> <tr><td><a href="#iplanet-ejbc">iplanet-ejbc</a></td><td colspan="2">iPlanet Application Server 6.0</td></tr> - <tr><td rowspan="5"><a href="#ejbjar">ejbjar</a></td><td colspan="2" align="center"><b>Nested Elements</b></td></tr> + <tr><td rowspan="6"><a href="#ejbjar">ejbjar</a></td><td colspan="2" align="center"><b>Nested Elements</b></td></tr> <tr><td><a href="BorlandEJBTasks.html">borland</a></td><td>Borland Application Server 4.5</td></tr> <tr><td><a href="#ejbjar_jboss">jBoss</a></td><td>jBoss</td></tr> <tr><td><a href="#ejbjar_iplanet">iPlanet</a></td><td>iPlanet Application Server 6.0</td></tr> <tr><td><a href="#ejbjar_weblogic">weblogic</a></td><td>Weblogic 5.1 & 6.0</td></tr> + <tr><td><a href="#ejbjar_websphere">websphere</a></td><td>IBM WebSphere 4.0</td></tr> <tr><td><a href="#wlrun">wlrun</a></td><td colspan="2">Weblogic 4.5.1, 5.1 & 6.0</td></tr> <tr><td><a href="#wlstop">wlstop</a></td><td colspan="2">Weblogic 4.5.1, 5.1 & 6.0</td></tr> @@ -530,6 +532,7 @@ <li>iPlanet Application Server 6.0</li> <li>Jboss 2.1 and above</li> <li>Weblogic 5.1/6.0 session/entity beans using the weblogic.ejbc tool</li> + <li>IBM WebSphere 4.0</li> <li>TOPLink for WebLogic 2.5.1-enabled entity beans</li> </ul> @@ -557,6 +560,11 @@ any of these files are newer than the jar file the jar will be rebuilt otherwise a message is logged that the jar file is up to date.</p> +<p>The task uses the jakarta-bcel framework, to extract all dependent classes. This +means, that beside the classes, that are mentioned in the deployment descriptor, also +all classes, that these depend on, are automatically included in the jar file.</p> + + <h3>Naming Convention</h3> Ejbjar handles the processing of multiple beans, and it uses a set of naming @@ -645,8 +653,10 @@ <tr> <td valign="top">srcdir</td> <td valign="top">The base directory containing the .class files that - make up the bean. Note that this can be the same as - the descriptordir if all files are in the same directory + make up the bean. Included are the home- remote- pk- + and implementation- classes and all classes, that these + depend on. Note that this can be the same as the + descriptordir if all files are in the same directory tree.</td> <td valign="top" align="center">Yes</td> </tr> @@ -1127,6 +1137,140 @@ </pre> +<h3><a name="ejbjar_websphere">WebSphere element</a></h3> + +<p>The websphere element searches for the websphere specific deployment descriptors and +adds them to the final ejb jar file. Websphere has two specific desriptors for session +beans: +<ul> + <li>ibm-ejb-jar-bnd.xmi</li> + <li>ibm-ejb-jar-ext.xmi</li> +</ul> +and another two for container managed entity beans: +<ul> + <li>Map.mapxmi</li> + <li>Schema.dbxmi</li> +</ul> +In terms of WebSphere, the generation of container code and stubs is called <code>deployment</code>. +This step can be performed by the websphere element as part of the jar generation process. If the +switch <code>ejbdeploy</code> is on, the ejbdeploy tool from the websphere toolset is called for +every ejb-jar. Unfortunately, this step only works, if you use the ibm jdk. Otherwise, the rmic +(called by ejbdeploy) throws a ClassFormatError. Be sure to switch ejbdeploy off, if run ant with +sun jdk. +</p> + +<p> +For the websphere element to work, you have to provide a complete classpath, that contains all +classes, that are required to reflect the bean classes. For ejbdeploy to work, you must also provide +the classpath of the ejbdeploy tool (look at the examples below). +</p> + +<table border="1" cellpadding="2" cellspacing="0"> + <tr> + <td valign="top"><b>Attribute</b></td> + <td valign="top"><b>Description</b></td> + <td align="center" valign="top"><b>Required</b></td> + </tr> + <tr> + <td valign="top">destdir</td> + <td valign="top">The base directory into which the generated weblogic ready + jar files are deposited. Jar files are deposited in + directories corresponding to their location within the + descriptordir namespace. </td> + <td valign="top" align="center">Yes</td> + </tr> + <tr> + <td valign="top">ejbdeploy</td> + <td valign="top">Decides wether ejbdeploy is called. When you set this to true, + be sure, to run ant with the ibm jdk.</td> + <td valign="top" align="center">No, defaults to true</td> + </tr> + <tr> + <td valign="top">suffix</td> + <td valign="top">String value appended to the basename of the deployment + descriptor to create the filename of the WebLogic EJB + jar file.</td> + <td valign="top" align="center">No, defaults to '.jar'.</td> + </tr> + <tr> + <td valign="top">keepgeneric</td> + <td valign="top">This controls whether the generic file used as input to + ejbdeploy is retained.</td> + <td valign="top" align="center">No, defaults to false</td> + </tr> + <tr> + <td valign="top">alwaysrebuild</td> + <td valign="top">This controls whether ejbdeploy is called although no changes + have occured.</td> + <td valign="top" align="center">No, defaults to false</td> + </tr> + <tr> + <td valign="top">tempdir</td> + <td valign="top">A directory, where ejbdeploy will write temporary files</td> + <td valign="top" align="center">No, defaults to '_ejbdeploy_temp'.</td> + </tr> + <tr> + <td valign="top">dbName<br>dbSchema</td> + <td valign="top">These options are passed to ejbdeploy.</td> + <td valign="top" align="center">No</td> + </tr> + <tr> + <td valign="top">dbVendor</td> + <td valign="top">This option is passed to ejbdeploy. Valid options are for example: + <ul> + <li>SQL92</li> <li>SQL99</li> <li>DB2UDBWIN_V71</li> + <li>DB2UDBOS390_V6</li> <li>DB2UDBAS400_V4R5</li> <li>ORACLE_V8</li> + <li>INFORMIX_V92</li> <li>SYBASE_V1192</li> <li>MYSQL_V323</li> + </ul> + This is also used to determine the name of the Map.mapxmi and + Schema.dbxmi files, for example Account-DB2UDBWIN_V71-Map.mapxmi + and Account-DB2UDBWIN_V71-Schema.dbxmi. + </td> + <td valign="top" align="center">No</td> + </tr> + <tr> + <td valign="top">codegen<br>quiet<br>novalidate<br>noinform<br>trace<br> + use35MappingRules</td> + <td valign="top">These options are all passed to ejbdeploy. All options + except 'quiet' default to false.</td> + <td valign="top" align="center">No</td> + </tr> + <tr> + <td valign="top">rmicOptions</td> + <td valign="top">This option is passed to ejbdeploy and will be passed + on to rmic.</td> + <td valign="top" align="center">No</td> + </tr> +</table> + +<p>This example shows ejbjar being used to generate deployment jars for all deployment descriptors +in the descriptor dir:</p> + +<pre> + <ejbjar srcdir="${build.class}" descriptordir="etc/ejb"> + <include name="*-ejb-jar.xml"/> + <websphere dbvendor="DB2UDBOS390_V6" + ejbdeploy="true" + oldCMP="false" + tempdir="/tmp" + destdir="${dist.server}"> + <wasclasspath> + <pathelement location="${was4.home}/deploytool/itp/plugins/org.eclipse.core.boot/boot.jar"/> + <pathelement location="${was4.home}/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime/batch.jar"/> + <pathelement location="${was4.home}/lib/xerces.jar"/> + <pathelement location="${was4.home}/lib/ivjejb35.jar"/> + <pathelement location="${was4.home}/lib/j2ee.jar"/> + <pathelement location="${was4.home}/lib/vaprt.jar"/> + </wasclasspath> + <classpath> + <path refid="build.classpath"/> + </classpath> + </websphere> + <dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN" + location="${lib}/dtd/ejb-jar_1_1.dtd"/> + </ejbjar> +</pre> + <h3><a name="ejbjar_iplanet">iPlanet Application Server (iAS) element</a></h3> The <iplanet> nested element is used to build iAS-specific stubs and
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
