Rob van Oostrum <[EMAIL PROTECTED]> wrote:

> I've done scarier things with reflection than this, and I wouldn't
> categorize them as "extremely" slow.

Sure - my "extremely slow" was to contrast this with 

stubName = dirName + "_" + fileWithouExtension + "_Stub" + ".class";

which will be a lot faster than using reflection 8-)

Let's take a step back here and think about why we need the name of
the _Stub and _Tie files.

There are two reasons:

(1) Avoid running rmic on classes that are up to date - seems as if
rmic would take care of this itself in the -iiop and -idl cases,
that's why it supports the -always switch.  Performing a test based on
reflection in Ant to avoid invoking rmic (which will run the same test
again if Ant determines it has to run) may create more overhead and
take more time than running rmic in the -iiop and -idl cases
unconditionally (which we have to do for -idl anyway).

(2) Supporting the -keep switch - Ant copies the generated .java files
back to the directory given in the sourcebase attribute.  Here we
really need this feature.  Funny nobody has complained that
soourcebase and iiop don't work in combination for Ant 1.3's rmic
task, guess nobody is using it.

For (2) we need to implement the reflection version - no other
solution here.  And we need to note that Ant doesn't support -keep for
-idl without -iiop (where it doesn't make sense anyway).

For (1) I'm rather leaning towards invoking rmic unconditionally,
especially since we'll be getting bug reports that iiopopts="-always"
doesn't work as expected otherwise.

Stefan

Reply via email to