From 2cffdf83c1e63f292633305049f970290450238d Mon Sep 17 00:00:00 2001 From: Conor MacNeill Date: Thu, 20 Jul 2000 13:25:50 +0000 Subject: [PATCH] Initial documentation on the EJB related optional tasks git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@267808 13f79535-47bb-0310-9956-ffa450edef68 --- docs/ejb.html | 169 ++++++++++++++++++ docs/index.html | 1 + .../ant/taskdefs/optional/ejb/DDCreator.java | 6 +- .../tools/ant/taskdefs/optional/ejb/Ejbc.java | 9 +- 4 files changed, 180 insertions(+), 5 deletions(-) create mode 100644 docs/ejb.html diff --git a/docs/ejb.html b/docs/ejb.html new file mode 100644 index 000000000..2f2b73218 --- /dev/null +++ b/docs/ejb.html @@ -0,0 +1,169 @@ + + + + +Ant EJB Tasks + + + + + +

Ant EJB Tasks User Manual

+

by

+ + + +

Version 1.1 - 2000/07/18

+
+

Table of Contents

+ + +
+

Introduction

+

Ant provides a number of optional tasks for developing +Enterprise Java Beans (EJBs). +In general these tasks are specific to the particular vendor's EJB Server. At present the tasks support +Weblogic 4.5.1 and 5.1 EJB servers. Over time we expect further optional tasks +to support additional EJB Servers. + +


+

EJB Tasks

+ + + + + + + +
TaskApplication Servers
ddcreatorWeblogic 4.5
ejbcWeblogic 4.5
wlrunWeblogic 4.5
wlstopWeblogic 4.5
ejbjarWeblogic 5.1
+ +
+

ddcreator

+

Description:

+

ddcreator will compile a set of Weblogic text-based deployment descriptors into a serialized +EJB deployment descriptor. The selection of which of the text-based descriptors are to be compiled +is based on the standard Ant include and exclude selection mechanisms. + + +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + +
AttributeDescriptionRequired
descriptorsThis is the base directory from which descriptors are selected.Yes
destThe directory where the serialised deployment descriptors will be writtenYes
classpathThis is the classpath to use to run the underlying weblogic ddcreator tool. + This must include the weblogic.ejb.utils.DDCreator classNo
+

Examples

+
<ddcreator descriptors="${dd.dir}" 
+           dest="${gen.classes}" 
+           classpath="${descriptorbuild.classpath}">
+  <include name="*.txt" />
+</ddcreator>
+
+ +
+

ejbc

+

Description:

+

The ejbc task will run Weblogic's ejbc tool. This tool will take a serialised deployment descriptor, +examine the various EJB interfaces and bean classes and then generate the required support classes +necessary to deploy the bean in a Weblogic EJB container. This will include the RMI stubs and skeletons +as well as the classes which implement the bean's home and remote interfaces. +

+The ant task which runs this tool is able to compile several beans in a single operation. The beans to be +compiled are selected by including their serialised deployment descriptors. The standard ant +include and exclude constructs can be used to select the deployment descriptors +to be included. +

+Each descriptor is examined to determiune whether the generated classes are out of date and need to be +regenerated. The deployment descriptor is de-serialized to discover the home, remote and +implementation classes. The corresponding source files are determined and checked to see their +modification times. These times and the modification time of the serialised descriptor itself are +compared with the modification time of the generated classes. If the generated classes are not present +or are out of date, the ejbc tool is run to generate new versions. +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeDescriptionRequired
descriptorsThis is the base directory from which the serialised deployment descriptors are selected.Yes
destThe base directory where the generated classes, RIM stubs and RMI skeletons are writtenYes
manifestThe name of a manifest file to be written. This manifest will contain an entry for each EJB processedYes
srcThe base directory of the source tree containing the source files of the home interface, + remote interface and bean implementation classes.Yes
classpathThis classpath must include both the weblogic.ejbc class and the + classfiles of the bean, home interface, remote interface, etc of the bean being + processed.No
+

Examples

+
<ejbc descriptors="${gen.classes}"
+           src="${src.dir}" 
+           dest="${gen.classes}"
+           manifest="${build.manifest}" 
+           classpath="${descriptorbuild.classpath}">
+  <include name="*.ser" />
+</ejbc>
+
+ +
+

wlrun

+

Description:

+

This is an experimental task and is not currently documented. + +


+

wlstop

+

Description:

+

This is an experimental task and is not currently documented. + +


+

ejbjar

+

Description:

+

Documentation is not currently available. + + + + + + diff --git a/docs/index.html b/docs/index.html index bcb4a42a1..7d6efbb15 100644 --- a/docs/index.html +++ b/docs/index.html @@ -3320,6 +3320,7 @@ Reserved.

  • RenameExtensions
  • Script
  • VssGet
  • +
  • EJB Tasks

  • NetRexxC

    diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DDCreator.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DDCreator.java index 2ea1c6212..2c64913b7 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DDCreator.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DDCreator.java @@ -98,11 +98,13 @@ public class DDCreator extends MatchingTask { * @exception BuildException if someting goes wrong with the build */ public void execute() throws BuildException { - if (!descriptorDirectory.isDirectory()) { + if (descriptorDirectory == null || + !descriptorDirectory.isDirectory()) { throw new BuildException("descriptors directory " + descriptorDirectory.getPath() + " is not valid"); } - if (!generatedFilesDirectory.isDirectory()) { + if (generatedFilesDirectory == null || + !generatedFilesDirectory.isDirectory()) { throw new BuildException("dest directory " + generatedFilesDirectory.getPath() + " is not valid"); } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/Ejbc.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/Ejbc.java index ec14a8345..dba337ea6 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/Ejbc.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/Ejbc.java @@ -108,16 +108,19 @@ public class Ejbc extends MatchingTask { * @exception BuildException if someting goes wrong with the build */ public void execute() throws BuildException { - if (!descriptorDirectory.isDirectory()) { + if (descriptorDirectory == null || + !descriptorDirectory.isDirectory()) { throw new BuildException("descriptors directory " + descriptorDirectory.getPath() + " is not valid"); } - if (!generatedFilesDirectory.isDirectory()) { + if (generatedFilesDirectory == null || + !generatedFilesDirectory.isDirectory()) { throw new BuildException("dest directory " + generatedFilesDirectory.getPath() + " is not valid"); } - if (!sourceDirectory.isDirectory()) { + if (sourceDirectory == null || + !sourceDirectory.isDirectory()) { throw new BuildException("src directory " + sourceDirectory.getPath() + " is not valid"); }