Comments inline... On 4/24/07, Jean-Sebastien Delfino <[EMAIL PROTECTED]> wrote:
Luciano Resende wrote: >> I was thinking that Class loading would be the responsibility of the >> ArtifactResolver. So, we wouldn't need a ClassLoader, we would call >> ArtifactResolver.resolve() to get the Class, like for all other >> artifacts resolved in an SCA contribution. > > I think that the packageProcessor should be the one creating the > necessary > contribution classLoader, but how does the resolver will get a > reference to > it ? > > I can have it done if you haven't started it yet.... > I have started to put together a class that we can use as a key to resolve classes, I'll commit it soon and then if you want I leave the rest to you :) With respect to passing a classloader to the DefaultArtifactResolver, here's what I think: SimpleRuntimeImpl currently creates a single DefaultArtifactResolver, independent of any SCA Contribution. This works for now as SimpleRuntimeImpl only handles a single Contribution, but what we really need is: - one ArtifactResolver per Contribution
How are you going to resolve things external to the contribution then ? Let's say on the case of import/exports ? - one ClassLoader per Contribution +1 - and the ArtifactResolver can get the Contribution's ClassLoader passed
to its constructor.
+1 I'm not sure if having the PackageProcessor create the ClassLoader is
the best solution as the hosting environment needs to have a say with respect to which ClassLoader is used for what, but I guess we can start with that approach at least now to make progress, and change later when we have a better idea of how this fits with the various hosting environments. -- Jean-Sebastien --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Luciano Resende http://people.apache.org/~lresende
