Hi Vamsi,

In my opinion, it would be difficult to get this information in both the
read/resolve method of the ArtifactProcessor. Similar situation is noticed
in implementation.web and implementation.spring modules and they use
ComponentPreProcessor to overcome this situation. You might need to evaluate
this option for your scenario.

For using ComponentPreProcessor, you might need to implement the preProcess
callback method, which will be called after the resolve phase and before the
build phase of the composite as shown in the samples below.

Samples:
1.
https://svn.apache.org/repos/asf/tuscany/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementation.java
2.
https://svn.apache.org/repos/asf/tuscany/branches/sca-java-1.x/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/impl/WebImplementationImpl.java

On Mon, Apr 6, 2009 at 2:56 PM, Vamsavardhana Reddy <[email protected]>wrote:

> Hi,
>
> I am wondering if there is a way to know the URI of the artifact being read
> in a StAXArtifactProcessor.  For example, inside of
> JEEImplementationProcessor.read(XMLStreamReader reader) method, is there a
> way to know the URI of the document that is containing the xml fragment
> being read?  The reason in this case is that when archive attribute of
> implementation.jee element is empty, the implied value for archive is the
> archive containg the composite document defining the component.  If it is
> currently not possible, I appreciate if someone can suggest a direction on
> what is to be implemented to achieve this.
>
> ++Vamsi
>



-- 
Thanks & Regards,
Ramkumar Ramalingam

Reply via email to