You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Huang Kai <pr...@gmail.com> on 2007/05/31 11:38:51 UTC
How to add multiple contribution to tuscany?
Hi, all:
I got several question when looking into Tuscany's codes:
1)MULTIPLE CONTRIBUTION
IMO, a contribution is a deployment unit, so a domain should be allowed to have more than one contribution. While Tuscany only handles one contribution.
----------------------------------------------------------------------------------------------
DefaultSCADomain:
// Look for META-INF/sca-contribution.xml
contributionArtifactPath = Contribution.SCA_CONTRIBUTION_META;
contributionArtifactURL = classLoader.getResource(contributionArtifactPath);
-----------------------------------------------------------------------------------------------
Should it be "classLoader.getResources(contributionArtifactPath)" for multiple contributions?
And following codes doesn't handle multiple contribution neither. Like 'ContributionServiceImpl.addContribution', is called only once.
2)CONTRIBUTION META DOCUMENT MERGING
in SCA spec 1.10.2.2 write: "...accommodate this, it is also possible to have an identically structured document at META-INF/sca-contribution-generated.xml. If this document exists (or is generated on an as-needed basis), it will be merged into the contents of sca-contribution.xml, with the entries in sca-contribution.xml taking priority if there are any conflicting declarations."
Tuscany seems won't load sca-contribution-generated.xml if sca-contribution.xml exists.
3)CONTRIBUTION IMPORT/EXPORT
Tuscany do resolved 'import' and 'export' in 'sca-contribution.xml'. If only one contribution is resolved, as said in (1), import/export become meaningless.
4)CONTRIBUTION META EXTENSION
contribution meta document resolving hard-coded xml element name , not as extensible as DefaultURLArtifactProcessorExtensionPoint used else where.
see also SCA spec 1.10.2.2
"...For example, <export.java> can be used can be used to export java definitions, in which case the namespace should be a fully qualified package name."
Re: How to add multiple contribution to tuscany?
Posted by Luciano Resende <lu...@gmail.com>.
Huang Kai
Please see the following post [1] for more details on using
multiple contributions, it also gives you pointer for a sample that is
in my sandbox and use EmbeddedSCADomain with multiple contributions.
[1] http://www.mail-archive.com/tuscany-user%40ws.apache.org/msg01074.html
On 5/31/07, Luciano Resende <lu...@gmail.com> wrote:
> Hi Huang Kai, thanks for your interest and feedback, see my comments
> inline for the issues you mentioned, some are bugs, some are
> functionalities that are not yet implemented and it would be great if
> you would be interested in helping us get these implemented.
>
> On 5/31/07, Huang Kai <pr...@gmail.com> wrote:
> > Hi, all:
> >
> > I got several question when looking into Tuscany's codes:
> >
> > 1)MULTIPLE CONTRIBUTION
> >
> > IMO, a contribution is a deployment unit, so a domain should be allowed to have more than one contribution. While Tuscany only handles one contribution.
> >
> > ----------------------------------------------------------------------------------------------
> >
> > DefaultSCADomain:
> >
> > // Look for META-INF/sca-contribution.xml
> > contributionArtifactPath = Contribution.SCA_CONTRIBUTION_META;
> > contributionArtifactURL = classLoader.getResource(contributionArtifactPath);
> >
> > -----------------------------------------------------------------------------------------------
> >
> > Should it be "classLoader.getResources(contributionArtifactPath)" for multiple contributions?
> >
> > And following codes doesn't handle multiple contribution neither. Like 'ContributionServiceImpl.addContribution', is called only once.
> >
>
> This really depends on how the hosting environment discover all
> contributions and decide which ones to be added to the domain. I think
> there was a discussion thread on this subject, or if not, I'll start a
> new one.
>
> >
> >
> > 2)CONTRIBUTION META DOCUMENT MERGING
> >
> > in SCA spec 1.10.2.2 write: "...accommodate this, it is also possible to have an identically structured document at META-INF/sca-contribution-generated.xml. If this document exists (or is generated on an as-needed basis), it will be merged into the contents of sca-contribution.xml, with the entries in sca-contribution.xml taking priority if there are any conflicting declarations."
> >
> > Tuscany seems won't load sca-contribution-generated.xml if sca-contribution.xml exists.
>
> Yes, this is a bug, would you please raise a JIRA for it ? And it
> would be great if you want to help with a patch as well.
>
> >
> > 3)CONTRIBUTION IMPORT/EXPORT
> >
> > Tuscany do resolved 'import' and 'export' in 'sca-contribution.xml'. If only one contribution is resolved, as said in (1), import/export become meaningless.
>
> This import/export functionality is not fully implemented in Tuscany
> yet, there is a JIRA for this
> http://issues.apache.org/jira/browse/TUSCANY-1161.
>
> >
> > 4)CONTRIBUTION META EXTENSION
> >
> > contribution meta document resolving hard-coded xml element name , not as extensible as DefaultURLArtifactProcessorExtensionPoint used else where.
> >
> > see also SCA spec 1.10.2.2
> >
> > "...For example, <export.java> can be used can be used to export java definitions, in which case the namespace should be a fully qualified package name."
> >
>
> This is not implemented yet, any contribution on this and the other
> mentioned areas would be appreciated.
>
> --
> Luciano Resende
> Apache Tuscany Committer
> http://people.apache.org/~lresende
> http://lresende.blogspot.com/
>
--
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
Re: How to add multiple contribution to tuscany?
Posted by Jean-Sebastien Delfino <js...@apache.org>.
[snip]
Luciano Resende wrote:
> Hi Huang Kai, thanks for your interest and feedback, see my comments
> inline for the issues you mentioned, some are bugs, some are
> functionalities that are not yet implemented and it would be great if
> you would be interested in helping us get these implemented.
>
> On 5/31/07, Huang Kai <pr...@gmail.com> wrote:
>> Hi, all:
>>
>> I got several question when looking into Tuscany's codes:
>>
>> 1)MULTIPLE CONTRIBUTION
>>
>> IMO, a contribution is a deployment unit, so a domain should be
>> allowed to have more than one contribution. While Tuscany only
>> handles one contribution.
>>
>> ----------------------------------------------------------------------------------------------
>>
>>
>> DefaultSCADomain:
>>
>> // Look for META-INF/sca-contribution.xml
>> contributionArtifactPath =
>> Contribution.SCA_CONTRIBUTION_META;
>> contributionArtifactURL =
>> classLoader.getResource(contributionArtifactPath);
>>
>> -----------------------------------------------------------------------------------------------
>>
>>
>> Should it be "classLoader.getResources(contributionArtifactPath)" for
>> multiple contributions?
>>
>> And following codes doesn't handle multiple contribution neither.
>> Like 'ContributionServiceImpl.addContribution', is called only once.
>>
>
> This really depends on how the hosting environment discover all
> contributions and decide which ones to be added to the domain. I think
> there was a discussion thread on this subject, or if not, I'll start a
> new one.
>
A similar discussion has started on the tuscany-user list and I posted
some info on how to add multiple contributions to a domain there, see
this thread:
http://www.mail-archive.com/tuscany-user@ws.apache.org/msg01035.html
--
Jean-Sebastien
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
Re: How to add multiple contribution to tuscany?
Posted by Luciano Resende <lu...@gmail.com>.
Hi Huang Kai, thanks for your interest and feedback, see my comments
inline for the issues you mentioned, some are bugs, some are
functionalities that are not yet implemented and it would be great if
you would be interested in helping us get these implemented.
On 5/31/07, Huang Kai <pr...@gmail.com> wrote:
> Hi, all:
>
> I got several question when looking into Tuscany's codes:
>
> 1)MULTIPLE CONTRIBUTION
>
> IMO, a contribution is a deployment unit, so a domain should be allowed to have more than one contribution. While Tuscany only handles one contribution.
>
> ----------------------------------------------------------------------------------------------
>
> DefaultSCADomain:
>
> // Look for META-INF/sca-contribution.xml
> contributionArtifactPath = Contribution.SCA_CONTRIBUTION_META;
> contributionArtifactURL = classLoader.getResource(contributionArtifactPath);
>
> -----------------------------------------------------------------------------------------------
>
> Should it be "classLoader.getResources(contributionArtifactPath)" for multiple contributions?
>
> And following codes doesn't handle multiple contribution neither. Like 'ContributionServiceImpl.addContribution', is called only once.
>
This really depends on how the hosting environment discover all
contributions and decide which ones to be added to the domain. I think
there was a discussion thread on this subject, or if not, I'll start a
new one.
>
>
> 2)CONTRIBUTION META DOCUMENT MERGING
>
> in SCA spec 1.10.2.2 write: "...accommodate this, it is also possible to have an identically structured document at META-INF/sca-contribution-generated.xml. If this document exists (or is generated on an as-needed basis), it will be merged into the contents of sca-contribution.xml, with the entries in sca-contribution.xml taking priority if there are any conflicting declarations."
>
> Tuscany seems won't load sca-contribution-generated.xml if sca-contribution.xml exists.
Yes, this is a bug, would you please raise a JIRA for it ? And it
would be great if you want to help with a patch as well.
>
> 3)CONTRIBUTION IMPORT/EXPORT
>
> Tuscany do resolved 'import' and 'export' in 'sca-contribution.xml'. If only one contribution is resolved, as said in (1), import/export become meaningless.
This import/export functionality is not fully implemented in Tuscany
yet, there is a JIRA for this
http://issues.apache.org/jira/browse/TUSCANY-1161.
>
> 4)CONTRIBUTION META EXTENSION
>
> contribution meta document resolving hard-coded xml element name , not as extensible as DefaultURLArtifactProcessorExtensionPoint used else where.
>
> see also SCA spec 1.10.2.2
>
> "...For example, <export.java> can be used can be used to export java definitions, in which case the namespace should be a fully qualified package name."
>
This is not implemented yet, any contribution on this and the other
mentioned areas would be appreciated.
--
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org