camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Meise, Christoph" <christoph.me...@immobilienscout24.de>
Subject AW: Classpath resource endpoint?
Date Fri, 03 Sep 2010 11:12:19 GMT
Thanks for your responses. Actually implementing what we needed took like half a day. What
we now have is a component "classpath" which can take a file or directory as endpoint uri
path and produce one message for each file found (thus consuming the file). Does that sound
interesting to you? Actually to me this component looks like only a means for testing thus
a little narrow. But we could provide it.

Kind Regards,
Christoph Meise

-----Ursprüngliche Nachricht-----
Von: Claus Ibsen [mailto:claus.ibsen@gmail.com] 
Gesendet: Freitag, 3. September 2010 06:39
An: users@camel.apache.org
Betreff: Re: Classpath resource endpoint?

If you projects are running in the same JVM then you can use intra-vm
communications such as: direct, seda components.

If you run your projects in separate JVMs then you need "remoting" to
share data between them. For example files, a shared database,
messaging, http, rmi etc.

And you can use placeholders in the uri so you can easily switch
endpoints, but keeping the route as is.
http://camel.apache.org/properties
http://camel.apache.org/how-do-i-use-spring-property-placeholder-with-camel-xml.html



On Thu, Sep 2, 2010 at 4:17 PM, Meise, Christoph
<christoph.meise@immobilienscout24.de> wrote:
> Hi all,
>
> We have several projects (B, C and D) which rely on testdata coming from project A. Up
to now for example project B resolved project A and put the provided testdata into some defined
spot (inputFileOrDirectoryName) which was on the eclipse classpath. Than in a testcase a route
could be built like this one:
>
>    new RouteBuilder() {
>      @Override
>      public void configure() throws Exception {
>        from("file:" + inputFileOrDirectoryName + "?noop=true").to("log:before.transformation.log").to(
>          "xslt:" + transformationFile).to("mock:checkpoint").to("log:after.transformation.log");
>      }
>    };
>
> Basically it loaded an xml-file, transformed it and did some logging. Now the question
arises whether there exists component that can load a resource from the classpath (using either
a provided A.jar or the eclipse project A):
>       ... from("classpath:" + inputFile).to("log:before.transformation.log").to( ...
> I would be glad to receive any help on this issue even stating something like: "No, there
is not". If there was nothing, would there be a wish provide it?
>
> Kind Regards,
> Christoph Meise
> IT Systems&Services, Team SAT
>
> Immobilien Scout GmbH
> Andreasstraße 10
> 10243 Berlin
> Fon +49 (0)30 24301-1378
> Fax +49 (0)30 24301-1110
> christoph.meise@immobilienscout24.de
>
> ---------------------------------------------------------------
> Immobilien Scout GmbH
> Beirat: Dr. Martin Enderle (Vorsitzender)
> Geschäftsführer: Dirk Hoffmann, Marc Stilke (Sprecher)
> Handelsgericht: Amtsgericht Charlottenburg, HRB 69108
> Sitz der Gesellschaft: Berlin
> ---------------------------------------------------------------
>
> http://www.immobilienscout24.de
> Der Marktführer: Deutschlands größter Immobilienmarkt
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message