ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <>
Subject RE: WebLogic 4.x EJB Tasks
Date Mon, 10 Jul 2000 10:47:28 GMT

> From: Paul Hodgetts []
> I've been using the new WebLogic 4.x EJB tasks and I have a few
> comments/questions.  These tasks are very cool and help us out a
> whole lot with our builds.  Thank you!

Thanks for the feedback.

> DDCreator works great.  No issues there.
> Ejbc works well, with the following comments/questions:
> 1.  There are some command line parameters that are not passed in.
>      For example, -g -nowarn -debug can't be set.  -keepgenerated is
>      hard coded as always on.  I was playing around in EjbcHelper by
>      just putting them on the command line, and they seem to work
>      fine.  It looks pretty straightforward to pass them through (if
>      I understand the design).

I developed these tasks initially to serve the EJB builds we are doing at
Cortex without much regard for supporting all options. It shouldn't be hard
to add those options. The whole split between ejbc and ejbcHelper was done
for classpath reasons and I just put the things I needed into the interface.

I am happy if you want to make changes and submit patches.

> 2.  I was trying to add -compiler jikes to the EjbcHelper command
>      line, and it didn't work.  It seemed to generate the first bean
>      that it came across, but didn't continue on to any more.  I
>      think it may have something to do with how it's invoked, but I
>      don't understand it enough to know why and how to fix it.  The
>      reason I want to use Jikes is because Jikes is twice as fast as
>      the JDK compiler.  We have a lot of beans to generate, and it
>      cuts 5 minutes off a full build.

I haven't tried to use Jikes with ejbc. I have heard from someone who has
done it. They added

-compiler jikes


-classpath blah

If that works we would need to pass the classpath across the interface too.

> 3.  The task uses the -noexit parameter.  I don't see this
>      documented anywhere in the WebLogic docs.  Is this a secret
>      parameter?  I would guess it allows the VM to stay open, but
>      I've never seen it mentioned in the WebLogic stuff before.

OK, I saw it had been added to ddcreator and guessed it was also done for
ejbc. It worked. While I was reluctant to use an undocumented feature, I
think the ability to run multiple ejbcs in one VM was a performance gain.

The downside to the -noexit tag is that when it is used and there is a
problem ejbc swallows the exception that caused the error and throws a
simple exception to terminate. If you look at the code you will see that
when I catch an exception I rerun the last ejbc call without the -noexit
flag to get it to give me the real exception. It is a big ugly but it works.

> 4.  I'm not sure how the connection is made (if it is) between the
>      bean sources and the generated classes.  For example, if I have
>      the user written,, etc., how
>      does the Ejbc task know to regen if any of the user sources have
>      changed?  My suspicion is that this is difficult/impossible in a
>      generic way (without some naming conventions), so maybe I just
>      have to code up something custom for our situation.

EjbcHelper reads in the serialised deployment descriptor to discover the
interface names and class names including the bean class name. The generated
code class names is derived from the beanclass name. The derivation is
indeed based on the naming conventions used by Weblogic. Once I have all the
class names I can determine the source file names and check what things are
out of date. It is not truly generic but it does seem reasonably reliable.
Being able to avoid ejbc compiles cuts down build time in a major way.

> 5.  It seems like the Ejbc task using javac is noticeably slower
>      than when I was using the java task to fire it off (even with
>      javac as the compiler both ways).  Is it invoking ejbc in a
>      different way or am I just hallucinating?  ;-)

I think you are hallucinating :-). Seriously I can't think why it would be
slower. If you find something, let us know.

> Any insights into my questions would be appreciated.  As to the
> changes that I know how to do, what should I do next?  Do I make the
> changes and submit them to someone, or wait for someone else to make
> them, or what?  I'm new to this, so I'm not sure how to proceed.

Have a read of
It discusses how to submit patches. Then just jump in :-)


View raw message