I know this is an old thread, but I found some thing similiar and here is how
I accomplished it. Basically, you have to provide a function that returns a
split of the input. In my case, I wanted to split on newlines:
split(_.getIn().getBody(classOf[String]).split("\n")) {
loadbalance rou
I'm using the Scala DSL and I'm attempting to split the input from a file,
then aggregate it again once the processing is done. The route building I
have is:
val context = new DefaultCamelContext
context.addRoutes(new RouteBuilder {
"file:perf?noop=true" ==> {
aggregate(split(_.getIn(
I have the following route:
context.addRoutes(new RouteBuilder {
// Read the file(s) from the directory
"file:perf?delete=true" ==> {
// Split the file up at each line
split(_.getIn().getBody(classOf[String]).split("\n")) {
// The further split up the processing across
Camel version 2.9.2 on a Windows 7 Machine.
--
View this message in context:
http://camel.465427.n5.nabble.com/File-Processor-Not-deleting-the-files-tp5670301p5670530.html
Sent from the Camel - Users mailing list archive at Nabble.com.
I'm not using any streams directly in my code. The complete code listing is
as follows:
// Build the connection pool
val ds = new BasicDataSource
ds.setDriverClassName("oracle.jdbc.OracleDriver")
ds.setUrl("jdbc:oracle:thin:@localhost:1521:xe")
ds.setUsername("**")
ds.setPassword("*
I guess this is implicitly touching the stream:
split(_.getIn().getBody(classOf[String]).split("\n"))
Could be the root?
--
View this message in context:
http://camel.465427.n5.nabble.com/File-Processor-Not-deleting-the-files-tp5670301p5670589.html
Sent from the Camel - Users mailing list archi
Yeah, in the Scala DSL, it doesn't seem to support that. Is that a bug or
feature request?
--
View this message in context:
http://camel.465427.n5.nabble.com/File-Processor-Not-deleting-the-files-tp5670301p5670621.html
Sent from the Camel - Users mailing list archive at Nabble.com.
So, I converted this over to Java and it is exhibiting the same behavior.
What did I do wrong:
public class JavaSplitPerfProcessor {
static class LineSplitter implements Processor {
static final String format = "INSERT INTO EVT_PERF (
EVT_PERF_ID,
CRLTN_ID, USER_ID, APPN_
Thanks, in the meantime I'm going to see if I can get this running on a Unix
box.
--
View this message in context:
http://camel.465427.n5.nabble.com/File-Processor-Not-deleting-the-files-tp5670301p5676398.html
Sent from the Camel - Users mailing list archive at Nabble.com.
I wonder if using one the Marshalling frameworks would solve this?
--
View this message in context:
http://camel.465427.n5.nabble.com/File-Processor-Not-deleting-the-files-tp5670301p5676645.html
Sent from the Camel - Users mailing list archive at Nabble.com.
clean
To delete all the temporary files created, to make sure Windows dont
have any locks.
On Mon, Apr 30, 2012 at 8:58 PM, rdifrango <[hidden
email]>
wrote:
> I wonder if using one the Marshalling frameworks would solve this?
>
> --
> View this message in context:
http
Has this been baked into a snapshot release that is available or source build
only?
--
View this message in context:
http://camel.465427.n5.nabble.com/File-Processor-Not-deleting-the-files-tp5670301p5686206.html
Sent from the Camel - Users mailing list archive at Nabble.com.
I downloaded the snapshot version today and ran both my Java and Scala
versions and it still appears to have the same problem. Here are the
libraries that I used:
camel-core-2.10-SNAPSHOT.jar
camel-ftp-2.10-SNAPSHOT.jar
camel-jdbc-2.10-SNAPSHOT.jar
camel-jms-2.10-SNAPSHOT.jar
camel-scala-2.10-SNA
I'll try that and see if it works. I have attached my Scala and Java code
for your review of course the user name and password are blanked out.
http://camel.465427.n5.nabble.com/file/n5691459/JavaSplitPerfProcessor.java
JavaSplitPerfProcessor.java
http://camel.465427.n5.nabble.com/file/n5691459/
OK...so it does not seem to fully correct the issue:
public void configure() {
from("file:perf?delete=true&idempotent=true").convertBodyTo(String.class)
.split(body().tokenize("\n")).streaming()
I was doing just that, what I found that works is to create multiple routes
that are in effect chained off one of another like the following works
[meaning the files get properly deleted]:
context.addRoutes(new RouteBuilder {
"file:perf?delete=true" ==> {
process(myProcessor).to("file:pe
Anyone ever seen this before and know the cause and/or resolution:
[ERROR] Failed to get thread context.
[ERROR] Failed to get thread context in ptReadContextFromThread.
Here are my routes:
context.addRoutes(new RouteBuilder {
"sftp://myid@myserver//prod/msp/logs/prtlf_logs/msp_prtlf_qps_07/
Is there a way to programatically check to see if a route is finished?
Basically, I want an intelligent shutdown loop that checks to see if routes
are still processing work before shutting down my Camel Context.
--
View this message in context:
http://camel.465427.n5.nabble.com/Waiting-for-Route
The interesting thing, is that I am running the logger at INFO level but
nothing more than this message comes. I'm running it in DEBUG now to see if
I can get more information for you. One other variable is that I'm using
the JRockit JVM so I switch to the Sun version to see if that is part of th
That helps, though I would prefer a mechanism where I could poll the
processes to see if they have completed their work.
--
View this message in context:
http://camel.465427.n5.nabble.com/Waiting-for-Routes-to-Finish-tp5695837p5697629.html
Sent from the Camel - Users mailing list archive at Nabbl
It seems as if a combination of changing the parameters on the route and
switching the JVM to a Sun one solved the issue. Here is the new route:
val context = new DefaultCamelContext(reg)
context.addRoutes(new RouteBuilder {
"sftp://myId@yashin//prod/msp/logs/prtlf_logs/msp_prtlf_qps_07/msp
Just as a wrap up on this one, I think splitting things up into multiple
routes along with the 2.10 release solved this issue. Thanks again for your
assistance.
--
View this message in context:
http://camel.465427.n5.nabble.com/File-Processor-Not-deleting-the-files-tp5670301p5697666.html
Sent fr
I was looking at how to integrate Camel into a Web app and according to this:
http://camel.apache.org/tutorial-on-using-camel-in-a-web-application.html
It is only possible to do if you are using Spring and you are using the
Spring DSL. Is there a way other than having to use Spring?
--
View thi
That much I understand, I was just wondering if Camel provided an out of the
box solution for non-spring based applications. Based upon your response,
I'm guessing the answer is no and that I'll have to roll my own.
--
View this message in context:
http://camel.465427.n5.nabble.com/Java-or-Scala
24 matches
Mail list logo