On 6/7/07, Mike Edwards <[EMAIL PROTECTED]> wrote:

Folks,

I made an observation while debugging my composite loading code in the
Spring implementation that gave me pause for thought - and I'd like to
see if the code that handles contributions is behaving the way people
expect.

I found that in my test case, I am pointing explicitly at a particular
composite that I want to use with the test case.  However, the
contribution root is much higher up in the file system than the
composite file (org.apache.tuscany..... etc).

The contribution root is taken from the top of the directory tree and
the contribution handling code loads up everything it finds in the
(sub)tree.  It then resolves all of the artifacts it finds.  This is
done irrespective of whether the artifacts are going to be used.  In
particular, it resolves ALL composites found in the subtree - even if
they are not in practice going to get used.

Is this the desired behaviour?

Certainly, it implies a lot more work than necessary (it's equivalent to
eager loading of everything).  In a test situation it can be very
frustrating, since if anything in the contribution is in error in some
way, the error gets hit even if the test you're running has nothing to
do with it....

Comments, anyone?


I *think* this is working as designed though will have to leave the
explanations to those who've worked more closely with the contribution code,
but I agree can be not what you expect and I also find the testing problem
mentioned quite irritating sometimes. Would be good to find a way around
this, maybe the only solution is restructuring folders so there's only the
one composite going to be found?

  ...ant

Reply via email to