camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Moulliard <cmoulli...@gmail.com>
Subject Re: Transaction and Multicast() or to() AND to() ?
Date Tue, 19 May 2009 09:23:43 GMT
Hi Willem,

What do you mean here : "Current the JMS component doesn't provide the
transaction support the
InOut Message..." ? This text is not clear

Regards,

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com


On Tue, May 19, 2009 at 10:40 AM, Willem Jiang <willem.jiang@gmail.com>wrote:

> Just some notes:
> Current the JMS component doesn't provide the transaction support the
> InOut Message. Since if we don't commit the IN message , this message
> will not be consumed by its consumer, and it is impossible to get the
> response message back.
>
> Multicast supports to process the message parallelly. If enable this
> feature, Camel will use the thread pool to do the message processing
> work, and it can't be transactional.
>
> Willem
>
> Claus Ibsen wrote:
> > On Tue, May 19, 2009 at 9:58 AM, Charles Moulliard <cmoulliard@gmail.com>
> wrote:
> >> Thanks Claus.
> >>
> >> Additional question :
> >>
> >> Can  two routes be part of the same transaction ?
> > Yes as long as they run in the same thread, eg as you do link them with
> direct.
> > Do not use seda as it will break it into 2 threads.
> >
> > Spring TX manager uses the same thread for its TX management.
> >
> >
> >> ex :
> >>
> >> <route>
> >>     <from uri="activemq:queue:order.in"/>
> >>     <transacted/>
> >>     <to uri="bean:orderService?method=validate"/>
> >>     <to uri="direct:processOrder"/>
> >>  </route>
> >>
> >>  <route>
> >>     <from uri="direct:processOrder"/>
> >>     <to uri="bean:orderService?method=process"/>
> >>     <to uri="activemq:queue:order.out"/>
> >>  </route>
> >>
> >> Regards,
> >>
> >>
> >> Charles Moulliard
> >> Senior Enterprise Architect
> >> Apache Camel Committer
> >>
> >> *****************************
> >> blog : http://cmoulliard.blogspot.com
> >>
> >>
> >> On Tue, May 19, 2009 at 9:43 AM, Claus Ibsen <claus.ibsen@gmail.com>
> wrote:
> >>
> >>> On Tue, May 19, 2009 at 9:11 AM, Charles Moulliard <
> cmoulliard@gmail.com>
> >>> wrote:
> >>>> Hi,
> >>>>
> >>>> I would like to know if the transactional behavior of camel/spring
> will
> >>> be
> >>>> the same comparing the two next routes :
> >>>>
> >>>> 1) Multicast
> >>>>
> >>>> from()
> >>>> transacted()
> >>>> multicast(
> >>>> to(bean:update DB)
> >>>> to(queue:IN)
> >>>> )
> >>>>
> >>>> 2) To() and to()
> >>>>
> >>>> from()
> >>>> transacted()
> >>>> to(bean:update DB)
> >>>> to(queue:IN)
> >>>>
> >>> Yes the TX is the same.
> >>>
> >>>
> >>>> Does it make sense to multicast messages when we want that data
> >>>> updated/inserted DB are rollbacked if an error occurs during creation
> of
> >>> the
> >>>> message on the queue OR messages removed from the queue if an errors
> >>> occurs
> >>>> during DB update ?
> >>> Spring TX manager will rollback the TX if it was marked for rollback
> >>> or it caughts a runtime exception.
> >>> So whatever you from the transacted() onwards will occur in the same
> TX.
> >>>
> >>> Using either .to or .multicast has really nothing to do with TX.
> >>>
> >>> The former is the Pipes And Filters EIP where output from the previous
> >>> is input to the next and so forth.
> >>> The latter is the Recipient List EIP where you send the *same* message
> >>> to multiple recipients.
> >>>
> >>>
> >>>> Regards,
> >>>>
> >>>> Charles Moulliard
> >>>> Senior Enterprise Architect
> >>>> Apache Camel Committer
> >>>>
> >>>> *****************************
> >>>> blog : http://cmoulliard.blogspot.com
> >>>>
> >>>
> >>>
> >>> --
> >>> Claus Ibsen
> >>> Apache Camel Committer
> >>>
> >>> Open Source Integration: http://fusesource.com
> >>> Blog: http://davsclaus.blogspot.com/
> >>> Twitter: http://twitter.com/davsclaus
> >>>
> >
> >
> >
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message