tuscany-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Millies, Sebastian" <Sebastian.Mill...@softwareag.com>
Subject Get Contribution at runtime?
Date Wed, 28 Nov 2012 13:03:22 GMT
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.

Of course, that new classloader would need access to the current contribution
in order to resolve imports etc. 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

Mime
View raw message