Hi,

There is a general issue as I try to deal with some OSGi artifacts in the 2.x stream. Simply speaking, an artifact in the SCA contribution can be potentially handled by more than one URLArtifactProcessors. For example, the jar can be either an EJB jar or an OSGi bundle. Also for .xml files, it can be many types.

In the current code, we register the URLArtifactProcessor against the artifacts based on the names of the artifact URI/URL. In 1.x, the artifact type is either a file extension or file name and the processors are keyed by the artifact type. As a result, only one processor will be picked. In 2.x, I add the wildcard support which allows more than one processors to match the same artifact (I probably have to allow more than one processors to be invoked). Meanwhile, the URLArtifactProcessor should be implemented to tolerate the artifacts whose content cannot be processed. In such cases, null should be returned and the next matching processor can deal with it.

Thanks,
Raymond
--------------------------------------------------
From: "Simon Laws" <[email protected]>
Sent: Thursday, March 26, 2009 5:40 AM
To: "tuscany-dev" <[email protected]>
Subject: [1.x] Jar artifact processing

With the new composite.jee functionality, jars found inside
contributions are processed by the EjbArchiveProcessor. There is a
validation test that has an OSGi jar in the contribution but which
isn't an EJB jar. This is still picked up by the EjbArchiveProcessor
and if falls over as, in my case, contribution.jee.impl isn't on the
classpath. Should EjbArchiveProcessor process all jars?

Simon

Reply via email to