L.S., If you are just using Camel to route between the endpoints, you don't need to use transactions at all. The transaction is normally started by the component (e.g. a JMS consumer endpoint can start a transaction when it reads the message off the queue). ServiceMix will select a flow appropriate for your MessageExchange automatically. In your case, the HTTP endpoint won't be starting a transaction so it will select the seda flow to convey the MessageExchange within the same container.
The other flows are mostly used for clustering JBI containers. If you are not doing that, you might as well disable these two flows (i.e. comment them out in the config file). I often do that in a production environment where they only have a single ServiceMix instance to slightly lower the footprint of the running container. Regards, Gert Vanthienen ------------------------ Open Source SOA: http://fusesource.com Blog: http://gertvanthienen.blogspot.com/ 2009/2/19 angeloNZ <[email protected]>: > > Hi, > > I'm a little confused about SM's Transactions and Flows and how it should be > applied to my simple use case: > > client -> http consumer -> camel -> http provider > external web service > > I will not be creating or routing to any activemq endpoints inside the Camel > component nor perform any database operations. I've read from the forum > that transactions depends on the choice of components as well as the choice > of flow to use. > > I've left my flow configuration as default ( SM 3.3 ) > <sm:broker> > <sm:securedBroker authorizationMap="#authorizationMap"> > <sm:flows> > <sm:sedaFlow /> > <sm:jmsFlow jmsURL="${activemq.url}" /> > <sm:jcaFlow connectionManager="#connectionManager" > jmsURL="${activemq.url}" /> > </sm:flows> > </sm:securedBroker> > </sm:broker> > > 1) Given my use case and my config, which flow type will be used by SM upon > receiving a client request? > 2) Will a transaction be automatically started and at which point will it > be created? > 3) Considering that my camel component will only be doing throttling and > routing to http endpoints, are transactions even necessary? > > After reading the http://servicemix.apache.org/transactions.html > transactions page and seeing the code examples, I got confused where to > code those in in relation to my use case. > > Appreciate any clarifications. Newbie here. Thanks! > > > > -- > View this message in context: > http://www.nabble.com/Transactions-and-Flows-for-my-use-case-tp22092994p22092994.html > Sent from the ServiceMix - User mailing list archive at Nabble.com. > >
