Hello,
I have modified the composite for the store-market module. I had never
worked with multiplicity before. Thus, I need to some help to check if
this code is OK.
What I did was to modify the StoreMarketCatalog component from
<component name="StoreMarketCatalog">
...
<reference name="fruitsCatalog"
target="StoreSupplierFruitsCatalog"/> <reference
name="vegetablesCatalog" target="VegetablesCatalogWebService">
<binding.ws/>
</reference>
...
</component>
To
<component name="StoreMarketCatalog">
...
<reference name="GoodsCatalog" multiplicity="0..n"
target="StoreMarketFruitsCatalog01 VegetablesCatalogWebService01"/>
...
</component>
So, the relevant parts of the composite look like this now:
...
<component name="StoreMarketCatalog">
<implementation.java class="services.market.MarketCatalogImpl"/>
<property name="currencyCode">USD</property>
<service name="Catalog">
<t:binding.jsonrpc/>
</service>
<reference name="GoodsCatalog" multiplicity="0..n"
target="StoreMarketFruitsCatalog01 VegetablesCatalogWebService01"/>
<reference name="currencyConverter"
target="StoreMarketCurrencyConverter"/>
</component>
<component name="StoreMarketFruitsCatalog01">
<implementation.java class="services.FruitsCatalogImpl"/>
<property name="currencyCode">USD</property>
<reference name="currencyConverter"
target="StoreMarketCurrencyConverter"/>
</component>
<component name="VegetablesCatalogWebService01">
<binding.ws/>
</component>
...
Jean-Sebastien mentioned that the approach of hard-coding the components
in the composite would not be needed when using multiplicity. However,
the way I used multiplicity here still requires new stores to be added
to the composite whenever the store wants to add its catalog to the
marketplace.
Jean-Sebastien, is this what you had in mind when you mentioned
multiplicity or am I doing something wrong?
Regards,
Mario
-----Original Message-----
From: Antollini, Mario [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 27, 2008 6:28 PM
To: [email protected]
Subject: RE: Tutorial: Adding a Markeplace Scenario
Hello,
I have created the new module and called it "store-market" (I uploaded
it to JIRA: https://issues.apache.org/jira/browse/TUSCANY-2163)
As Jean-Sebastien suggested I took "store-merger" and modified it.
I now need to start working on the multiplicity 0..n instead of the
currently hardcoded references to two catalogs.
Regards,
Mario
-----Original Message-----
From: Jean-Sebastien Delfino [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 13, 2008 3:51 PM
To: [email protected]
Subject: Re: Tutorial: Adding a Markeplace Scenario
Antollini, Mario wrote:
> Hello jean-Sebastien,
>
>
>
> I was thinking about adding a Marketplace scenario to the Tutorial we
> will be presenting at JavaOne. By Marketplace I mean doing something
> similar to what Amazon does: offering third party retailers' products
> via Amazon's site.
>
>
>
> I think we can do that by offering multiple catalogs via a proxy
catalog
> which consolidates all of them (i.e. data federation).
>
>
>
> What do you think? I will be looking the tutorial in detail in order
to
> see how I can implement it.
>
>
>
> Regards,
>
> Mario
>
>
Good idea!
This could be a new module addition under java/sca/tutorial.
You could wire a list of catalogs to a catalog aggregator service
component for example, similar to what the current store-merger module
does but with a reference with multiplicity 0..n instead of the
currently hardcoded references to two catalogs.
The easiest is probably to copy one of the modules (store-merger for
example) into a new store-market or something like that as a starting
point, adjust the POM etc, submit that in a JIRA and then start making
the changes to turn it into a marketplace store.
Let us know if have any questions, issues, or need any help when you do
that.
Thanks!
--
Jean-Sebastien
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]