You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by co...@locus.apache.org on 2000/07/20 15:25:52 UTC

cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb DDCreator.java Ejbc.java

conor       00/07/20 06:25:51

  Modified:    docs     index.html
               src/main/org/apache/tools/ant/taskdefs/optional/ejb
                        DDCreator.java Ejbc.java
  Added:       docs     ejb.html
  Log:
  Initial documentation on the EJB related optional tasks
  
  Revision  Changes    Path
  1.53      +1 -0      jakarta-ant/docs/index.html
  
  Index: index.html
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/docs/index.html,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- index.html	2000/07/20 12:50:33	1.52
  +++ index.html	2000/07/20 13:25:49	1.53
  @@ -3320,6 +3320,7 @@
     <li><a href="#renameexts">RenameExtensions</a></li>
     <li><a href="#script">Script</a></li>
     <li><a href="#vssget">VssGet</a></li>
  +  <li><a href="ejb.html">EJB Tasks</a></li>
   </ul>
   <hr>
   <h2><a name="netrexxc">NetRexxC</a></h2>
  
  
  
  1.1                  jakarta-ant/docs/ejb.html
  
  Index: ejb.html
  ===================================================================
  <html>
  
  <head>
  <meta http-equiv="Content-Language" content="en-us">
  <title>Ant EJB Tasks</title>
  
  </head>
  
  <body>
  
  <h1>Ant EJB Tasks User Manual</h1>
  <p>by</p>
  <!-- Names are in alphabetical order, on last name -->
  <ul>
    <li>Conor MacNeill (<a href="mailto:conor@cortexebusiness.com.au">conor@cortexebusiness.com.au</a>)</li>
  </ul>
  
  <p>Version 1.1 - 2000/07/18</p>
  <hr>
  <h2>Table of Contents</h2>
  <ul>
    <li><a href="#introduction">Introduction</a></li>
    <li><a href="#ejbtasks">EJB Tasks</a></li>
  </ul>
  
  <hr>
  <h2><a name="introduction">Introduction</a></h2>
  <p>Ant provides a number of optional tasks for developing 
  <a href="http://java.sun.com/products/ejb">Enterprise Java Beans (EJBs)</a>. 
  In general these tasks are specific to the particular vendor's EJB Server. At present the tasks support
  <a href="http://www.bea.com">Weblogic</a> 4.5.1 and 5.1 EJB servers. Over time we expect further optional tasks 
  to support additional EJB Servers. 
  
  <hr>
  <h2><a name="ejbtasks">EJB Tasks</a></h2>
  <table border="1" cellpadding="5">
   <tr><td>Task</td><td>Application Servers</td></tr>
   <tr><td><a href="#ddcreator">ddcreator</a></td><td>Weblogic 4.5</td></tr>
   <tr><td><a href="#ejbc">ejbc</a></td><td>Weblogic 4.5</td></tr>
   <tr><td><a href="#wlrun">wlrun</a></td><td>Weblogic 4.5</td></tr>
   <tr><td><a href="#wlstop">wlstop</a></td><td>Weblogic 4.5</td></tr>
   <tr><td><a href="#ejbjar">ejbjar</a></td><td>Weblogic 5.1</td></tr>
  </table>
  
  <hr>
  <h2><a name="ddcreator">ddcreator</a></h2>
  <h3><b>Description:</b></h3>
  <p>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. 
  
  
  <h3>Parameters:</h3>
  <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">descriptors</td>
      <td valign="top">This is the base directory from which descriptors are selected.</td>
      <td valign="top" align="center">Yes</td>
    </tr>
    <tr>
      <td valign="top">dest</td>
      <td valign="top">The directory where the serialised deployment descriptors will be written</td>
      <td valign="top" align="center">Yes</td>
    </tr>
    <tr>
      <td valign="top">classpath</td>
      <td valign="top">This is the classpath to use to run the underlying weblogic ddcreator tool. 
                       This must include the <code>weblogic.ejb.utils.DDCreator</code> class</td>
      <td valign="top" align="center">No</td>
    </tr>
  </table>
  <h3>Examples</h3>
  <pre>&lt;ddcreator descriptors=&quot;${dd.dir}&quot; 
             dest=&quot;${gen.classes}&quot; 
             classpath=&quot;${descriptorbuild.classpath}&quot;&gt;
    &lt;include name=&quot;*.txt&quot; /&gt;
  &lt;/ddcreator&gt;</code>
  </pre>
  
  <hr>
  <h2><a name="ejbc">ejbc</a></h2>
  <h3><b>Description:</b></h3>
  <p>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.
  <p>
  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 
  <code>include</code> and <code>exclude</code> constructs can be used to select the deployment descriptors
  to be included. 
  <p>
  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.
  <h3>Parameters:</h3>
  <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">descriptors</td>
      <td valign="top">This is the base directory from which the serialised deployment descriptors are selected.</td>
      <td valign="top" align="center">Yes</td>
    </tr>
    <tr>
      <td valign="top">dest</td>
      <td valign="top">The base directory where the generated classes, RIM stubs and RMI skeletons are written</td>
      <td valign="top" align="center">Yes</td>
    </tr>
    <tr>
      <td valign="top">manifest</td>
      <td valign="top">The name of a manifest file to be written. This manifest will contain an entry for each EJB processed</td>
      <td valign="top" align="center">Yes</td>
    </tr>
    <tr>
      <td valign="top">src</td>
      <td valign="top">The base directory of the source tree containing the source files of the home interface,
                       remote interface and bean implementation classes.</td>
      <td valign="top" align="center">Yes</td>
    </tr>
    <tr>
      <td valign="top">classpath</td>
      <td valign="top">This classpath must include both the <code>weblogic.ejbc</code> class and the
                       classfiles of the bean, home interface, remote interface, etc of the bean being
                       processed.</td>
      <td valign="top" align="center">No</td>
    </tr>
  </table>
  <h3>Examples</h3>
  <pre>&lt;ejbc descriptors=&quot;${gen.classes}&quot;
             src=&quot;${src.dir}&quot; 
             dest=&quot;${gen.classes}&quot;
             manifest=&quot;${build.manifest}&quot; 
             classpath=&quot;${descriptorbuild.classpath}&quot;&gt;
    &lt;include name=&quot;*.ser&quot; /&gt;
  &lt;/ejbc&gt;</code>
  </pre>
  
  <hr>
  <h2><a name="wlrun">wlrun</a></h2>
  <h3><b>Description:</b></h3>
  <p>This is an experimental task and is not currently documented.
  
  <hr>
  <h2><a name="wlstop">wlstop</a></h2>
  <h3><b>Description:</b></h3>
  <p>This is an experimental task and is not currently documented.
  
  <hr>
  <h2><a name="ejbjar">ejbjar</a></h2>
  <h3><b>Description:</b></h3>
  <p>Documentation is not currently available.
  
  </body>
  
  </html>
  
  
  
  
  
  1.3       +4 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DDCreator.java
  
  Index: DDCreator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DDCreator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DDCreator.java	2000/07/18 07:17:24	1.2
  +++ DDCreator.java	2000/07/20 13:25:50	1.3
  @@ -98,11 +98,13 @@
        * @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");
           }
  
  
  
  1.3       +6 -3      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/Ejbc.java
  
  Index: Ejbc.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/Ejbc.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Ejbc.java	2000/07/18 07:17:24	1.2
  +++ Ejbc.java	2000/07/20 13:25:50	1.3
  @@ -108,16 +108,19 @@
        * @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");
           }
  
  
  

EJB Documentation

Posted by Conor MacNeill <co...@m64.com>.
I have put together a first cut at documentation for the EJB related
optional tasks. I am intending to rewrite these tasks a little to take
advantage of the class loader I recently added. This should save creating a
VM for the helper tasks.

The wlrun and wlstop tasks really need the ability to run tasks
asynchronously, so I have not bothered to document these just yet.

I am hoping Tim Fennell can give me some docs for the ejbjar task. I will
probably need to use it soon too :-)

Conor


> -----Original Message-----
> From: conor@locus.apache.org [mailto:conor@locus.apache.org]
> Sent: Thursday, 20 July 2000 23:26
> To: jakarta-ant-cvs@apache.org
> Subject: cvs commit:
> jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb
> DDCreator.java Ejbc.java
>
>
> conor       00/07/20 06:25:51
>
>   Modified:    docs     index.html
>                src/main/org/apache/tools/ant/taskdefs/optional/ejb
>                         DDCreator.java Ejbc.java
>   Added:       docs     ejb.html
>   Log:
>   Initial documentation on the EJB related optional tasks
>