Re: Use EmbeddedScaDomain to deploy multiple contributions

2009-03-31 Thread Luciano Resende
On Tue, Mar 31, 2009 at 1:18 PM, Raymond Feng  wrote:
> Hi,
>
> The wire element has some errors:
>
>              Target="/StoreServiceComponent /StoreService"/>
>
> should be:
>
>             target="StoreServiceComponent /StoreService"/>
>

Good catch Raymond... but also no space on the target, right ?

 should be:

  



> Thanks,
> Raymond
>
> From: Dong Liu
> Sent: Tuesday, March 31, 2009 12:43 PM
> To: user@tuscany.apache.org
> Subject: Use EmbeddedScaDomain to deploy multiple contributions
>
>
> I tried to use Tuscany EmbeddedScaDomain to deploy multiple contributions
> which can share some common resources. Here are my contributions:
>
> Contribution A (http://inner) contains InnerComposite, looks like:
>
> http://www.osoa.org/xmlns/sca/1.0";
> targetNamespace="http://inner";
>  name="InnerComposite">
>  
>       
>       
>                       
>      
>  
> 
>
> Contribution B(http://outer) contains OuterComposite, looks like:
>
> http://www.osoa.org/xmlns/sca/1.0";
>   targetNamespace="http://hello";  xmlns:inner="http://inner";
>   name="OuterComposite">
>
>  
>  
>       
>       
>    
>              Target="/StoreServiceComponent /StoreService"/>
> 
>
> Both composites are declared as deployable. Contribution A is exported to
> namespace http://inner and contribution B imports it.
>
> The “Store” service is implemented using “COMPOSITE” Scope annotation, which
> is intend to provide a shareable store instance for other contributions such
> like B.
>
> However, I got a warning message when deploying B after contribution A is
> deployed successfully. The warning message is “Wire target not found :
> HelloComponent/Store”. It looks like the wire in one composite can’t link to
> components belongs to other composites.
>
> I can make contribution B deployed only by adding the “include” declaration.
> But I am not sure this will meet my requirement because now the "Store"
> service belongs to two composites.  The instance shouldn’t be shared among
> multiple composites since its scope is “COMPOSITE”.
>
> If there are other solutions for this problem?
>
>
> Thanks
>
> Dong
>



-- 
Luciano Resende
Apache Tuscany, Apache PhotArk
http://people.apache.org/~lresende
http://lresende.blogspot.com/


Re: Use EmbeddedScaDomain to deploy multiple contributions

2009-03-31 Thread Raymond Feng

Hi,

The wire element has some errors:

 

should be:

 

Thanks,
Raymond

From: Dong Liu
Sent: Tuesday, March 31, 2009 12:43 PM
To: user@tuscany.apache.org
Subject: Use EmbeddedScaDomain to deploy multiple contributions


I tried to use Tuscany EmbeddedScaDomain to deploy multiple contributions 
which can share some common resources. Here are my contributions:


Contribution A (http://inner) contains InnerComposite, looks like:

http://www.osoa.org/xmlns/sca/1.0"; 
targetNamespace="http://inner";

  name="InnerComposite">
 
   
   
   

  
  


Contribution B(http://outer) contains OuterComposite, looks like:

http://www.osoa.org/xmlns/sca/1.0";
   targetNamespace="http://hello";  xmlns:inner="http://inner";
   name="OuterComposite">

  
  
   
   

 


Both composites are declared as deployable. Contribution A is exported to 
namespace http://inner and contribution B imports it.


The “Store” service is implemented using “COMPOSITE” Scope annotation, which 
is intend to provide a shareable store instance for other contributions such 
like B.


However, I got a warning message when deploying B after contribution A is 
deployed successfully. The warning message is “Wire target not found : 
HelloComponent/Store”. It looks like the wire in one composite can’t link to 
components belongs to other composites.


I can make contribution B deployed only by adding the “include” declaration. 
But I am not sure this will meet my requirement because now the "Store" 
service belongs to two composites.  The instance shouldn’t be shared among 
multiple composites since its scope is “COMPOSITE”.


If there are other solutions for this problem?


Thanks

Dong 



Re: Use EmbeddedScaDomain to deploy multiple contributions

2009-03-31 Thread Luciano Resende
On Tue, Mar 31, 2009 at 12:43 PM, Dong Liu  wrote:
> I tried to use Tuscany EmbeddedScaDomain to deploy multiple contributions
> which can share some common resources. Here are my contributions:
>..
>
> Both composites are declared as deployable. Contribution A is exported to
> namespace http://inner and contribution B imports it.
>
> The “Store” service is implemented using “COMPOSITE” Scope annotation, which
> is intend to provide a shareable store instance for other contributions such
> like B.
>
> However, I got a warning message when deploying B after contribution A is
> deployed successfully. The warning message is “Wire target not found :
> HelloComponent/Store”. It looks like the wire in one composite can’t link to
> components belongs to other composites.
>
> I can make contribution B deployed only by adding the “include” declaration.
> But I am not sure this will meet my requirement because now the "Store"
> service belongs to two composites.  The instance shouldn’t be shared among
> multiple composites since its scope is “COMPOSITE”.
>
> If there are other solutions for this problem?
>
>

Have you looked into itest/contribution-import-export or
tutorial/store/assets ? It has couple examples related to what you are
doing.

One thing I didn't see in your e-mail is how you are using
sca-contribution.xml, that is the file that would tell the Tuscany
runtime to use a different contribution when resolving dependencies
(based on import/export from sca-contribution.xml)

>
>
>
> Thanks
>
>
>
> Dong
>



-- 
Luciano Resende
Apache Tuscany, Apache PhotArk
http://people.apache.org/~lresende
http://lresende.blogspot.com/


Use EmbeddedScaDomain to deploy multiple contributions

2009-03-31 Thread Dong Liu
I tried to use Tuscany EmbeddedScaDomain to deploy multiple contributions which 
can share some common resources. Here are my contributions:
 
Contribution A (http://inner) contains InnerComposite, looks like:
 
http://www.osoa.org/xmlns/sca/1.0"; 
targetNamespace="http://inner";
   name="InnerComposite">
  
     
    
    
   
    

 
Contribution B(http://outer) contains OuterComposite, looks like:
 
http://www.osoa.org/xmlns/sca/1.0";
    targetNamespace="http://hello"  xmlns:inner="http://inner";
    name="OuterComposite">
  
    
   
    
    
 
  
 
 
Both composites are declared as deployable. Contribution A is exported to 
namespace http://inner and contribution B imports it.
 
The “Store” service is implemented using “COMPOSITE” Scope annotation, which is 
intend to provide a shareable store instance for other contributions such like 
B.
 
However, I got a warning message when deploying B after contribution A is 
deployed successfully. The warning message is “Wire target not found : 
HelloComponent/Store”. It looks like the wire in one composite can’t link to 
components belongs to other composites. 
 
I can make contribution B deployed only by adding the “include” declaration. 
But I am not sure this will meet my requirement because now the "Store" service 
belongs to two composites.  The instance shouldn’t be shared among multiple 
composites since its scope is “COMPOSITE”. 
 
If there are other solutions for this problem? 
 
 
Thanks
 
Dong