Re: Tutorial marketplace scenario ready

2008-04-19 Thread Jean-Sebastien Delfino

Antollini, Mario wrote:

Comments in-line...

Mario

-Original Message-
From: Jean-Sebastien Delfino [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 15, 2008 6:17 AM

To: tuscany-dev@ws.apache.org
Subject: Re: Tutorial marketplace scenario ready

Antollini, Mario wrote:

I have finished coding the tutorial marketplace scenario.

I have attached all the necessary files in
https://issues.apache.org/jira/browse/TUSCANY-2224
 

Mario, that looks pretty good, I just got it working :)

One minor comment:

MarketCatalogImpl could be simplified a bit to call   each catalog
once 

instead of twice.


OK, I can do it for sure. I did not focus on having an efficient
MarketCatalog implementation. But you are right, I need to fix that.


And some ideas:

- We could add more catalogs to the list (a local one, the Web service


ones, and the EJB catalog running on Geronimo) to really leverage the 
reference with multiplicity 0..n. We'd just need to change the
contents 
of the different catalogs (for example have fruits/vegetables from 
different places).


That raises an interesting question about the mix of bindings that can



be used on a reference with multiplicity 0..n. Can different targets
use 

different bindings or do they have to all use the same binding? I
think 

it's worth investigating.


I am glad that you brought this up. Actually, I struggled with this many
hours. At first, I tried to do what you suggested (having heterogeneous
bindings for the catalog reference). I wanted the Market catalog to bind
to the Fruit catalog locally (an internal component) and the Vegetables
one through web services. I tried very hard, but I did not manage to get
it working. I tried different approaches but none worked. Therefore I
decided to use bind to both the fruits and vegetables catalog through
web services (this worked right away).

Do you think this heterogeneous binding issue could be a Tuscany issue?


I think so. It would be worth double checking with the spec but I think 
that the following pattern:



  
  
  
  
  ...


should just work and for each target pick the binding that matches the 
target service binding. If it doesn't it's a bug, which can be fixed :)




- Use standalone  elements in a different .composite file in a 
different contribution to wire the goodsCatalog reference to the

catalogs.


IMO this is a typical scenario where people want to add catalogs
without 

changing the market contribution which has already been installed in
the 

domain.


I tried with the  element as well but it did not work either.


I think it's worth investigating. What error are you getting with wires?


However, I did not try with different composite files. Can you give me
more details about this, please?


The idea is that the wires can be put in any composite (you just need to 
add that composite to your domain):


- the composite containing the client component, this is very much like 
using the target attribute on its references


- the composite containing the target component, more interesting as it 
allows that new component to be wired to an existing component reference 
without touching the contribution containing that existing component.


- any other composite, even more interesting as it allows you to wire 
two components together without touching their contributions at all.




- Another idea, add a Web Service binding to your StoreMarket catalog 
component, add a markup to the prices, and that makes it a broker :)


Do you mean to expose the marketplace as a service using web services?


Yes, just add a  to it.




Thoughts?
--
Jean-Sebastien



--
Jean-Sebastien

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tutorial marketplace scenario ready

2008-04-15 Thread Antollini, Mario
Comments in-line...

Mario

-Original Message-
From: Jean-Sebastien Delfino [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 15, 2008 6:17 AM
To: tuscany-dev@ws.apache.org
Subject: Re: Tutorial marketplace scenario ready

Antollini, Mario wrote:
>> I have finished coding the tutorial marketplace scenario.
>>
>> I have attached all the necessary files in
>> https://issues.apache.org/jira/browse/TUSCANY-2224
>>  
>
> Mario, that looks pretty good, I just got it working :)
>
> One minor comment:
>
> MarketCatalogImpl could be simplified a bit to call   each catalog
once 
> instead of twice.

OK, I can do it for sure. I did not focus on having an efficient
MarketCatalog implementation. But you are right, I need to fix that.

> And some ideas:
>
> - We could add more catalogs to the list (a local one, the Web service

> ones, and the EJB catalog running on Geronimo) to really leverage the 
> reference with multiplicity 0..n. We'd just need to change the
contents 
> of the different catalogs (for example have fruits/vegetables from 
> different places).
>
> That raises an interesting question about the mix of bindings that can

> be used on a reference with multiplicity 0..n. Can different targets
use 
> different bindings or do they have to all use the same binding? I
think 
> it's worth investigating.

I am glad that you brought this up. Actually, I struggled with this many
hours. At first, I tried to do what you suggested (having heterogeneous
bindings for the catalog reference). I wanted the Market catalog to bind
to the Fruit catalog locally (an internal component) and the Vegetables
one through web services. I tried very hard, but I did not manage to get
it working. I tried different approaches but none worked. Therefore I
decided to use bind to both the fruits and vegetables catalog through
web services (this worked right away).

Do you think this heterogeneous binding issue could be a Tuscany issue?


> - Use standalone  elements in a different .composite file in a 
> different contribution to wire the goodsCatalog reference to the
catalogs.

> IMO this is a typical scenario where people want to add catalogs
without 
> changing the market contribution which has already been installed in
the 
> domain.

I tried with the  element as well but it did not work either.
However, I did not try with different composite files. Can you give me
more details about this, please?

> - Another idea, add a Web Service binding to your StoreMarket catalog 
> component, add a markup to the prices, and that makes it a broker :)

Do you mean to expose the marketplace as a service using web services?

> Thoughts?
> -- 
> 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]



Re: Tutorial marketplace scenario ready

2008-04-15 Thread Jean-Sebastien Delfino

Antollini, Mario wrote:

I have finished coding the tutorial marketplace scenario.

I have attached all the necessary files in
https://issues.apache.org/jira/browse/TUSCANY-2224



Mario, that looks pretty good, I just got it working :)

One minor comment:

MarketCatalogImpl could be simplified a bit to call   each catalog once 
instead of twice.


And some ideas:

- We could add more catalogs to the list (a local one, the Web service 
ones, and the EJB catalog running on Geronimo) to really leverage the 
reference with multiplicity 0..n. We'd just need to change the contents 
of the different catalogs (for example have fruits/vegetables from 
different places).


That raises an interesting question about the mix of bindings that can 
be used on a reference with multiplicity 0..n. Can different targets use 
different bindings or do they have to all use the same binding? I think 
it's worth investigating.


- Use standalone  elements in a different .composite file in a 
different contribution to wire the goodsCatalog reference to the catalogs.


IMO this is a typical scenario where people want to add catalogs without 
changing the market contribution which has already been installed in the 
domain.


- Another idea, add a Web Service binding to your StoreMarket catalog 
component, add a markup to the prices, and that makes it a broker :)


Thoughts?
--
Jean-Sebastien

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]