[
https://issues.apache.org/jira/browse/TUSCANY-2763?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Raymond Feng resolved TUSCANY-2763.
-----------------------------------
Resolution: Fixed
The fix has been checked in under r734063 in sca-java-1.x branch. To plug in
your own impl of ContributionClassLoaderProvider, register it with
META-INF/services/org.apache.tuscany.sca.contribution.java.ContributionClassLoaderProvider.
> Need a plug point to or a way to change the classloader which loads
> contribution classes or resources in a contribution
> -----------------------------------------------------------------------------------------------------------------------
>
> Key: TUSCANY-2763
> URL: https://issues.apache.org/jira/browse/TUSCANY-2763
> Project: Tuscany
> Issue Type: Bug
> Components: Java SCA Core Runtime
> Affects Versions: Java-SCA-1.3
> Environment: All
> Reporter: Rashmi Hunt
>
> Tuscany sets the contribution classloader in
> ClassReferenceModelResolver.ClassReferenceModelResolver() and
> need to way to use different classloader to load contribution
> classes/resources.
> Some discussion on the solution on Tuscany mailing list -->
> On Thu, Jan 8, 2009 at 9:54 AM, Rashmi Hunt <[email protected]> wrote:
> thanks for the steps. I will open a Jira for this work. One more question, is
> ContributionClassLoaderProvider a new class? I am looking at rev 726772 and I
> don't see this class.
>
> Regards
> Rashmi
> On Wed, Jan 7, 2009 at 1:58 PM, Raymond Feng <[email protected]> wrote:
> We probably need to do the following:
>
> 1) Define a SPI for
> org.apache.tuscany.sca.contribution.ContributionClassLoaderProvider
> 2) Provide a default implementation based on the ContributionClassLoader we
> have today
> 3) Change ClassReferenceModelResolver to use
> UtilityExtensionPoint.getUtility(ContributionClassLoaderProvider.class) to
> create the classloader for a given contribution instead of hard-coding the
> ContributionClassLoader. The later can be a default if no
> ContributionClassLoaderProvider impl is found
> 4) If you provide your own impl of ContributionClassLoaderProvider, register
> it with
> META-INF/services/org.apache.tuscany.sca.contribution.ContributionClassLoaderProvider
>
> Thanks,
> Raymond
> From: Rashmi Hunt
> Sent: Wednesday, January 07, 2009 1:45 PM
> To: [email protected]
> Subject: Re: ContributionClassLoader
> Thanks for looking into this. I am trying to get an understanding on the
> suggested solution. What it means is to have a new utility service
> ContributionClassLoaderProvider under
> modules/extensibility/src/main/resources/META-INF/services?
> How does this get associated with contribution classloader set in
> ClassReferenceModelResolver.ClassReferenceModelResolver() ? Also
> ContributionClassLoaderProvider will be a new class?
>
> Regards
> Rashmi
> On Wed, Jan 7, 2009 at 11:44 AM, Raymond Feng <[email protected]> wrote:
> Hi,
> It sounds reasonable to me that we should allow the Tuscany embedders to plug
> in their own Contribution classloading scheme. The classloader might be
> constructed based on the contribution graph with the import/export
> dependencies.
> I suggest that we add a new utility service such as
> ContributionClassLoaderProvider into our UtilityExtensionPoint. This way, it
> can be replaced with a customized ContributionClassLoaderProvider
> implementation.
> Thanks,
> Raymond
> From: Rashmi Hunt
> Sent: Wednesday, January 07, 2009 10:48 AM
> To: [email protected]
> Subject: ContributionClassLoader
> Need a plug point to or a way to change the classloader which loads
> contribution classes or resources in a contribution
> Hi
> Is there a way to change the classloader which loads contribution classes or
> resources in a contribution?
> Tuscany sets the contribution classloader in
> ClassReferenceModelResolver.ClassReferenceModelResolver() and
> is there anyway to use a different classloader?
> Regards
> Rashmi
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.