You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by "Sharon.Yin" <yi...@chinasoftinc.com> on 2007/05/14 06:01:35 UTC

When a SE is consumer and provider in both

Hi, guys,

I'm trying to develop a SE which is a provider and consumer in the same
time, it receive request from BC and consume another SE to get a response,
then return final response to BC. Hence , in this case, I need to store the
income request ME1 to a Map, then create a new ME2 to send to another SE,
when getting the response of ME2, I find the ME1 from Map, copy the ME2.out
to ME1.out, then send back ME1 to BC.  Am I right? 

I found that in the source code of servicemix, there are some of the
components are those SEs which also consume other service , like
CacheComponent, but they all use the "sendSync()" or synchronous connection
with external service , so they don't have to store the former ME. 

Is it the only way? Or I can use the way I described above?

 

Thanks.

 


Re: When a SE is consumer and provider in both

Posted by yinwen fu <yw...@wiscom.com.cn>.
I have the same problem!I also need to send ME2 to different target  Endpoint
according as different
ME1.in.

Sharon Yin-2 wrote:
> 
> Hi, guys,
> 
> I'm trying to develop a SE which is a provider and consumer in the same
> time, it receive request from BC and consume another SE to get a response,
> then return final response to BC. Hence , in this case, I need to store
> the
> income request ME1 to a Map, then create a new ME2 to send to another SE,
> when getting the response of ME2, I find the ME1 from Map, copy the
> ME2.out
> to ME1.out, then send back ME1 to BC.  Am I right? 
> 
> I found that in the source code of servicemix, there are some of the
> components are those SEs which also consume other service , like
> CacheComponent, but they all use the "sendSync()" or synchronous
> connection
> with external service , so they don't have to store the former ME. 
> 
> Is it the only way? Or I can use the way I described above?
> 
>  
> 
> Thanks.
> 
>  
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/When-a-SE-is-consumer-and-provider-in-both-tf3750175s12049.html#a10614997
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: When a SE is consumer and provider in both

Posted by Guillaume Nodet <gn...@gmail.com>.
Take a look at servicemix-eip which contains code you can reuse
and that do exactly what you want.

On 5/14/07, Sharon.Yin <yi...@chinasoftinc.com> wrote:
>
> Hi, guys,
>
> I'm trying to develop a SE which is a provider and consumer in the same
> time, it receive request from BC and consume another SE to get a response,
> then return final response to BC. Hence , in this case, I need to store
> the
> income request ME1 to a Map, then create a new ME2 to send to another SE,
> when getting the response of ME2, I find the ME1 from Map, copy the
> ME2.out
> to ME1.out, then send back ME1 to BC.  Am I right?
>
> I found that in the source code of servicemix, there are some of the
> components are those SEs which also consume other service , like
> CacheComponent, but they all use the "sendSync()" or synchronous
> connection
> with external service , so they don't have to store the former ME.
>
> Is it the only way? Or I can use the way I described above?
>
>
>
> Thanks.
>
>
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Principal Engineer, IONA
Blog: http://gnodet.blogspot.com/