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
- one ClassLoader per Contribution
- and the ArtifactResolver can get the Contribution's ClassLoader passed to its constructor.

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]

Reply via email to