Return-Path:
Version @VERSION@ 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
- 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. 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 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.
+
+ 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
-$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 @@
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.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
+
+
+
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.
+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. +
+
+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. +
+ ++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. +
+ +Yes | +||
naming | +Controls the naming convention used to name generated + EJB jars. Please refer to the description above. | +No |
basejarname |