camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmoulliard <cmoulli...@gmail.com>
Subject Re: Is it possible to send a message towards 2 endpoints but the message is unmarshalled for one of the two destinations ?
Date Wed, 16 Jul 2008 09:52:06 GMT

To be clear with what I understand by work in //, here is an explanation  :

from("file://temp").

The content of the file is send to A) and B) at the same time

(A) The bean will save the content and next we call unmarshal to transform
the XML into Java objects

.to("bean:saveContent").unmarshall().jaxb()

(B) The content of the file will be placed in the queue. 
.to("activemq:myqueue") 

Concerning the transactional aspect, iIf something goes wrong during the
processing of 
- (A) e.g. data could not be saved in the DB and/or JAXB generates an error
- OR (B) e.g. Message could not be save in the queue
rollback should occur in process (A) and/or (B) and the file not deleted by
example

Regards

Charles

James.Strachan wrote:
> 
> 2008/7/15 cmoulliard <cmoulliard@gmail.com>:
>>
>> Even if we achieve the same result, what you propose is not really //
>> because
>> 1st we call the bean to save the content and next we unmarshall it before
>> to
>> commit it in the queue.
> 
> Sorry you lost me there :). With transactions it doesn't much matter
> the steps in the flow; all that matters is that the entire route is
> atomic; all steps work or they all rollback.
> 
> 
>> Is there a wiki page describing which resources are transactional in
>> Camel ?
> 
> Currently the transactional resources are JPA, Hibernate, JMS and JDBC
> - using Spring's declarative transactions
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> Open Source Integration
> http://open.iona.com
> 
> 


-----
Enterprise Architect

Xpectis
12, route d'Esch
L-1470 Luxembourg

Phone +352 25 10 70 470
Mobile +352 621 45 36 22

e-mail : cmoulliard@xpectis.com
web site : www.xpectis.com 
-- 
View this message in context: http://www.nabble.com/Is-it-possible-to-send-a-message-towards-2-endpoints-but-the-message-is-unmarshalled-for-one-of-the-two-destinations---tp18315419s22882p18484070.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message