On Mon, Apr 6, 2009 at 10:12 AM, Claus Ibsen <claus.ib...@gmail.com> wrote: > Hi > > Background is CAMEL-1475, however the ticket title is a bit misleading > > This morning I got Camel to be able to use transacted routes without > you have to remember to configure a transactedErrorHandler. > This makes it a bit easier to use transacted routes in Camel. > > So what you must do is use the *policy* DSL to define that this route > is transacted. > It still requires all the spring XML gobble to setup the TX manager > and all that verbose XML you cannot remember. > We can look at improving this later, want to keep the two of them > separated to not loose oversight. > > What I wants to discuss is that I think the *policy* DSL keyword is a > bit too loose. I would like it to be renamed to something that states > its transacted, eg > a) transacted > b) transaction > c) transactedPolicy > d) transactionPolicy > > As the JMS component have a special *transacted* URI option, I would > like the DSL to use same name as well. > So I am in favor of option A. I have worked a bit more on this. We keep the policy as is as it can be used for generic wrapping routes by an interceptor. We can use this for security stuff as well.
I have instead added - transacted() - transacted(String ref) to the ProcessorDefinition so we in the Java DSL can indicate the route is transacted using a key word that states this than eg just policy. I am also working on being able to auto lookup the PROPAGATION_REQUIRED so you dont even have to specify a reference. Camel will just use the one found, if there are ONLY ONE TransactedPolicy bean defined in the registry. Next up is to be able to default to find the PlatformManager and just use a default REQUIRED policy so we dont even have to setup the PROPAGATION_REQUIRED bean in the XML. This will make it a bit easier to configure, then you just have to remember all the standard Spring TX XML stuff and then Camel can use it out of the box. Just you remember to add the *transacted* DSL in the route. PS: We could even consider adding a *transacted=true* pseudo URI option on DefaultComponent that will automatically added a *transacted* DSL to the route. Well just a whacky idea. > > CAMEL-1475 also hints some more improvements we can do with convention > over configuration, eg if there is only one SpringTransactionPolicy in > the XML then use that. > > > > -- > Claus Ibsen > Apache Camel Committer > > Open Source Integration: http://fusesource.com > Blog: http://davsclaus.blogspot.com/ > Twitter: http://twitter.com/davsclaus > Apache Camel Reference Card: > http://refcardz.dzone.com/refcardz/enterprise-integration > -- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus Apache Camel Reference Card: http://refcardz.dzone.com/refcardz/enterprise-integration