You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Adam Hardy <ad...@cyberspaceroad.com> on 2002/12/12 17:01:52 UTC

ejbjar, weblogic tasks: where to put the JNDI info

I'm teaching myself EJB using Mastering EJB from Roman, and I'm just 
doing the 'hello world' EJB, the first project.

This is ant task I've composed, and I'm using weblogic7:

<target name="ejbjar"
         description="Make the EJB jar file">
   <mkdir  dir="${dist.home}"/>
   <ejbjar srcdir="${build.home}/classes"
           descriptordir="${descriptor.dir}"
           naming="ejb-name"
           dependency="none">
     <dtd publicId="-//Sun Microsystems, Inc.//.....blabla"
          location="${dtd.dir}/ejb-jar_2_0.dtd"/>
     <dtd publicId="-//BEA Systems, Inc.//DTD WebLogiblabla"
          location="${dtd.dir}/weblogic700/weblogic-ejb-jar.dtd"/>
     <weblogic destdir="${dist.home}" ejbcclass="weblogic.ejbc">
       <classpath refid="compile.classpath"/>
     </weblogic>
   </ejbjar>
   <echo  message="deployed jar to ${dist.home}"/>
</target>

There are 2 ejb-jar.xml files, one vanilla and one weblogic-ejb-jar.xml.

This makes 2 jar files, one called Hello.jar and one called null.jar 
which I don't understand. I think there should only be one.

Secondly the only reason for the existence of the weblogic-ejb-jar.xml 
is because I copied it from the book's sample files. It contains the 
JNDI declaration

<weblogic-ejb-jar>
  <weblogic-enterprise-bean>
   <ejb-name>Hello</ejb-name>
   <jndi-name>HelloHome</jndi-name>
   <local-jndi-name>HelloLocalHome</local-jndi-name>
  </weblogic-enterprise-bean>
</weblogic-ejb-jar>

Can't this JNDI stuff go in the generic ejb-jar.xml? Or is this just not 
possible in EJB2.0?


TIA


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>