You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Vamsavardhana Reddy <c1...@gmail.com> on 2009/03/16 12:48:07 UTC

Jar contribution processing question: Using URI "" to correspond to the jar itself

We have org.apache.tuscany.sca.contribution.processor.impl.JarContributionProcessor
to construct a list of URI's to artifacts in the jar file.  In case of
EJB jar files, in addition to the artifacts in the jar, the jar file
itself needs to be treated as an artifact since there are model
elements that are derived from the jar as a whole. I intend to use the
URI "" (empty string) to correspond to archive (right now, the empty
string URI has no special meaning). I don't see any problem with doing
so.  Wanted to get others comments and inputs to see if I have missed
out something.

++Vamsi

Re: Jar contribution processing question: Using URI "" to correspond to the jar itself

Posted by Vamsavardhana Reddy <c1...@gmail.com>.
There is no problem when the EJB jar is part of an EAR, since the list
of URI's from the EAR will have one URI corresponding to the EJB jar.
In case of standalone EJB jar, the idea is to have one URI pointing to
the jar itself so that a URLArtifactProcessor for .jar files will
introspect the EJB jar as a whole and gives back info on the EJBs
defined in the EJB jar. If we intend to introspect the EJB jar by
looking at the individual artifacts in the jar file, we may have to
create a lot of processing code similar to an EJB deployer.

On Tue, Mar 17, 2009 at 1:25 AM, Raymond Feng <en...@gmail.com> wrote:
> Why cannot you just use the URI for the nesting EJB jar?
>
> For example, if we have dummy myApp.ear contains myEJB.jar:
>
> myApp.ear
>   +--- META-INF/appllication.xml
>   +--- myEJB.jar
>          +--- META-INF/ejb-jar.xml
>          +--- a/b/MyEJB.class
>
> For the SCA contribution representing myApp.ear, we can have two options:
>
> Option 1: One flat ontribution with a list of artifacts:
>
> Two are top-level artifacts:
> 1. MEAT-INF/application.xml
> 2. myEJB.jar
>
> Any nesting artifacts under myEJB.jar, the URIs would be:
> 3. myEJB.jar!/META-INF/ejb-jar.xml
> 4. myEJB.jar!/a/b/MyEJB.class
>
> Option 2: Allow the Contribution model to have nesting Contributions
>
> Then the Contribution will contain two artifacts:
> 1. MEAT-INF/application.xml (An Artifact object)
> 2. myEJB.jar (which is a Contribution object)
>
> Thanks,
> Raymond
> --------------------------------------------------
> From: "Vamsavardhana Reddy" <c1...@gmail.com>
> Sent: Monday, March 16, 2009 4:48 AM
> To: <de...@tuscany.apache.org>
> Subject: Jar contribution processing question: Using URI "" to correspond to
> the jar itself
>
>> We have
>> org.apache.tuscany.sca.contribution.processor.impl.JarContributionProcessor
>> to construct a list of URI's to artifacts in the jar file.  In case of
>> EJB jar files, in addition to the artifacts in the jar, the jar file
>> itself needs to be treated as an artifact since there are model
>> elements that are derived from the jar as a whole. I intend to use the
>> URI "" (empty string) to correspond to archive (right now, the empty
>> string URI has no special meaning). I don't see any problem with doing
>> so.  Wanted to get others comments and inputs to see if I have missed
>> out something.
>>
>> ++Vamsi
>
>



-- 
Vamsi

Re: Jar contribution processing question: Using URI "" to correspond to the jar itself

Posted by Raymond Feng <en...@gmail.com>.
Why cannot you just use the URI for the nesting EJB jar?

For example, if we have dummy myApp.ear contains myEJB.jar:

myApp.ear
    +--- META-INF/appllication.xml
    +--- myEJB.jar
           +--- META-INF/ejb-jar.xml
           +--- a/b/MyEJB.class

For the SCA contribution representing myApp.ear, we can have two options:

Option 1: One flat ontribution with a list of artifacts:

Two are top-level artifacts:
1. MEAT-INF/application.xml
2. myEJB.jar

Any nesting artifacts under myEJB.jar, the URIs would be:
3. myEJB.jar!/META-INF/ejb-jar.xml
4. myEJB.jar!/a/b/MyEJB.class

Option 2: Allow the Contribution model to have nesting Contributions

Then the Contribution will contain two artifacts:
1. MEAT-INF/application.xml (An Artifact object)
2. myEJB.jar (which is a Contribution object)

Thanks,
Raymond
--------------------------------------------------
From: "Vamsavardhana Reddy" <c1...@gmail.com>
Sent: Monday, March 16, 2009 4:48 AM
To: <de...@tuscany.apache.org>
Subject: Jar contribution processing question: Using URI "" to correspond to 
the jar itself

> We have 
> org.apache.tuscany.sca.contribution.processor.impl.JarContributionProcessor
> to construct a list of URI's to artifacts in the jar file.  In case of
> EJB jar files, in addition to the artifacts in the jar, the jar file
> itself needs to be treated as an artifact since there are model
> elements that are derived from the jar as a whole. I intend to use the
> URI "" (empty string) to correspond to archive (right now, the empty
> string URI has no special meaning). I don't see any problem with doing
> so.  Wanted to get others comments and inputs to see if I have missed
> out something.
>
> ++Vamsi 


Re: Jar contribution processing question: Using URI "" to correspond to the jar itself

Posted by Vamsavardhana Reddy <c1...@gmail.com>.
On Mon, Mar 16, 2009 at 7:36 PM, Simon Laws <si...@googlemail.com> wrote:
> On Mon, Mar 16, 2009 at 11:48 AM, Vamsavardhana Reddy
> <c1...@gmail.com> wrote:
>> We have org.apache.tuscany.sca.contribution.processor.impl.JarContributionProcessor
>> to construct a list of URI's to artifacts in the jar file.  In case of
>> EJB jar files, in addition to the artifacts in the jar, the jar file
>> itself needs to be treated as an artifact since there are model
>> elements that are derived from the jar as a whole. I intend to use the
>> URI "" (empty string) to correspond to archive (right now, the empty
>> string URI has no special meaning). I don't see any problem with doing
>> so.  Wanted to get others comments and inputs to see if I have missed
>> out something.
>>
>> ++Vamsi
>>
>
> Hi Vamsi
>
> Is "" a valid URI?
>
> Simon
>
"" seems to be a valid relative path.  See [1].

[1] http://java.sun.com/j2se/1.5.0/docs/api/java/net/URI.html#URI(java.lang.String)

-- 
Vamsi

Re: Jar contribution processing question: Using URI "" to correspond to the jar itself

Posted by Simon Laws <si...@googlemail.com>.
On Mon, Mar 16, 2009 at 11:48 AM, Vamsavardhana Reddy
<c1...@gmail.com> wrote:
> We have org.apache.tuscany.sca.contribution.processor.impl.JarContributionProcessor
> to construct a list of URI's to artifacts in the jar file.  In case of
> EJB jar files, in addition to the artifacts in the jar, the jar file
> itself needs to be treated as an artifact since there are model
> elements that are derived from the jar as a whole. I intend to use the
> URI "" (empty string) to correspond to archive (right now, the empty
> string URI has no special meaning). I don't see any problem with doing
> so.  Wanted to get others comments and inputs to see if I have missed
> out something.
>
> ++Vamsi
>

Hi Vamsi

Is "" a valid URI?

Simon