ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ventimiglia, David" <David.Ventimig...@msdw.com>
Subject RE: EjbJar
Date Wed, 18 Oct 2000 15:43:29 GMT
Thanks!  That helped a lot, specifically the part about excluding the
weblogic xml files.  A more thorough reading of the API docs for EjbJar and
of the source code makes it clear that EjbJar looks for the weblogic
descriptors based on a "simple naming scheme" derived from the name of the
ejb descriptor.  
 
Now, however, I need to figure out two things.  
 
1. Why does EjbJar need to establish a socket connection to java.sun.com?
Because of this, I had to modify the ant script to include httpProxy.host
and httpProxy.port properties when invoking the jvm to run ant.  I suspect
it's because of this external entity in my ejb-jar.xml file, referring to
the DTD:
 
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>

Is this strictly necessary?
 
2. Why does EjbJar run so slowly?  A set of targets which manually jars the
class files and then runs weblogic.ejbc to create the ejb jar runs in about
40 seconds on my machine.  What's bad is that it doesn't do timestamp
checking, and so runs every time.  Using the ejbjar task is better because
it only runs when the timestamps have changed, but what's bad is that it
takes about 2 1/2 minutes to run!  Does anyone know why this might be?  I'm
going to spend some time with a profiler and see if I can figure it out.
 
Thanks!

-----Original Message-----
From: Dan Smith [mailto:dan.smith@globalone.net]
Sent: Tuesday, October 17, 2000 8:28 AM
To: ant-user@jakarta.apache.org
Subject: Re: EjbJar


Ok, I had the exact same problem and here are a couple of suggestions: 

First:  Are you using the latest 1.2 build? 


Second:  Are the weblogic classes in you ant execution classpath?  It was
explained to me by Conor MacNeil, who is the person writing the ejbjar
stuff, that "You need to make sure the weblogic classes are in the classpath
you use to run ant since the parsing which requires the DTD is done in the
ant task before it forks a new VM to run the ejbc task." 


Third:  Use the 'excludes' tag to exclude the 'weblogic-ejb-jar.xml' file.
This one gave me some troubles until Conor came to the rescue and pointed
out that "ejbjar does not process the weblogic xml files directly but rather
by their association with a standard deployment descriptor." 


Basically, this is what his code snippet looks like: 
    <ejbjar descriptordir="${dd.webshop.dir}" 
            srcdir="${build.classes}" 
            flatDestDir="true"> 
       <weblogic destdir="${deployment.webshop.dir}" 
                 keepgeneric="false" 
                 suffix=".jar" 
                 classpath="${descriptorbuild.classpath}"/> 
       <include name="**/*-ejb-jar.xml"/> 
       <exclude name="**/*-weblogic-ejb-jar.xml"/> 
    </ejbjar> 


I tried it and it worked fine for me.  Hope this helps. 


Dan 


-- 
"Sometimes I wish I could be you, just so I could be friends with me."
                -- Agelica Pickles 
  


Mime
View raw message