Mick,
From: "M.A.Dunphy" <[EMAIL PROTECTED]>
>
> You're a star!!!, but to be honest, I'm still slightly confused.
> ${ejbjar.generic.destdir} is infact ${lib.dir} (which is a directory and
not
> a specific file). Prior to building the ejbjar, other standard class jars
> are built and stored in ${lib.dir}. Thus before building the ejbjar,
other
> classes get compiled with a classpath containing any jar in ${lib.dir}.
But
> what I dont undertstand is, why would a compilation of a standard class
even
> go near any ejbjar jar file in ${lib.dir} and thus "lock" it for a while?
Your classpath, includes all jars in the lib.dir. Thus once your ejbjars
exist, they get
added to this classpath by the following
<path id="project.class.path" location="${lib.dir}/"
path="${java.class.path}/">
<fileset dir="${lib.dir}" includes="**/*.jar"/>
</path>
The order of the fileset is undefined, so the ejbjars may come first Now
lets say you recompile a bean which uses the remote interface from another
bean. That remote interface could be loaded from its ejb jar and not from
the another jar or a class file. I don't have the full details but you can
see what may be happening. It could also be that all jars on the classpath
are locked, even if they are not used. Not sure about that. Anyway, I guess
the general rule is not to put the generated jars into your classpath. We
generally have a "deployment" directory where only the ejbjars are written.
> Any how to resolve this, I've partitioned the lib dir into two sub
> directories, an ejb directory for ejb jar files and a common directory
which
> contains standard class jars.
>
> I think I've alot to learn about the internal workings of java, ant
> etc...!!!
I have to tell you that classpaths, classloaders and what happens when they
overlap is one of the more difficult things in Java to get right. I am
pretty sure I am going to do some work on Ant's classloader.
>
> PS: that path element. when runing ant, the directory in the fileset MUST
> exist before ant will run. It would be great if I could specify a
directory
> that gets created once ant runs?
Yes, I've run into that too and would like to change it so that the
directory check occurs at the time the fileset is used rather than when it
is declared. On my list following Ant 1.3 release.
Conor