Millies, Sebastian wrote:
Hello there,

is there a way to find out the contribution of a class at runtime?

The reason I ask:

That way, I could include versions of libraries that differ from the Tuscany

runtime by NOT putting them in the contribution itself, but in some other place

over which I have full control (an  “endorsed” directory or some such).

I would then load them using my own EndorsedLibrariesClassloader at

runtime, after Tuscany has already started up all my components.

This seems like an interesting approach.  It could perhaps become part of
Tuscany if you're willing to contribute (no pun intended) the code.

Of course, that new classloader would need access to the current contribution

in order to resolve imports etc.

If the new classloader is just loading external libraries, why does it
need to resolve imports via the contribution?  Imports are only relevant
when you're loading contributions.

  Simon

In fact, it would probably best to simply extend

org.apache.tuscany.sca.contribution.java.impl.ContributionClassLoader

(which would be the one containing the object that functions as the client of

the library.)

However, ContributionClassLoader does not expose a public or protected getter

for its private contribution field. Would I have to modify the source (harmlessly,

in this case), or is there already some other API to find that contribution?

n  Sebastian

IDS Scheer Consulting GmbH
Geschäftsführer/Managing Directors: Michael Rehm, Ivo Totev
Sitz/Registered office: Altenkesseler Straße 17, 66115 Saarbrücken, Germany - Registergericht/Commercial register: Saarbrücken HRB 19681
*http://www.ids-scheer-consulting.com*


Reply via email to