Re: Closed (removed) StreamCache when doing a Wiretap

2015-04-21 Thread Franz Paul Forsthofer
Hello Geert,

there is no solution yet for your problem. Currently the stream cache
file is removed at the end of the route which created the file. In
your case the stream cache file is deleted when the direct:start
route is finished. The wire tap runs in a separate thread and
therefore it can happen that it tries to read the cached file when it
is already deleted, especially when you have a delay in the wiretap
route (direct:x).


Regards Franz

On Fri, Apr 17, 2015 at 6:05 PM, Geert Vanheusden
geer...@aviovision.com wrote:
 Hi,

 I noticed a bug where the body (StreamCache) was already removed before the
 exchange reached the end (in the Wiretap route).

 I found the following ticket
 https://issues.apache.org/jira/browse/CAMEL-8386 and code
 https://fisheye6.atlassian.com/changelog/camel-git?cs=4661cbb94513d6047e58581b23dcd4a6fad166f7
 but I think it still doesn't fix the Wiretap problem.

 Here you can find my test (executed on 2.15.1). If you disable the
 StreamCaching or remove the delay it works, enabling it again will break
 the test.

 
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.impl.DefaultStreamCachingStrategy;
 import org.apache.camel.spi.StreamCachingStrategy;
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.junit.Before;
 import org.junit.Test;

 public class WireTapTest extends CamelTestSupport {

 private MockEndpoint y;
 private MockEndpoint z;

 @Before
 public void prepareEndpoints() {
 y = getMockEndpoint(mock:file:y);
 z = getMockEndpoint(mock:file:z);
 }

 @Test
 public void
 testSendingAMessageUsingWiretapShouldNotDeleteStreamBeforeWiretappedExcangeIsComplete()
 throws InterruptedException {
 y.expectedMessageCount(1);
 z.expectedMessageCount(1);

 // test.txt should contain more than one character
 template.sendBody(direct:start,
 this.getClass().getResourceAsStream(/test.txt));

 assertMockEndpointsSatisfied();
 }

 @Override
 protected RouteBuilder createRouteBuilder() throws Exception {
 return new RouteBuilder() {
 @Override
 public void configure() throws Exception {
 StreamCachingStrategy streamCachingStrategy = new
 DefaultStreamCachingStrategy();
 streamCachingStrategy.setSpoolThreshold(1);
 context.setStreamCachingStrategy(streamCachingStrategy);
 context.setStreamCaching(true);

 from(direct:start)
 .wireTap(direct:x)
 .to(file:y);

 from(direct:x)
 .delay(2000)
 .to(file:z);
 }
 };
 }

 @Override
 public String isMockEndpoints() {
 return (file:z|file:y);
 }
 }
 =

 If you run the test you can clearly see the temp file deletion followed by
 the closed stream exception:

 Tried 1 to delete file:
 /var/folders/db/brq60fqj4vb8mnx_5nlz36nwgn/T/camel/camel-tmp-00cd1ce2-7d44-47fe-b357-008e8146f770/cos8797132745923044996.tmp
 with result: true

 Cannot reset stream from file
 /var/folders/db/brq60fqj4vb8mnx_5nlz36nwgn/T/camel/camel-tmp-00cd1ce2-7d44-47fe-b357-008e8146f770/cos8797132745923044996.tmp

 I encountered the same issue during a more complex route that does some
 splitting (zip file) and multicasting. This occurred on Camel 2.14.1 so it
 could be fixed by https://issues.apache.org/jira/browse/CAMEL-8284 but I
 need to test this.

 Kind regards,

 Geert


Re: Is it possible for file component to NOT to move the file to .camel directory if there is error in the following endpoint of that route.

2015-04-21 Thread pushkin1984
This information helps a lot. Thank you :)



--
View this message in context: 
http://camel.465427.n5.nabble.com/Is-it-possible-for-file-component-to-NOT-to-move-the-file-to-camel-directory-if-there-is-error-in-th-tp5717797p5766098.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: synchronizing multiple processes in a camel route

2015-04-21 Thread Henryk Konsek
Hi,

Until you explicitly define the message flow as parallel (using for example
Threads DSL [1]) the processing will be sequential. So you don't have to do
anything to achieve what you want :) .

Laters!

[1] http://camel.apache.org/async.html

pon., 20.04.2015 o 19:24 użytkownik Morgan Hautman morgan.haut...@gmail.com
napisał:

 Hi,

 A Processor is synchronous.

 Regards,
 Morgan

 On 20/04/2015 16:35, anish wrote:
  How can we synchronize the processes in a camel route? I want to execute
 all
  the processes defined in a camel route to get executed in a single shot.
 
  In the below camel route, I want to execute the processes
  msgConvertorSingle and smsBO get executed in a single unit of work. I
  dont want a different thread executing the same when one is doing its
 job.
  How can we achieve this?
 
camel:route id=SinglelineRouteConvertor
   camel:from uri=direct:msgConvertorSingle /
   camel:process ref=msgConvertorSingle /
   camel:process ref=smsBO /
   camel:log message=Saved Message Order is${body} /
   /camel:route
 
 
 
  --
  View this message in context:
 http://camel.465427.n5.nabble.com/synchronizing-multiple-processes-in-a-camel-route-tp5766068.html
  Sent from the Camel - Users mailing list archive at Nabble.com.




Re: HTTP operation failed invoking statusCode: 500

2015-04-21 Thread Willem Jiang
If you change the data format of the cxf endpoint, you can not just redirect 
the input stream to a http endpoint, as the PAYLOAD message doesn’t has the 
soap envelope.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On April 21, 2015 at 12:42:41 PM, ercan.canlier (ercan.canl...@gmail.com) wrote:
 Hello,
 I have proxied real web service by defining proxy. I am tracing messages via
 camel's tracer and writing to database and after that presenting on the web
 application. The XML Request and Responses are quite long and i wanted to
 make them smaller by setting dataFormat=PAYLOAD at CXF endpoint but when i
 change this dataFormat=MESSAGE to dataFormat=PAYLOAD, i got this exception :
 HTTP operation failed invoking http://localhost:9082/webservices/payment
 with statusCode: 500
 What is wrong with the configuration? Could you please help?
 Here is my endpoint configuration:
  
   
 address=http://localhost:${proxy.port}/gadget-ws-proxy/webservices/payment;  
 endpointName=s:PaymentEndpoint serviceName=s:PaymentEndpointService
 wsdlURL=etc/wsdl/report_incident.wsdl xmlns:s=http://gadget.com; /
  
  init-method=start destroy-method=stop
  
  value=http://localhost:${real.port}/webservices/payment; /
  
  
  
  
  uri=http://localhost:${real.port}/webservices/payment; /
  
  
  
  
  
  
  
  
  
  
  
  
  
  
 Thanks in advance.
 Best regards.
 Ercan
  
  
  
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/HTTP-operation-failed-invoking-statusCode-500-tp5766085.html
   
 Sent from the Camel - Users mailing list archive at Nabble.com.
  



Re: Closed (removed) StreamCache when doing a Wiretap

2015-04-21 Thread Geert Vanheusden
Hi Franz,

is this something that will be fixed in an upcoming release? Is it a bug or
does it work as designed?
Can we use a workaround to avoid this behaviour, for example by not
deleting the temp files?


Kind regards,

Geert

On Tue, Apr 21, 2015 at 10:37 AM, Franz Paul Forsthofer 
emc2...@googlemail.com wrote:

 Hello Geert,

 there is no solution yet for your problem. Currently the stream cache
 file is removed at the end of the route which created the file. In
 your case the stream cache file is deleted when the direct:start
 route is finished. The wire tap runs in a separate thread and
 therefore it can happen that it tries to read the cached file when it
 is already deleted, especially when you have a delay in the wiretap
 route (direct:x).


 Regards Franz

 On Fri, Apr 17, 2015 at 6:05 PM, Geert Vanheusden
 geer...@aviovision.com wrote:
  Hi,
 
  I noticed a bug where the body (StreamCache) was already removed before
 the
  exchange reached the end (in the Wiretap route).
 
  I found the following ticket
  https://issues.apache.org/jira/browse/CAMEL-8386 and code
 
 https://fisheye6.atlassian.com/changelog/camel-git?cs=4661cbb94513d6047e58581b23dcd4a6fad166f7
  but I think it still doesn't fix the Wiretap problem.
 
  Here you can find my test (executed on 2.15.1). If you disable the
  StreamCaching or remove the delay it works, enabling it again will break
  the test.
 
  
  import org.apache.camel.builder.RouteBuilder;
  import org.apache.camel.component.mock.MockEndpoint;
  import org.apache.camel.impl.DefaultStreamCachingStrategy;
  import org.apache.camel.spi.StreamCachingStrategy;
  import org.apache.camel.test.junit4.CamelTestSupport;
  import org.junit.Before;
  import org.junit.Test;
 
  public class WireTapTest extends CamelTestSupport {
 
  private MockEndpoint y;
  private MockEndpoint z;
 
  @Before
  public void prepareEndpoints() {
  y = getMockEndpoint(mock:file:y);
  z = getMockEndpoint(mock:file:z);
  }
 
  @Test
  public void
 
 testSendingAMessageUsingWiretapShouldNotDeleteStreamBeforeWiretappedExcangeIsComplete()
  throws InterruptedException {
  y.expectedMessageCount(1);
  z.expectedMessageCount(1);
 
  // test.txt should contain more than one character
  template.sendBody(direct:start,
  this.getClass().getResourceAsStream(/test.txt));
 
  assertMockEndpointsSatisfied();
  }
 
  @Override
  protected RouteBuilder createRouteBuilder() throws Exception {
  return new RouteBuilder() {
  @Override
  public void configure() throws Exception {
  StreamCachingStrategy streamCachingStrategy = new
  DefaultStreamCachingStrategy();
  streamCachingStrategy.setSpoolThreshold(1);
  context.setStreamCachingStrategy(streamCachingStrategy);
  context.setStreamCaching(true);
 
  from(direct:start)
  .wireTap(direct:x)
  .to(file:y);
 
  from(direct:x)
  .delay(2000)
  .to(file:z);
  }
  };
  }
 
  @Override
  public String isMockEndpoints() {
  return (file:z|file:y);
  }
  }
  =
 
  If you run the test you can clearly see the temp file deletion followed
 by
  the closed stream exception:
 
  Tried 1 to delete file:
 
 /var/folders/db/brq60fqj4vb8mnx_5nlz36nwgn/T/camel/camel-tmp-00cd1ce2-7d44-47fe-b357-008e8146f770/cos8797132745923044996.tmp
  with result: true
 
  Cannot reset stream from file
 
 /var/folders/db/brq60fqj4vb8mnx_5nlz36nwgn/T/camel/camel-tmp-00cd1ce2-7d44-47fe-b357-008e8146f770/cos8797132745923044996.tmp
 
  I encountered the same issue during a more complex route that does some
  splitting (zip file) and multicasting. This occurred on Camel 2.14.1 so
 it
  could be fixed by https://issues.apache.org/jira/browse/CAMEL-8284 but I
  need to test this.
 
  Kind regards,
 
  Geert



Reading a file using camel stream component

2015-04-21 Thread Akram
Hi,
I am reading a file using the stream camel component. But the problem is
when file gets rolled out then camel is not reading the newly generated file
with the same name.

from(stream:file?fileName=myfilescanStream=truescanStreamDelay=1000)

The above route will read the current file myfile. But if this gets rolled
out to myfile_1 and a new file with same namemyfile gets generated then
camel is not reading the newly generated myfile. Any idea why this is
happening. Is there any way to read myfile always eventhough a new file is
generated with the same name and old one gets rolled out.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Reading-a-file-using-camel-stream-component-tp5766108.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Closed (removed) StreamCache when doing a Wiretap

2015-04-21 Thread Franz Paul Forsthofer
Hi Geert,

it is a bug. You can try as a workaround to set the threshold
(streamCachingStrategy.setSpoolThreshold(huge_number);) to a huge
number; then the body will be kept in memory.

Alternatively, you can modify the code of the Camel class
org.apache.camel.processor.WireTapProcessor. You have to modifiy the
method configureCopyExchange in the following way:


   private Exchange configureCopyExchange(Exchange exchange) throws
IOException {


// must use a copy as we dont want it to cause side effects of
the original exchange
Exchange copy = ExchangeHelper.createCorrelatedCopy(exchange, false);

if (copy.getIn().getBody() instanceof FileInputStreamCache) {
//the file stream must be copied, otherwise you get errors
because the stream file is removed when the parent route is finished
FileInputStreamCache streamCache = (FileInputStreamCache)
exchange.getIn().getBody();
CachedOutputStream cos = new CachedOutputStream(copy);
try {
  IOHelper.copy(streamCache, cos);
} finally {
  IOHelper.close(streamCache, cos);
  streamCache.reset();
}
copy.getIn().setBody(cos.newStreamCache());
}
// set MEP to InOnly as this wire tap is a fire and forget
copy.setPattern(ExchangePattern.InOnly);
return copy;
}

The idea behind this is to make a copy of the stream cache file, so
that you get an additional stream cache file for the second route (in
your case for the route direct:x). This second stream cache file
will be deleted when the second route is finished.

I also hope that this issue will be fixed. I am no committer so I
cannot say when this issue will be solved; I have made contributions
which solved a similar problem in the aggregator and splitter.

I think you can open a Jira ticket with the above solution suggestion.

Regards Franz

On Tue, Apr 21, 2015 at 11:13 AM, Geert Vanheusden
geer...@aviovision.com wrote:
 Hi Franz,

 is this something that will be fixed in an upcoming release? Is it a bug or
 does it work as designed?
 Can we use a workaround to avoid this behaviour, for example by not
 deleting the temp files?


 Kind regards,

 Geert

 On Tue, Apr 21, 2015 at 10:37 AM, Franz Paul Forsthofer 
 emc2...@googlemail.com wrote:

 Hello Geert,

 there is no solution yet for your problem. Currently the stream cache
 file is removed at the end of the route which created the file. In
 your case the stream cache file is deleted when the direct:start
 route is finished. The wire tap runs in a separate thread and
 therefore it can happen that it tries to read the cached file when it
 is already deleted, especially when you have a delay in the wiretap
 route (direct:x).


 Regards Franz

 On Fri, Apr 17, 2015 at 6:05 PM, Geert Vanheusden
 geer...@aviovision.com wrote:
  Hi,
 
  I noticed a bug where the body (StreamCache) was already removed before
 the
  exchange reached the end (in the Wiretap route).
 
  I found the following ticket
  https://issues.apache.org/jira/browse/CAMEL-8386 and code
 
 https://fisheye6.atlassian.com/changelog/camel-git?cs=4661cbb94513d6047e58581b23dcd4a6fad166f7
  but I think it still doesn't fix the Wiretap problem.
 
  Here you can find my test (executed on 2.15.1). If you disable the
  StreamCaching or remove the delay it works, enabling it again will break
  the test.
 
  
  import org.apache.camel.builder.RouteBuilder;
  import org.apache.camel.component.mock.MockEndpoint;
  import org.apache.camel.impl.DefaultStreamCachingStrategy;
  import org.apache.camel.spi.StreamCachingStrategy;
  import org.apache.camel.test.junit4.CamelTestSupport;
  import org.junit.Before;
  import org.junit.Test;
 
  public class WireTapTest extends CamelTestSupport {
 
  private MockEndpoint y;
  private MockEndpoint z;
 
  @Before
  public void prepareEndpoints() {
  y = getMockEndpoint(mock:file:y);
  z = getMockEndpoint(mock:file:z);
  }
 
  @Test
  public void
 
 testSendingAMessageUsingWiretapShouldNotDeleteStreamBeforeWiretappedExcangeIsComplete()
  throws InterruptedException {
  y.expectedMessageCount(1);
  z.expectedMessageCount(1);
 
  // test.txt should contain more than one character
  template.sendBody(direct:start,
  this.getClass().getResourceAsStream(/test.txt));
 
  assertMockEndpointsSatisfied();
  }
 
  @Override
  protected RouteBuilder createRouteBuilder() throws Exception {
  return new RouteBuilder() {
  @Override
  public void configure() throws Exception {
  StreamCachingStrategy streamCachingStrategy = new
  DefaultStreamCachingStrategy();
  streamCachingStrategy.setSpoolThreshold(1);
  context.setStreamCachingStrategy(streamCachingStrategy);
  context.setStreamCaching(true);
 
  from(direct:start)
  .wireTap(direct:x)
  .to(file:y);
 
  from(direct:x)
  .delay(2000)
  .to(file:z);
  }
  };
  }
 
  @Override
  public String isMockEndpoints() {
  return (file:z|file:y);
  }
  }
  =

Re: HTTP operation failed invoking statusCode: 500

2015-04-21 Thread ercan.canlier
Hi Jiang,
First of all, thanks for your interest.
Could you please give me some hints about it?
How can i show only soap body also at response?
Or how should i redirect the request with PAYLOAD mode?
Thanks.
Ercan



--
View this message in context: 
http://camel.465427.n5.nabble.com/HTTP-operation-failed-invoking-statusCode-500-tp5766085p5766092.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Syslog data format incorrect parsing of structured data

2015-04-21 Thread Sameer Babu K K
According to RFC 5424 syslog structured data can be like the below examples:


   All examples in this section show only the structured data part of
   the message.  Examples should be considered to be on one line.  They
   are wrapped on multiple lines in this document for readability
   purposes.  A description is given after each example.

   Example 1 - Valid

   [exampleSDID@32473 iut=3 eventSource=Application
   eventID=1011]

   This example is a structured data element with a non-IANA controlled
   SD-ID of type exampleSDID@32473, which has three parameters.

   Example 2 - Valid

   [exampleSDID@32473 iut=3 eventSource=Application
   eventID=1011][examplePriority@32473 class=high]




But the syslog data format (org.apache.camel.component.syslog.SyslogConverter) 
just considers the value till next space as the structured message.


    StringBuilder msgId = new StringBuilder();
    while ((charFound = (char) (byteBuffer.get()  0xff)) != ' ') {
    msgId.append(charFound);
    }
    rfc5424SyslogMessage.setMsgId(msgId.toString());

    StringBuilder structuredData = new StringBuilder();
    while ((charFound = (char) (byteBuffer.get()  0xff)) != ' ') {
    structuredData.append(charFound);
    }
    rfc5424SyslogMessage.setStructuredData(structuredData.toString());

This seems to be a bug to me. Is there a fix or latest version available for 
this parsing?

Best Regards,Sameer
 


Re: HTTP operation failed invoking statusCode: 500

2015-04-21 Thread ercan.canlier
Reji,
I followed the report incident tutorial and that was the reason. I also
thought to redesign this by using cxf endpoints. After i faced with the
mentioned error, İ thought that was better idea. Additionally, this will
bring me possibility to use placeholders for this endpoint declaration as
well so i might generate cxf web services automatically. Thank you both,
this hints reminded me for the design review and saved my hours.
Best regards
Ercan

21 Nisan 2015 Salı tarihinde, contactreji [via Camel] 
ml-node+s465427n5766116...@n5.nabble.com yazdı:

 Ercan

 Why are you using a separate implementation for invoking real target
 service as

 bean id=realWebService
 class=com.gadget.ws.proxy.RealWebServiceBean
 init-method=start destroy-method=stop

 property name=url
 value=a href=a href=http://localhost:
 $quot;http://localhost:$;a href=http://localhost:
 $http://localhost:${real.port}/webservices/payment; /
 /bean

 I would advice on using the CXF framwork itself. It will take care of all
 low level stuffs. And I feel nervous seeing the statement  removeHeaders
 pattern=CamelHttp* / . You sure u want that to be there?

 Http 500 says internal error. As Jiang mentioned, maybe your soap envelop
 is missing and you might be sending only the soap body contents. Hence, try
 wrapping up your payload with soap envelop and give a try.

 Cheers
 Reji
  Reji Mathews
 Sr. Developer - Middleware Integration / SOA ( Open Source - Apache Camel
  Jboss Fuse ESB | Mule ESB )
 LinkedIn - http://in.linkedin.com/pub/reji-mathews/31/9a2/40a
 Twitter - reji_mathews


 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://camel.465427.n5.nabble.com/HTTP-operation-failed-invoking-statusCode-500-tp5766085p5766116.html
  To unsubscribe from HTTP operation failed invoking statusCode: 500, click
 here
 http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=5766085code=ZXJjYW4uY2FubGllckBnbWFpbC5jb218NTc2NjA4NXwxNjM0MzU3MDUy
 .
 NAML
 http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml



-- 
Ercan CANLIER




--
View this message in context: 
http://camel.465427.n5.nabble.com/HTTP-operation-failed-invoking-statusCode-500-tp5766085p5766121.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Trying to send email from Camel and having no success. Please help.

2015-04-21 Thread kook04
I actually have not tried that.  I'm not quite sure how.  As I've said, I'm
new to Camel (and Maven for that matter).  Is there some easy way to
accomplish this?

Thank you



--
View this message in context: 
http://camel.465427.n5.nabble.com/Trying-to-send-email-from-Camel-and-having-no-success-Please-help-tp5766062p5766118.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Trying to send email from Camel and having no success. Please help.

2015-04-21 Thread Morgan Hautman

The answer of your question is in my answer I already posted.

mvn camel:run

On 21/04/2015 18:40, kook04 wrote:

I actually have not tried that.  I'm not quite sure how.  As I've said, I'm
new to Camel (and Maven for that matter).  Is there some easy way to
accomplish this?

Thank you



--
View this message in context: 
http://camel.465427.n5.nabble.com/Trying-to-send-email-from-Camel-and-having-no-success-Please-help-tp5766062p5766118.html
Sent from the Camel - Users mailing list archive at Nabble.com.




Bindy marshalling large CSV

2015-04-21 Thread iambutcha
Hi.

I am using Bindy in order to marshal a large set of data (in batches) to a
CSV file.

The problem that I am seeing is that Bindy does not seem to offer any
streaming solution. This means it is expecting a single message (with the
CSV content) to be loaded in memory in order to start writing to a file.

I cannot write in batches (meaning my aggregator predicate expects the whole
data to be complete) otherwise Bindy thinks I am sending multiple messages
(basically outputs batch of files).

Is there any way to do what I am trying to do without heavy loading the
memory? I am thinking on something like tokenizer().streaming() solution.

While searching on this forum, I found this post:
http://camel.465427.n5.nabble.com/Bindy-Streaming-Multile-Rows-td5744413.html

I think it touches on the same thing I am asking here, but since it is a
post from 2013, I wonder if someone has found a workaround?


Thanks in advance!

IAM



--
View this message in context: 
http://camel.465427.n5.nabble.com/Bindy-marshalling-large-CSV-tp5766124.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: Getting list of contexts or getting context by name

2015-04-21 Thread Gustav Sinder
Hi,

Correct, it's Camel Context I was thinking of.
Thanks, I was suspecting that the context is only aware of itself and others 
created from it. I'll stick with the same Context for the dynamic ones.

Regards
/Gustav



-Original Message-
From: Willem Jiang [mailto:willem.ji...@gmail.com] 
Sent: den 16 april 2015 03:32
To: users@camel.apache.org
Subject: Re: Getting list of contexts or getting context by name

I just assume the context means Camel Context, am I right?
If you create the Camel Context you need to manage it yourself. I don’t think 
it is possible to look up the other Camel Context from the route which only 
knows about the CamelContext holds it.
There are some components can only be used to talk each other within the same 
CamelContext, such as seda, direct. And we use these component to glue the 
routes. 

So my suggestion is you keep the dynamic routes in the same CamelContext, 
unless you don’t want them talk to each other. 

--
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem



On April 15, 2015 at 9:38:42 PM, Gustav Sinder (gustav.sin...@ferrologic.se) 
wrote:
 Hi,
  
 I'm working on a solution where I dynamically setup/remove routes 
 based on external configuration. So far so good, it works good, a manager 
 route handles this just good.
 A thought would be to place the dynamic routes in another context. I 
 can create new contexts from within the Java without problem but I 
 can't seem to find a way to either list the active contexts and/or get a 
 context by its name.
  
 Also, are there any drawbacks on using another CamelContext instead of 
 placing it all in the same one where the manager route also runs?
  
 Thanks
 /Gustav
  
  
  



Re: Bug detected while storing file with name as exportorder_191111#500#10:12:23

2015-04-21 Thread gunjansharma18
Thanks a lot Claus for clarifying this critical detail, but since we know
there are certain pattern in filename that windows don't support like ? :
etc  will it not be a good idea to for camel to check the operating system
and throw a warning to the user, Cannot store file due to incorrect file
name rather than going into an infinite loop and trying to store a file
which eventually camel processors will never be able to.  



--
View this message in context: 
http://camel.465427.n5.nabble.com/Bug-detected-while-storing-file-with-name-as-exportorder-19-500-10-12-23-tp5765914p5766096.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: synchronizing multiple processes in a camel route

2015-04-21 Thread contactreji
Hi

Yea as others mentioned its sync unless u use EIPS like multicast, inOnly
MEPs etc.

Message contents stored in out body of one processor automatically becomes
the input for the next processor. Its a chained ececution style.

Cheers
Reji



-
Reji Mathews
Sr. Developer - Middleware Integration / SOA ( Open Source - Apache Camel  
Jboss Fuse ESB | Mule ESB )
LinkedIn - http://in.linkedin.com/pub/reji-mathews/31/9a2/40a
Twitter - reji_mathews
--
View this message in context: 
http://camel.465427.n5.nabble.com/synchronizing-multiple-processes-in-a-camel-route-tp5766068p5766119.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Data Corruption in SFTP in Parallel Multicast branches

2015-04-21 Thread contactreji
Hi

Have u tried replacing
camel:multicast id=ParallelGateway_1 parallelProcessing=true
stopOnException=true
camel:to uri=direct://SequenceFlow_5/
camel:to uri=direct://SequenceFlow_7/
/camel:multicast


With

camel:multicast id=ParallelGateway_1 parallelProcessing=true
stopOnException=true
camel:inOnly uri=seda:SequenceFlow_5/
camel:inOnly uri=seda:SequenceFlow_7/
/camel:multicast

Reji



-
Reji Mathews
Sr. Developer - Middleware Integration / SOA ( Open Source - Apache Camel  
Jboss Fuse ESB | Mule ESB )
LinkedIn - http://in.linkedin.com/pub/reji-mathews/31/9a2/40a
Twitter - reji_mathews
--
View this message in context: 
http://camel.465427.n5.nabble.com/Data-Corruption-in-SFTP-in-Parallel-Multicast-branches-tp5761673p5766120.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: HTTP operation failed invoking statusCode: 500

2015-04-21 Thread contactreji
Ercan

Why are you using a separate implementation for invoking real target service
as

bean id=realWebService class=com.gadget.ws.proxy.RealWebServiceBean 
init-method=start destroy-method=stop

property name=quot;urlquot; 
value=quot;lt;a
href=quot;http://localhost:$quot;http://localhost:${real.port}/webservices/payment;
/
/bean

I would advice on using the CXF framwork itself. It will take care of all
low level stuffs. And I feel nervous seeing the statement  removeHeaders
pattern=CamelHttp* / . You sure u want that to be there?

Http 500 says internal error. As Jiang mentioned, maybe your soap envelop is
missing and you might be sending only the soap body contents. Hence, try
wrapping up your payload with soap envelop and give a try.

Cheers
Reji




-
Reji Mathews
Sr. Developer - Middleware Integration / SOA ( Open Source - Apache Camel  
Jboss Fuse ESB | Mule ESB )
LinkedIn - http://in.linkedin.com/pub/reji-mathews/31/9a2/40a
Twitter - reji_mathews
--
View this message in context: 
http://camel.465427.n5.nabble.com/HTTP-operation-failed-invoking-statusCode-500-tp5766085p5766116.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Trying to send email from Camel and having no success. Please help.

2015-04-21 Thread contactreji
Hey

Did you try a standalone run in the IDE itself with maven camel plugin?
Before attempting that, add camel-mail dependency in ur POM.xml file.

Cheers
Reji



-
Reji Mathews
Sr. Developer - Middleware Integration / SOA ( Open Source - Apache Camel  
Jboss Fuse ESB | Mule ESB )
LinkedIn - http://in.linkedin.com/pub/reji-mathews/31/9a2/40a
Twitter - reji_mathews
--
View this message in context: 
http://camel.465427.n5.nabble.com/Trying-to-send-email-from-Camel-and-having-no-success-Please-help-tp5766062p5766117.html
Sent from the Camel - Users mailing list archive at Nabble.com.