Hi,

I think you already got it right. I want to contribute a processor to scan the classes to figure out available generated SDO factory interface/class. During the "read" phase, the processor will capture the classname by a naming pattern. The class will be loaded during "resolve" phase and the factory will be registered with a HelperContext.

I see two requirements here:
1) read: Pass in the URI of the artifact which can be used to derive the class name 2) resolve: Pass in a contribution classloader which can be used to resolve java classes

Thanks,
Raymond

----- Original Message ----- From: "Jean-Sebastien Delfino" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, April 17, 2007 11:22 AM
Subject: Re: Require more context for URLArtifactProcessorExtension.read()


Raymond Feng wrote:
Hi,

When I try to add a URLArtifactProcessorExtension to introspect java classes, I found it impossible to get the class name as only the URL of the class file is passed to the read() method. To provide such context, I suggest that we pass in the DeployedArtifact (which contains the URL) instead of URL to the read() method.

Do you agree or do you have a better way?

Thanks,
Raymond


Could you give more context as well? :) and describe what you're trying to do?

Are you trying to derive a class name from the file name? Are you going to load or read the class file and could you find the class name from its contents then?

It's a little difficult to try to answer without more context, but in general I would prefer for ArtifactProcessors not to have to know the structure of the Contribution or the DeployedArtifacts that represent it. If you need to know the base URL of the contribution and the path of the given Artifact inside it, then maybe we could pass these two parameters to the read() method, it would be better than passing the whole DeployedArtifact and have the read() method dig into it.

But again, before we do that, could you describe your use case? and then hopefully we can find a good solution for it. Thanks.

--
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to