You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by rijeshmenon <ri...@yahoo.co.in> on 2009/11/24 09:53:06 UTC

Using exchange send b/w cxf bc and cxf se .

We have a SA having the below flow:

CXF BC -> CXF SE-> JMS BC

the message exchange between the cxf bc and cxf se is IN-Only.(configured
using wsdl in the BC).
Can this IN-Only exchange be accessed from within the cxf se pojo class so
that we can reuse it to send it to the JMS BC.(some processing need to be
done on the message received at the pojo side) or should we always create a
new exchange from the pojo for forwarding to another service.????
Basically i want to use only one exchange for all of my messages.
-- 
View this message in context: http://old.nabble.com/Using-exchange-send-b-w-cxf-bc-and-cxf-se-.-tp26492470p26492470.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Using exchange send b/w cxf bc and cxf se .

Posted by Freeman Fang <fr...@gmail.com>.
On 2009-11-24, at 下午6:42, rijeshmenon wrote:

>
> Okies...Thanks
>
> To make my case more clear,see the case below:
>
> BC1(original message exchange)==>SU1<==>BC2==>SU2(SU1 forward reply  
> got from
> BC2 to SU2)
>
>
> Inside the SU1,its not mere forwarding,
> 1) SU1 send the message got from the BC1(as In-Only) to another BC2  
> (as
> In-Out).
> 2) Receive back the reply inside SU1 and then send that reply  
> message to
> SU2.Its here i was trying to reuse the original In-only exchange.
>
> SU1 thus has 2 send process,first send to a BC (In-out) and then on
> receiving the reply send to SU2(in-Only).(so cant avoid SU1)
>
>
> Please let me know your comments.Should i drop the idea to reuse the  
> in-only
> exchange.??
>
Hi,

In any case, reuse the message exchange is impossible IMHO. You have  
to extract the message exchange(SU1 receiving from BC2) content and  
set it to another new created message exchange.

Moreover, instead of trying to reuse this message exchnage, you should  
set DONE status to the message exchange in your SU1 after receiving  
from BC2 and send this message exchange with DONE status to BC2 to let  
the NMR know one message exchange lifecycle is done.

Freeman
>
>
>
>
>
> Freeman Fang wrote:
>>
>> Yeah.
>>
>> And moreover,  let's assume the flow is
>>
>> bc endpoint su(which send original message exchange)===>
>> SU1==(forward)==> SU2
>>
>> here SU1 receive the message exchange, and want to forward it to the
>> SU2. Here SU1 is a provider(like a server) when  receive the message
>> exchange from bc endpoint su, but is a consumer(like a client) when
>> send the message exchange to SU2, it's different role.
>>
>> If you only want SU1 just do some forward work(I mean not touch the
>> real message content), why not you send just the message exchange
>> directly from bc endpoint su to SU2?
>>
>> Freeman
>> On 2009-11-24, at 下午5:23, rijeshmenon wrote:
>>
>>>
>>> so does that mean that if have a SA with multiple SU and we need to
>>> pass one
>>> attachment.Then when passing the message from one SU to another we
>>> need to
>>> extract content from the received message and then create a new
>>> exchange and
>>> set this content and then forward it to the next SU.
>>> In that case a exchange is valid only between two SU's and cannot be
>>> forwarded further.is my understanding right sir??
>>>
>>> -- 
>>> View this message in context:
>>> http://old.nabble.com/Using-exchange-send-b-w-cxf-bc-and-cxf-se-.-tp26492470p26492797.html
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>
>>
>> -- 
>> Freeman Fang
>> ------------------------
>> Open Source SOA: http://fusesource.com
>>
>>
>>
>
> -- 
> View this message in context: http://old.nabble.com/Using-exchange-send-b-w-cxf-bc-and-cxf-se-.-tp26492470p26493723.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>


-- 
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com


Re: Using exchange send b/w cxf bc and cxf se .

Posted by rijeshmenon <ri...@yahoo.co.in>.
Okies...Thanks

To make my case more clear,see the case below:

BC1(original message exchange)==>SU1<==>BC2==>SU2(SU1 forward reply got from
BC2 to SU2)    


Inside the SU1,its not mere forwarding,
1) SU1 send the message got from the BC1(as In-Only) to another BC2 (as
In-Out).
2) Receive back the reply inside SU1 and then send that reply message to
SU2.Its here i was trying to reuse the original In-only exchange.

SU1 thus has 2 send process,first send to a BC (In-out) and then on
receiving the reply send to SU2(in-Only).(so cant avoid SU1)


Please let me know your comments.Should i drop the idea to reuse the in-only
exchange.??






Freeman Fang wrote:
> 
> Yeah.
> 
> And moreover,  let's assume the flow is
> 
> bc endpoint su(which send original message exchange)===>  
> SU1==(forward)==> SU2
> 
> here SU1 receive the message exchange, and want to forward it to the  
> SU2. Here SU1 is a provider(like a server) when  receive the message  
> exchange from bc endpoint su, but is a consumer(like a client) when  
> send the message exchange to SU2, it's different role.
> 
> If you only want SU1 just do some forward work(I mean not touch the  
> real message content), why not you send just the message exchange  
> directly from bc endpoint su to SU2?
> 
> Freeman
> On 2009-11-24, at 下午5:23, rijeshmenon wrote:
> 
>>
>> so does that mean that if have a SA with multiple SU and we need to  
>> pass one
>> attachment.Then when passing the message from one SU to another we  
>> need to
>> extract content from the received message and then create a new  
>> exchange and
>> set this content and then forward it to the next SU.
>> In that case a exchange is valid only between two SU's and cannot be
>> forwarded further.is my understanding right sir??
>>
>> -- 
>> View this message in context:
>> http://old.nabble.com/Using-exchange-send-b-w-cxf-bc-and-cxf-se-.-tp26492470p26492797.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
> 
> 
> -- 
> Freeman Fang
> ------------------------
> Open Source SOA: http://fusesource.com
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Using-exchange-send-b-w-cxf-bc-and-cxf-se-.-tp26492470p26493723.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Using exchange send b/w cxf bc and cxf se .

Posted by Freeman Fang <fr...@gmail.com>.
Yeah.

And moreover,  let's assume the flow is

bc endpoint su(which send original message exchange)===>  
SU1==(forward)==> SU2

here SU1 receive the message exchange, and want to forward it to the  
SU2. Here SU1 is a provider(like a server) when  receive the message  
exchange from bc endpoint su, but is a consumer(like a client) when  
send the message exchange to SU2, it's different role.

If you only want SU1 just do some forward work(I mean not touch the  
real message content), why not you send just the message exchange  
directly from bc endpoint su to SU2?

Freeman
On 2009-11-24, at 下午5:23, rijeshmenon wrote:

>
> so does that mean that if have a SA with multiple SU and we need to  
> pass one
> attachment.Then when passing the message from one SU to another we  
> need to
> extract content from the received message and then create a new  
> exchange and
> set this content and then forward it to the next SU.
> In that case a exchange is valid only between two SU's and cannot be
> forwarded further.is my understanding right sir??
>
> -- 
> View this message in context: http://old.nabble.com/Using-exchange-send-b-w-cxf-bc-and-cxf-se-.-tp26492470p26492797.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>


-- 
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com


Re: Using exchange send b/w cxf bc and cxf se .

Posted by rijeshmenon <ri...@yahoo.co.in>.
so does that mean that if have a SA with multiple SU and we need to pass one
attachment.Then when passing the message from one SU to another we need to
extract content from the received message and then create a new exchange and
set this content and then forward it to the next SU.
In that case a exchange is valid only between two SU's and cannot be
forwarded further.is my understanding right sir??

-- 
View this message in context: http://old.nabble.com/Using-exchange-send-b-w-cxf-bc-and-cxf-se-.-tp26492470p26492797.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Using exchange send b/w cxf bc and cxf se .

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

I think you miss my reply to your previous mail thread with title  
"Reusing same message exchange for different message/service."

No, you do need create a new exchange for each message as  the message  
exchange has certain life cycle (something like status ACTIVE/DONE),  
so you can't use one message exchange for all your messages. Also each  
MessageExchange instance has unique exchangeId, it's really designed  
to use as one "Message Exchange".

Freeman

On 2009-11-24, at 下午4:53, rijeshmenon wrote:

>
> We have a SA having the below flow:
>
> CXF BC -> CXF SE-> JMS BC
>
> the message exchange between the cxf bc and cxf se is IN-Only. 
> (configured
> using wsdl in the BC).
> Can this IN-Only exchange be accessed from within the cxf se pojo  
> class so
> that we can reuse it to send it to the JMS BC.(some processing need  
> to be
> done on the message received at the pojo side) or should we always  
> create a
> new exchange from the pojo for forwarding to another service.????
> Basically i want to use only one exchange for all of my messages.
> -- 
> View this message in context: http://old.nabble.com/Using-exchange-send-b-w-cxf-bc-and-cxf-se-.-tp26492470p26492470.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>


-- 
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com