You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by javamonkey79 <ja...@gmail.com> on 2013/06/06 20:30:43 UTC

inherit\extend camel context?

I have some boiler plate code that is needed in several camel context's, is
there a way to inherit\extend from a parent camel context? If not, is there
any other way to include boiler plate stuff, perhaps with aspects?

 I have something like this copied across many routes:

		<onException>
			<exception>java.lang.Throwable</exception>
			<redeliveryPolicy redeliveryDelay="1000" maximumRedeliveries="1" />
			<bean ref="exceptionToAlertConverter" />
			<to uri="direct:alerter" />
		</onException>
		<route id="alerterRoute">
			<from uri="direct:alerter" />
			<transacted ref="propagationNotSupportedTransactionPolicy" />
			<to uri="someBroker://Alerter" />
		</route>



--
View this message in context: http://camel.465427.n5.nabble.com/inherit-extend-camel-context-tp5733964.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: inherit\extend camel context?

Posted by javamonkey79 <ja...@gmail.com>.
https://issues.apache.org/jira/browse/CAMEL-3870 voted for.

Thanks.



--
View this message in context: http://camel.465427.n5.nabble.com/inherit-extend-camel-context-tp5733964p5733982.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: inherit\extend camel context?

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Yeah there is a JIRA ticket about having re-useable <routeContext>
where you can have context scoped error handlers and whatnot.



On Thu, Jun 6, 2013 at 11:38 PM, javamonkey79 <ja...@gmail.com> wrote:
> I can from a technical perspective, but from a time perspective I don't have
> time to go back and re-write it all in java dsl. Are there plans on adding
> this as a feature, I'm not seeing it in Jira?
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/inherit-extend-camel-context-tp5733964p5733972.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: inherit\extend camel context?

Posted by javamonkey79 <ja...@gmail.com>.
I can from a technical perspective, but from a time perspective I don't have
time to go back and re-write it all in java dsl. Are there plans on adding
this as a feature, I'm not seeing it in Jira?



--
View this message in context: http://camel.465427.n5.nabble.com/inherit-extend-camel-context-tp5733964p5733972.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: inherit\extend camel context?

Posted by Christian Müller <ch...@gmail.com>.
Can you use the Java DSL? In this case, you can use inheritance...

Best,

Christian Müller
-----------------

Software Integration Specialist

Apache Camel committer: https://camel.apache.org/team
V.P. Apache Camel: https://www.apache.org/foundation/
Apache Member: https://www.apache.org/foundation/members.html

https://www.linkedin.com/pub/christian-mueller/11/551/642


On Thu, Jun 6, 2013 at 8:30 PM, javamonkey79 <ja...@gmail.com> wrote:

> I have some boiler plate code that is needed in several camel context's, is
> there a way to inherit\extend from a parent camel context? If not, is there
> any other way to include boiler plate stuff, perhaps with aspects?
>
>  I have something like this copied across many routes:
>
>                 <onException>
>                         <exception>java.lang.Throwable</exception>
>                         <redeliveryPolicy redeliveryDelay="1000"
> maximumRedeliveries="1" />
>                         <bean ref="exceptionToAlertConverter" />
>                         <to uri="direct:alerter" />
>                 </onException>
>                 <route id="alerterRoute">
>                         <from uri="direct:alerter" />
>                         <transacted
> ref="propagationNotSupportedTransactionPolicy" />
>                         <to uri="someBroker://Alerter" />
>                 </route>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/inherit-extend-camel-context-tp5733964.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>