Hi Conor,
Hi all,

I just have successfuly tested the newest version of the ejbjar
task. Everything worked very good, and I have already switched
our team to this version, as it brings us back to the main road.

I still have to points to ask for comments:

1.      The EJB jars do only contain the 'normal' ejb files. The
        ejbc compiler does need access to other classes. Thats
        the point where the 'classpath' attribute comes in handy.

        As of now, this leads to a fork of the java task. Is this
        realy needed? Isn't there this new classloader feature?

        Not to fork would give us a BIG performance hit!

2.      There is a register call to make a DTD known:

      handler.registerResourceDTD(
                "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN",
            "/weblogic/ejb/deployment/xml/ejb-jar.dtd");

        The location of the dtd file is hardcoded an assumes the default
        installation location of weblogic.

        Should not be this registerFileDTD ?

3.      I patched the sources a little bit to make my initial source
        tree possible.

        a) changed registerResourceDTD to registerFileDTD
        b) added setter for user specific placement of dtd file
        c) added extraction of ejb-name from ejb-jar.xml
        d) added search for 'weblogic-ejb-jar.xml' if
           /<Name>-weblogic-ejb-jar.xml' not found. The file
         has to be in the same directory as ejb-jar.xml

        With this you can have your directory structure like this:

        <base>/**/person/Person.java
        <base>/**/person/PersonBean.java
        <base>/**/person/PersonPK.java
        <base>/**/person/PersonHome.java
        <base>/**/person/META-INF/ejb-jar.xml
        <base>/**/person/META-INF/weblogic-ejb-jar.xml

        And create the bean jar with

      <ejbjar srcdir="${dir.build.javac}">
        <weblogic destdir="${dir.dist}"
                  classpath="${classpath.run}"
                  keepgeneric="true"

dtdlocation="${weblogic.home}/classes/weblogic/ejb/deployment/xml/ejb-jar.dt
d"
                  suffix="EJB.jar"/>
         <include name="**/ejb-jar.xml"/>
         <exclude name="**/weblogic-ejb-jar.xml"/>
      </ejbjar>

The diffs are attached. Please comment.

Thanxs + Greetinx,

        Wolfgang

Attachment: DescriptorHandler.diff
Description: Binary data

Attachment: GenericDeploymentTool.diff
Description: Binary data

Attachment: WeblogicDeploymentTool.diff
Description: Binary data

Reply via email to