From 8226fd4264632a2aa259dfcfd21f5c55bd4460eb Mon Sep 17 00:00:00 2001 From: Conor MacNeill Date: Wed, 27 Jun 2001 12:48:33 +0000 Subject: [PATCH] iPlanet documentation for ejbjar and iplanet-ejbc tasks Submitted by: Martin Gee Greg Nelson git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269243 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/OptionalTasks/ejb.html | 291 ++++++++++++++++++++++++++++- 1 file changed, 288 insertions(+), 3 deletions(-) diff --git a/docs/manual/OptionalTasks/ejb.html b/docs/manual/OptionalTasks/ejb.html index 1282fb3eb..9265cd981 100644 --- a/docs/manual/OptionalTasks/ejb.html +++ b/docs/manual/OptionalTasks/ejb.html @@ -13,10 +13,14 @@ -

Version 1.1 - 2000/07/18

+

Version @VERSION@
+$Id$ +


Table of Contents

    @@ -39,9 +43,11 @@ to support additional EJB Servers. blgenclientBorland Application Server 4.5 ddcreatorWeblogic 4.5.1 ejbcWeblogic 4.5.1 - ejbjarNested Elements - weblogicWeblogic 5.1 & 6.0 + iplanet-ejbciPlanet Application Server 6.0 + ejbjarNested Elements borlandBorland Application Server 4.5 + iPlanetiPlanet Application Server 6.0 + weblogicWeblogic 5.1 & 6.0 wlrunWeblogic 4.5.1, 5.1 & 6.0 wlstopWeblogic 4.5.1, 5.1 & 6.0 @@ -152,6 +158,130 @@ or are out of date, the ejbc tool is run to generate new versions.

    </ejbc> +
    +

    +iplanet-ejbc

    + +

    +Description:

    +Task to compile EJB stubs and skeletons for the iPlanet Application Server +6.0. Given a standard EJB 1.1 XML descriptor as well as an iAS-specific +EJB descriptor, this task will generate the stubs and skeletons required +to deploy the EJB to iAS. Since the XML descriptors can include multiple +EJBs, this is a convenient way of specifying many EJBs in a single Ant +task. +

    For each EJB specified, the task will locate the three classes that +comprise the EJB in the destination directory. If these class files +cannot be located in the destination directory, the task will fail. The +task will also attempt to locate the EJB stubs and skeletons in this directory. +If found, the timestamps on the stubs and skeletons will be checked to +ensure they are up to date. Only if these files cannot be found or if they +are out of date will the iAS ejbc utility be called to generate new stubs +and skeletons. +

    +Parameters:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AttributeDescriptionRequired
    ejbdescriptorStandard EJB 1.1 XML descriptor (typically titled "ejb-jar.xml").Yes
    iasdescriptoriAS-specific EJB XML descriptor (typically titled "ias-ejb-jar.xml).Yes
    destThe is the base directory where the RMI stubs and skeletons +are written. In addition, the class files for each bean (home interface, +remote interface, and EJB implementation) must be found in this directory.Yes
    classpathThe classpath used when generating EJB stubs and skeletons. +If omitted, the classpath specified when Ant was started will be used. +Nested "classpath" elements may also be used.No
    keepgeneratedIndicates whether or not the Java source files which are +generated by ejbc will be saved or automatically deleted. If "yes", the +source files will be retained. If omitted, it defaults to "no". No
    debugIndicates whether or not the ejbc utility should log additional debugging +statements to the standard output. If "yes", the additional debugging statements +will be generated. If omitted, it defaults to "no". +
    No
    +
    iashomeMay be used to specify the "home" directory for this iAS installation. +This is used to find the ejbc utility if it isn't included in the user's +system path. If specified, it should refer to the "[install-location]/iplanet/ias6/ias" +directory. If omitted, the ejbc utility must be on the user's system path. No
    + +

    +Examples

    + +
    <iplanet-ejbc ejbdescriptor="ejb-jar.xml"
    +              iasdescriptor="ias-ejb-jar.xml"
    +              dest="${build.classesdir}" 
    +              classpath="${ias.ejbc.cpath}" />
    +
    +<iplanet-ejbc ejbdescriptor="ejb-jar.xml"
    +              iasdescriptor="ias-ejb-jar.xml"
    +              dest="${build.classesdir}" 
    +              keepgenerated="yes"
    +              debug="yes"
    +              iashome="${ias.home}" >
    +              <classpath>
    +                  <pathelement path="." />
    +                  <pathelement path="${build.classpath}" />
    +              </classpath>
    +</iplanet-ejbc>
    +
    +
    +

    wlrun

    Description:

    @@ -854,6 +984,161 @@ This will create only one TOPLink-enabled ejb jar file - 'Address.jar'.

    </ejbjar> + +

    +iPlanet Application Server (iAS) element

    +The <iplanet> nested element is used to build iAS-specific stubs and +skeletons and construct a JAR file which may be deployed to the iPlanet +Application Server 6.0. The build process will always determine if +the EJB stubs/skeletons and the EJB-JAR file are up to date, and it will +do the minimum amount of work required. +

    Like the WebLogic element, a naming convention for the EJB descriptors +is most commonly used to specify the name for the completed JAR file. +For example, if the EJB descriptor ejb/Account-ejb-jar.xml is found in +the descriptor directory, the iplanet element will search for an iAS-specific +EJB descriptor file named ejb/Account-ias-ejb-jar.xml (if it isn't found, +the task will fail) and a JAR file named ejb/Account.jar will be written +in the destination directory. Note that when the EJB descriptors +are added to the JAR file, they are automatically renamed META-INF/ejb-jar.xml +and META-INF/ias-ejb-jar.xml. +

    Of course, this naming behavior can be modified by specifying attributes +in the ejbjar task (for example, basejarname, basenameterminator, and flatdestdir) +as well as the iplanet element (for example, suffix). Refer to the +appropriate documentation for more details. +

    +Parameters:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AttributeDescriptionRequired
    destdirThe base directory into which the generated JAR files will +be written. Each JAR file is written in directories which correspond to +their location within the "descriptordir" namespace.Yes
    classpathThe classpath used when generating EJB stubs and skeletons. +If omitted, the classpath specified in the "ejbjar" parent task will be +used. If specified, the classpath elements will be prepended to the +classpath specified in the parent "ejbjar" task. Note that nested "classpath" +elements may also be used.No
    keepgeneratedIndicates whether or not the Java source files which are +generated by ejbc will be saved or automatically deleted. If "yes", the +source files will be retained. If omitted, it defaults to "no". No
    debugIndicates whether or not the ejbc utility should log additional debugging +statements to the standard output. If "yes", the additional debugging statements +will be generated. If omitted, it defaults to "no". No
    iashomeMay be used to specify the "home" directory for this iAS installation. +This is used to find the ejbc utility if it isn't included in the user's +system path. If specified, it should refer to the [install-location]/iplanet/ias6/ias +directory. If omitted, the ejbc utility must be on the user's system +path. No
    suffixString value appended to the JAR filename when creating each JAR. +If omitted, it defaults to ".jar". No
    + +

    As noted above, the iplanet element supports additional <classpath> +nested elements. +

    +Examples

    +This example demonstrates the typical use of the <iplanet> nested element. +It will name each EJB-JAR using the "basename" prepended to each standard +EJB descriptor. For example, if the descriptor named "Account-ejb-jar.xml" +is processed, the EJB-JAR will be named "Account.jar" +
        <ejbjar srcdir="${build.classesdir}"
    +            descriptordir="${src}" >
    +            <iplanet destdir="${assemble.ejbjar}"
    +                     classpath="${ias.ejbc.cpath}" />
    +            <include name="**/*-ejb-jar.xml"/>
    +            <exclude name="**/*ias-*.xml"/>
    +    </ejbjar>
    +This example demonstrates the use of a nested classpath element as well +as some of the other optional attributes. +
        <ejbjar srcdir="${build.classesdir}"
    +            descriptordir="${src}" >
    +            <iplanet destdir="${assemble.ejbjar}"
    +                     iashome="${ias.home}"
    +                     debug="yes" 
    +                     keepgenerated="yes" >
    +                     <classpath>
    +                         <pathelement path="." />
    +                         <pathelement path="${build.classpath}" />
    +                     </classpath>
    +            </iplanet>
    +            <include name="**/*-ejb-jar.xml"/>
    +            <exclude name="**/*ias-*.xml"/>
    +    </ejbjar>
    +This example demonstrates the use of basejarname attribute. In this +case, the completed EJB-JAR will be named "HelloWorld.jar" If multiple +EJB descriptors might be found, care must be taken to ensure that the completed +JAR files don't overwrite each other. +
        <ejbjar srcdir="${build.classesdir}"
    +            descriptordir="${src}"
    +            basejarname="HelloWorld" >
    +            <iplanet destdir="${assemble.ejbjar}"
    +                     classpath="${ias.ejbc.cpath}"/>
    +            <include name="**/*-ejb-jar.xml"/>
    +            <exclude name="**/*ias-*.xml"/>
    +    </ejbjar>
    +This example demonstrates the use of the dtd nested element. If the +[iAS-install-directory]/APPS directory is included in the classpath, these +local DTDs will be automatically referenced even without the nested +elements. +
        <ejbjar srcdir="${build.classesdir}"
    +            descriptordir="${src}" > 
    +            <iplanet destdir="${assemble.ejbjar}"            >
    +                     classpath="${ias.ejbc.cpath}" />
    +            <include name="**/*-ejb-jar.xml"/>
    +            <exclude name="**/*ias-*.xml"/>
    +            <dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"
    +                 location="${ias.home}/APPS/ejb-jar_1_1.dtd"/>
    +            <dtd publicId="-//Sun Microsystems, Inc.//DTD iAS Enterprise JavaBeans 1.0//EN"
    +                 location="${ias.home}/APPS/IASEjb_jar_1_0.dtd"/>
    +    </ejbjar>