Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@jakarta.apache.org Received: (qmail 10697 invoked by uid 500); 30 Sep 2001 12:33:23 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: ant-dev@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 10688 invoked by uid 500); 30 Sep 2001 12:33:23 -0000 Delivered-To: apmail-jakarta-ant-cvs@apache.org Date: 30 Sep 2001 12:31:42 -0000 Message-ID: <20010930123142.20098.qmail@icarus.apache.org> From: conor@apache.org To: jakarta-ant-cvs@apache.org Subject: cvs commit: jakarta-ant/docs/manual/OptionalTasks ejb.html X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N conor 01/09/30 05:31:42 Modified: . Tag: ANT_14_BRANCH build.xml docs/manual/OptionalTasks Tag: ANT_14_BRANCH ejb.html Log: Descript ejbjar naming attribiute Revision Changes Path No revision No revision 1.175.2.11 +1 -1 jakarta-ant/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/jakarta-ant/build.xml,v retrieving revision 1.175.2.10 retrieving revision 1.175.2.11 diff -u -w -u -r1.175.2.10 -r1.175.2.11 --- build.xml 2001/08/30 12:39:39 1.175.2.10 +++ build.xml 2001/09/30 12:31:42 1.175.2.11 @@ -14,7 +14,7 @@ - + No revision No revision 1.8.2.1 +76 -15 jakarta-ant/docs/manual/OptionalTasks/ejb.html Index: ejb.html =================================================================== RCS file: /home/cvs/jakarta-ant/docs/manual/OptionalTasks/ejb.html,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -u -w -u -r1.8 -r1.8.2.1 --- ejb.html 2001/08/05 09:31:23 1.8 +++ ejb.html 2001/09/30 12:31:42 1.8.2.1 @@ -20,7 +20,7 @@

Version @VERSION@
-$Id: ejb.html,v 1.8 2001/08/05 09:31:23 conor Exp $ +$Id: ejb.html,v 1.8.2.1 2001/09/30 12:31:42 conor Exp $


Table of Contents

@@ -533,20 +533,6 @@
  • TOPLink for WebLogic 2.5.1-enabled entity beans
  • -

    This task supports two approaches to creating ejb jar files. The first -approach assumes a particular naming convention for deployment descriptor files. -For an Account bean, for example, the deployment descriptor would be named -Account-ejb-jar.xml. This naming convention allows the task to -distinguish deployment descriptors without relying on their positioning within a -source tree. It is also used to derive the name of the .jar file which is -generated. For the example this would be Account.jar. Vendor -specific files are assumed to be named in a similar fashion. The deployment -descriptor file which defines additional weblogic specific information for the -above bean would be Account-weblogic-ejb-jar.xml. The second -approach does not require a naming convention. This approach uses a specified a -jar name for the resultant ejb jar. If the jar name is present, then no naming -convention is required. If the jar name is not specified, then the default -naming convention is expected for the deployment descriptor files.

    The task works as a directory scanning task, and performs an action for each deployment descriptor found. As such the includes and excludes should be set @@ -571,6 +557,75 @@ 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.

    +

    Naming Convention

    + +Ejbjar handles the processing of multiple beans, and it uses a set of naming +conventions to determine the name of the generated EJB jars. The naming convention +that is used is controlled by the "naming" attribute. It supports the +following values +
      + +
    • descriptor
    • +

      This is the default naming scheme. The name of the generated bean is derived from the +name of the deployment descriptor. For an Account bean, for example, the deployment +descriptor would be named Account-ejb-jar.xml. Vendor specific descriptors are +located using the same naming convention. The weblogic bean, for example, would be named +Account-weblogic-ejb-jar.xml. Under this arrangment, the deployment descriptors +can be separated from the code implementing the beans, which can be useful whe the same bean code +is deployed in separate beans. +

      + +

      This scheme is useful when you are using one bean per EJB jar and where you may be +deploying the same bean classes in different beans, with different deployment characteristics. + +

    • ejb-name
    • +

      This naming scheme uses the <ejb-name> element from the deployment descriptor to +determine the bean name. In this situation, the descriptors normally use the generic +descriptor names, such as ejb-jar.xml along with any associated vendor specific descriptor +names. For example, If the value of the <ejb-name> were to be given in the deployment descriptor +as follows: +

        +<ejb-jar>
        +    <enterprise-beans>
        +        <entity>
        +            <ejb-name>Sample</ejb-name>
        +            <home>org.apache.ant.ejbsample.SampleHome</home>
        +
      + +then the name of the generated bean would be Sample.jar +

      +

      This scheme is useful where you want to use the standard deployment descriptor names, which may be more +compatible with other EJB tools. This scheme must have one bean per jar. +

      +
    • directory
    • +

      +In this mode, the name of the generated bean jar is derived from the directory +containing the deployment descriptors. Again the deployment descriptors typically use +the standard filenames. For example, if the path to the deployment descriptor is +/home/user/dev/appserver/dd/sample, then the generated +bean will be named sample.jar +

      +

      +This scheme is also useful when you want to use standard style descriptor names. It is often +most useful when the descriptors are located in the same directory as the bean source code, +although that is not mandatory. This scheme can handle multiple beans per jar. +

      + +
    • basejarname
    • +

      +The final scheme supported by the <ejbjar> task is used when you want to specify the generated +bean jar name directly. In this case the name of the generated jar is specified by the +"basejarname" attribute. Since all generated beans will have the same name, this task should +be only used when each descriptor is in its own directory. +

      + +

      +This scheme is most appropriate when you are using multiple beans per jar and only process a single +deployment descriptor. You typically want to specify the name of the jar and not derive it from the +beans in the jar. +

      + +

    Parameters:

    @@ -604,6 +659,12 @@ task is generating generic jars (i.e. no vendor-specific deployment elements have been specified). + + + + +
    Yes
    namingControls the naming convention used to name generated + EJB jars. Please refer to the description above.No
    basejarname