camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Accesing route related resource files from Producer
Date Sun, 19 Jul 2015 13:05:18 GMT
Hi

Is the files in the other bundles in the classpath of those bundles?
If so you can access them if you export | import the package those
files are located.

Then you can load the resources using ClassResolver API form Camel
(which supports OSGi).

Your component can extend the ResourcesEndpoint from camel-core which
does this out of the box, which we use in camel-velocity and others
etc.

On Sun, Jul 19, 2015 at 2:24 PM, L F <l891211@yahoo.com.invalid> wrote:
> Hello,
> I want to create a custom camel component to be used in camel routes.
> the component will use the exchange body and a resource file to make the processing,
in a Producer.
> I want to use it like <camel:to  uri="gl-sendmail:/mail/welcomemailtemplate.txt" />
>
> Everything is deployed on Karaf.
> Is it possible to access file resources which are defined in other bundles ? If yes,
how?
> Regards,Laji



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2nd edition: http://www.manning.com/ibsen2

Mime
View raw message