You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Tim Fennell <TF...@sapient.com> on 2000/07/11 17:15:39 UTC

Submission: EJB task for EJB1.1and weblogic 5.1

It's been a busy week, but here is an updated task for EJB1.1 and Weblogic
5.1. 

I'd like to stress that this can build generic EJB1.1 jars just as easily as
the weblogic jars. And should be very extensible to build for other
environments.....it should really just be the case of embedding the right
deployment descriptors etc.

The newer version (for those that looked at the last one) has the following
improvements:
 - Uses an inner class to implement the sax handler interfaces through
HandlerBase. Much cleaner.
 - Uses a less restrictive naming convention for finding the weblogic
deployment descriptors, so it is now easier to do multi-bean jars.
 - Will not try to embed primitive wrapper classes in the JAR if they are
specified as the primary key for a bean
 - generateweblogic is defaulted to false. The reason for this is, I'm
looking at adding functionality for other appservers (JBoss specifically) so
each appserver generation will default to false.

Conor: As far as I'm concerned this is ready for committing into the
optional.ejb package. The following line should be added to
defaults.properties:
  ejbjar=org.apache.tools.ant.taskdefs.optional.ejb.EjbJar

No changes are necessary to the build files. Since it uses the java task
(which uses reflection to find the weblogic classes) it will build fine
without weblogic. It will, however, exception if you try to use it without
weblogic, and the generateweblogic attribute set to true.

The following is an expanded out (no properties used) copy of my usage of
ejbjar:

  <target name="ejbs" depends="compile">
    <ejbjar srcdir="classes"
             destdir="$classes"
              generateweblogic="true"
               keepgeneric="false"
                genericjarsuffix="-temp.jar"
                 weblogicjarsuffix=".jar"
                  basenameterminator="-">
      <include name="**/*-ejb-jar.xml"/>
      <exclude name="**/*weblogic*.xml"/>
    </ejbjar>
  </target>

I'll be looking to submit the following in the next week or so:
 - Documentation for the usage doc
 - Patches to allow more options to be passed to weblogic.ejbc
 - Patch to allow generation of all Jars to one directory instead of a
hierarchy

-t