Interceptor into external file

2015-09-10 Thread fabrizio.spataro
Hello,

i would use same interceptor (XML Spring implementation) into my different
projects.

Can i reference an interceptor like "routeContextRef" tag or
"restContextRef" tag?







--
View this message in context: 
http://camel.465427.n5.nabble.com/Interceptor-into-external-file-tp5771400.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Interceptor into external file

2015-09-10 Thread Raul Kripalani
If you are using OSGi you can leverage OSGi Service Listeners to
programmatically add the interceptors whenever a new context appears in the
environment.

*Raúl Kripalani*
Apache Camel PMC Member & Committer | Enterprise Architect, Open Source
Integration specialist
http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani
http://blog.raulkr.net | twitter: @raulvk

On Thu, Sep 10, 2015 at 11:57 AM, fabrizio.spataro <
fabrizio.spat...@bizmate.it> wrote:

> Hello,
>
> i would use same interceptor (XML Spring implementation) into my different
> projects.
>
> Can i reference an interceptor like "routeContextRef" tag or
> "restContextRef" tag?
>
>
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Interceptor-into-external-file-tp5771400.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: Interceptor into external file

2015-09-10 Thread Henryk Konsek
Hi,

What kind of interceptor do you have in mind? Spring AOP one or Camel one?

Cheers!

czw., 10.09.2015 o 12:57 użytkownik fabrizio.spataro <
fabrizio.spat...@bizmate.it> napisał:

> Hello,
>
> i would use same interceptor (XML Spring implementation) into my different
> projects.
>
> Can i reference an interceptor like "routeContextRef" tag or
> "restContextRef" tag?
>
>
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Interceptor-into-external-file-tp5771400.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
-- 
Henryk Konsek
http://about.me/hekonsek


Re: Interceptor into external file

2015-09-10 Thread Henryk Konsek
I don't think it is possible in Spring XML DSL. However it is definitely
possible with Java DSL. Maybe you can switch to Java? Java DSL is really
flexible :) .

Cheers!

czw., 10.09.2015 o 14:28 użytkownik fabrizio.spataro <
fabrizio.spat...@bizmate.it> napisał:

> Camel interceptor:
>
> http://camel.apache.org/schema/spring;
> errorHandlerRef="deadLetterErrorHandler">
>  ... ANOTHER CODE ..
>  ... ANOTHER CODE ..
>  ... ANOTHER CODE ..
>
> 
>  ... MY CODE ..
>  ... MY CODE ..
>  ... MY CODE ..
>  ... MY CODE ..
> 
>
>  ... ANOTHER CODE ..
>  ... ANOTHER CODE ..
>  ... ANOTHER CODE ..
>
> 
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Interceptor-into-external-file-tp5771400p5771403.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
-- 
Henryk Konsek
http://about.me/hekonsek


Re: Interceptor into external file

2015-09-10 Thread fabrizio.spataro
Camel interceptor:

http://camel.apache.org/schema/spring;
errorHandlerRef="deadLetterErrorHandler">
 ... ANOTHER CODE ..
 ... ANOTHER CODE ..
 ... ANOTHER CODE ..


 ... MY CODE ..
 ... MY CODE ..
 ... MY CODE ..
 ... MY CODE ..


 ... ANOTHER CODE ..
 ... ANOTHER CODE ..
 ... ANOTHER CODE ..





--
View this message in context: 
http://camel.465427.n5.nabble.com/Interceptor-into-external-file-tp5771400p5771403.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Interceptor into external file

2015-09-10 Thread fabrizio.spataro
Ok thanks, my (temporary?) implementation is:

FILE 1:



 ... MY CODE .. 
 ... MY CODE .. 
 ... MY CODE .. 
 ... MY CODE .. 




MAIN FILE:

http://camel.apache.org/schema/spring;
errorHandlerRef="deadLetterErrorHandler">

**
 ... ANOTHER CODE .. 
 ... ANOTHER CODE .. 





 ... ANOTHER CODE .. 
 ... ANOTHER CODE .. 
 ... ANOTHER CODE .. 





--
View this message in context: 
http://camel.465427.n5.nabble.com/Interceptor-into-external-file-tp5771400p5771410.html
Sent from the Camel - Users mailing list archive at Nabble.com.