Re: unmarshalling with jaxb

2013-06-03 Thread wagnermarques
Thanks Claus, I can not guilt eclipse, was my fault...

But now I am getting this exception:

14:33:56,993 | ERROR | xtenderThread-10 | ContextLoaderListener|
80 - org.springframework.osgi.extender - 1.2.1 | Application context refresh
failed (OsgiBundleXmlApplicationContext(bundle=fzlbpms-service-orbeon,
config=osgibundle:/META-INF/spring/*.xml))
org.apache.camel.RuntimeCamelException: javax.xml.bind.JAXBException:
br.edu.fzlbpms.service.orbeon.jaxb doesnt contain ObjectFactory.class or
jaxb.index
(...)

I need to create this file?  








--
View this message in context: 
http://camel.465427.n5.nabble.com/unmarshalling-with-jaxb-tp5733598p5733629.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: unmarshalling with jaxb

2013-06-03 Thread Claus Ibsen
Yes you need jaxb.index file. Google the internet to learn more about
this file and why its needed.

On Sun, Jun 2, 2013 at 9:33 PM, wagnermarques wagnerdo...@gmail.com wrote:
 Thanks Claus, I can not guilt eclipse, was my fault...

 But now I am getting this exception:

 14:33:56,993 | ERROR | xtenderThread-10 | ContextLoaderListener|
 80 - org.springframework.osgi.extender - 1.2.1 | Application context refresh
 failed (OsgiBundleXmlApplicationContext(bundle=fzlbpms-service-orbeon,
 config=osgibundle:/META-INF/spring/*.xml))
 org.apache.camel.RuntimeCamelException: javax.xml.bind.JAXBException:
 br.edu.fzlbpms.service.orbeon.jaxb doesnt contain ObjectFactory.class or
 jaxb.index
 (...)

 I need to create this file?








 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/unmarshalling-with-jaxb-tp5733598p5733629.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Transactions and Cache Levels

2013-06-03 Thread Darwish
Yes cluas .. XA is evil  , i will  simplify my route design and make sure
that the JDBC operation is last step in my route 

Christian ..thank you for sample .. im reviewing the jmsAndJdbc  sample:

 from(activemqTx:queue:transaction.incoming.one)

.transacted(PROPAGATION_REQUIRED_JMS)

.transacted(PROPAGATION_REQUIRED_JDBC)

.to(sql:UPDATE account SET balance = (SELECT balance
from account where name = 'foo') - # WHERE name =
'foo'?dataSourceRef=dataSource)
.to(sql:UPDATE account SET balance = (SELECT balance
from account where name = 'bar') + # WHERE name =
'bar'?dataSourceRef=dataSource)
.to(activemqTx:queue:transaction.outgoing.one);



there is two transaction manager JMS and JDBC in same route which is
something new for me :)  and i think it should be considered before going to
XA option 





-
Othman Darwish
ProgressSoft Corp.

--
View this message in context: 
http://camel.465427.n5.nabble.com/Transactions-and-Cache-Levels-tp5733618p5733657.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Problem with runTimeException handling.

2013-06-03 Thread suyash.singh
Hi,

We are developing an app using Apache Camel and using timers to control
sessions. When a timer expires, we throw a runtimeException to send a
message to the customer. The CAMEL route in the meantime does not continue
as a result and breaks out of the pipeline.

In certain cases, we would like the CAMEL route to continue inspite of a
RunTimeException being raised. Any ideas on how to do this?



--
View this message in context: 
http://camel.465427.n5.nabble.com/Problem-with-runTimeException-handling-tp5733659.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: bean with method parameters in camel

2013-06-03 Thread Tarun Kumar
my use case is:

from().bean().end()

Based on user input, i want to make bean call. So, basically method
parameters for bean call will come from exchange as well as user input. I
was wondering if there is any way to make bean call with method parameters
as exchange as well some user input parameters.


On Sun, Jun 2, 2013 at 1:46 PM, Claus Ibsen claus.ib...@gmail.com wrote:

 Hi

 You can call a method without parameters that call the method you want
 (as its just java code and you can call it yourself), or use a inlined
 Camel processor to call the method from java code etc.

 The bean component is intended for calling methods with parameter
 values with data from the Camel Exchange / Message - and not hardcoded
 values.

 So what is your use case for calling this method with hard-coded values ?


 On Sat, Jun 1, 2013 at 9:31 AM, Jan Matèrne (jhm) apa...@materne.de
 wrote:
  The exchange could be passed to the bean method, therefore you could
 store
  these values in the header or as exchange-properties.
 
  Something like
  class abc extends RouteBuilder {
  private string str1 = 'a';
  private string str2 = 'b';
  .
  .
  .setHeader(str1, str1)
  .setHeader(str2, str2)
  .to().bean(myBean, methodName).end();
  }
 
  // @see http://camel.apache.org/bean.html
  // @see http://camel.apache.org/bean-binding.html
  class MyBean {
  public String method(@Header(str1) str1, @Header(str2) str2) {
  
  }
  }
 
 
  Jan
 
  -Ursprüngliche Nachricht-
  Von: Claus Ibsen [mailto:claus.ib...@gmail.com]
  Gesendet: Samstag, 1. Juni 2013 08:09
  An: users@camel.apache.org
  Betreff: Re: bean with method parameters in camel
 
  You cannot do this.
 
  On Thu, May 30, 2013 at 11:48 AM, Tarun Kumar
  agrawal.taru...@gmail.com wrote:
   If i try .bean(className, methodName('a', 'b')) : it calls method
   methodName of class className with method parameters 'a' and 'b'.
   However, if i want value of method variables to come from class
   variables, how can i do that?
  
   what i mean is :
   class abc extends RouteBuilder {
 private string str1 = 'a';
 private string str2 = 'b';
   .
   .
   to().bean(className, methodName(str1, str2)).end();
  
   i get str1 and str2 classes not found exception. How can i pass str1
   and
   str2 values as method parameters without actually hardcoding them?
 
 
 
  --
  Claus Ibsen
  -
  www.camelone.org: The open source integration conference.
 
  Red Hat, Inc.
  FuseSource is now part of Red Hat
  Email: cib...@redhat.com
  Web: http://fusesource.com
  Twitter: davsclaus
  Blog: http://davsclaus.com
  Author of Camel in Action: http://www.manning.com/ibsen
 



 --
 Claus Ibsen
 -
 www.camelone.org: The open source integration conference.

 Red Hat, Inc.
 FuseSource is now part of Red Hat
 Email: cib...@redhat.com
 Web: http://fusesource.com
 Twitter: davsclaus
 Blog: http://davsclaus.com
 Author of Camel in Action: http://www.manning.com/ibsen



Camel-process

2013-06-03 Thread milan777
Can we write process inside process in camel? how? 



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-process-tp5733662.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel-process

2013-06-03 Thread Christian Müller
Please take some more time to ask questions and study [1].

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

Best,

Christian Müller
-

Software Integration Specialist

Apache Camel committer: https://camel.apache.org/team
V.P. Apache Camel: https://www.apache.org/foundation/
Apache Member: https://www.apache.org/foundation/members.html

https://www.linkedin.com/pub/christian-mueller/11/551/642


On Mon, Jun 3, 2013 at 10:21 AM, milan777 milan79pa...@gmail.com wrote:

 Can we write process inside process in camel? how?



 --
 View this message in context:
 http://camel.465427.n5.nabble.com/Camel-process-tp5733662.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



Re: bean with method parameters in camel

2013-06-03 Thread Claus Ibsen
Hi

Yeah read the docs
http://camel.apache.org/bean-integration.html
http://camel.apache.org/bean-binding.html
http://camel.apache.org/parameter-binding-annotations.html

On Mon, Jun 3, 2013 at 10:14 AM, Tarun Kumar agrawal.taru...@gmail.com wrote:
 my use case is:

 from().bean().end()

 Based on user input, i want to make bean call. So, basically method
 parameters for bean call will come from exchange as well as user input. I
 was wondering if there is any way to make bean call with method parameters
 as exchange as well some user input parameters.


 On Sun, Jun 2, 2013 at 1:46 PM, Claus Ibsen claus.ib...@gmail.com wrote:

 Hi

 You can call a method without parameters that call the method you want
 (as its just java code and you can call it yourself), or use a inlined
 Camel processor to call the method from java code etc.

 The bean component is intended for calling methods with parameter
 values with data from the Camel Exchange / Message - and not hardcoded
 values.

 So what is your use case for calling this method with hard-coded values ?


 On Sat, Jun 1, 2013 at 9:31 AM, Jan Matèrne (jhm) apa...@materne.de
 wrote:
  The exchange could be passed to the bean method, therefore you could
 store
  these values in the header or as exchange-properties.
 
  Something like
  class abc extends RouteBuilder {
  private string str1 = 'a';
  private string str2 = 'b';
  .
  .
  .setHeader(str1, str1)
  .setHeader(str2, str2)
  .to().bean(myBean, methodName).end();
  }
 
  // @see http://camel.apache.org/bean.html
  // @see http://camel.apache.org/bean-binding.html
  class MyBean {
  public String method(@Header(str1) str1, @Header(str2) str2) {
  
  }
  }
 
 
  Jan
 
  -Ursprüngliche Nachricht-
  Von: Claus Ibsen [mailto:claus.ib...@gmail.com]
  Gesendet: Samstag, 1. Juni 2013 08:09
  An: users@camel.apache.org
  Betreff: Re: bean with method parameters in camel
 
  You cannot do this.
 
  On Thu, May 30, 2013 at 11:48 AM, Tarun Kumar
  agrawal.taru...@gmail.com wrote:
   If i try .bean(className, methodName('a', 'b')) : it calls method
   methodName of class className with method parameters 'a' and 'b'.
   However, if i want value of method variables to come from class
   variables, how can i do that?
  
   what i mean is :
   class abc extends RouteBuilder {
 private string str1 = 'a';
 private string str2 = 'b';
   .
   .
   to().bean(className, methodName(str1, str2)).end();
  
   i get str1 and str2 classes not found exception. How can i pass str1
   and
   str2 values as method parameters without actually hardcoding them?
 
 
 
  --
  Claus Ibsen
  -
  www.camelone.org: The open source integration conference.
 
  Red Hat, Inc.
  FuseSource is now part of Red Hat
  Email: cib...@redhat.com
  Web: http://fusesource.com
  Twitter: davsclaus
  Blog: http://davsclaus.com
  Author of Camel in Action: http://www.manning.com/ibsen
 



 --
 Claus Ibsen
 -
 www.camelone.org: The open source integration conference.

 Red Hat, Inc.
 FuseSource is now part of Red Hat
 Email: cib...@redhat.com
 Web: http://fusesource.com
 Twitter: davsclaus
 Blog: http://davsclaus.com
 Author of Camel in Action: http://www.manning.com/ibsen




-- 
Claus Ibsen
-
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: No component found with scheme: XY

2013-06-03 Thread Smith-John
Raul Kripalani wrote
 It can be seen in your logs that your bundle my.test.core.service starts
 before camel-cxf. That's clearly the cause of the problem.
 
 Increasing the start level of my.test.core.service to a number above
 camel-cxf's will help.
 
 Regards,
 Raúl.
 On 31 May 2013 15:58, Smith-John lt;

 micha89@

 gt; wrote:
 
 Raul Kripalani wrote
  Hi,
 
  I've seen this before too, but I never had the time to drill into it.
 
  It generally works fine, but in 1 out of 50 cases, most of my bundles
 fail
  to start claiming that X component was not found. Route start levels
 are
  higher than camel-core and component bundles. And there's no Spring or
  Blueprint participating with their asynchronous context starting, hence
  all
  activations are done synchronously. So the race condition cannot be
 coming
  from there...
 
  How often do you see it? More frequently on some machines or OSes than
  others?
  Does it resolve OK if you restart the failed bundle after the rest of
 the
  system initializes?
  What is the start level of your route bundle? And camel-core's (default
  should be 50)?
 
  Can you enable DEBUG logging on package org.apache.camel.impl.osgi?
  That'll
  help us see the work of camel-core's Activator, who is in charge of
  listening for bundle activations and introspecting them to discover
  components, data formats, languages, etc.
 
  Regards,
 
  *Raúl Kripalani*
  Enterprise Architect, Open Source Integration specialist, Program
  Manager | Apache
  Camel Committer
  http://about.me/raulkripalani |
 http://www.linkedin.com/in/raulkripalani
  http://blog.raulkr.net | twitter: @raulvk
 
  On Thu, May 30, 2013 at 3:11 PM, Smith-John lt;

  micha89@

  gt; wrote:
 
  Hi,
 
  I have a problem using camel (2.10.4) within a OSGi environment
  (equinox).
 
  Sometimes I'm getting errors like No component found with scheme:
 cxf
  (or
  stream or jetty or...).
  Of course the components are there. After removing for example
  org.apache.camel.component.cxf from imports and adding it again to it
 I
  can
  start it without problems. But sometime later the same errors appear.
 
  Is this something like a race condition problem? For the moment my
  workaround is to increase the start level of my bundles that use the
  camel
  components. But I'm not sure if this is a safe way to fix the problem.
 Is
  there an other solution to fix the problem?
 
  I'm working with JavaDSL and start the camelContext in a activator
 like:
 
  public void start(BundleContext bundleContext) throws Exception {
  OsgiServiceRegistry r = new
  OsgiServiceRegistry(bundleContext);
  DefaultCamelContext c = new
  OsgiDefaultCamelContext(bundleContext, r);
  c.addRoutes(new myRoute());
  c.start();
 
 
  Regards.
 
 
 
  --
  View this message in context:
 
 http://camel.465427.n5.nabble.com/No-component-found-with-scheme-XY-tp5733506.html
  Sent from the Camel - Users mailing list archive at Nabble.com.
 


 Hi,

 I'm just working with two different machines, both with win7-64bit. So I
 can't create a correlation between the fails and some specific OSs. The
 frequency is very varying. But with raised start levels of the route
 bundles
 it clearly less happens.
 Restarting the bundles after the system was initialized works without
 problems.
 As I'm working with Equinox the default start level is 4. Don't know
 about
 other osgi frameworks.

 Console output:


 osgi !SESSION 2013-05-31 16:47:11.256
 ---
 eclipse.buildId=unknown
 java.version=1.6.0_45
 java.vendor=Sun Microsystems Inc.
 BootLoader constants: OS=win32, ARCH=x86, WS=win32
 Command-line arguments:  -dev

 file:C:/Users/my/workspace/.metadata/.plugins/org.eclipse.pde.core/TesterService/dev.properties
 -os win32 -ws win32 -arch x86 -consoleLog -console

 16:47:13.050  DEBUG  o.a.c.core.osgi.OsgiCamelContextHelper:38  Using
 OsgiCamelContextNameStrategy
 16:47:13.050  DEBUG  o.a.c.core.osgi.OsgiCamelContextHelper:40  Using
 OsgiManagementNameStrategy
 16:47:13.050  DEBUG  o.a.c.core.osgi.OsgiCamelContextHelper:42  Using
 OsgiClassResolver
 16:47:13.050  DEBUG  o.a.c.core.osgi.OsgiCamelContextHelper:44  Using
 OsgiFactoryFinderResolver
 16:47:13.050  DEBUG  o.a.c.core.osgi.OsgiCamelContextHelper:46  Using
 OsgiPackageScanClassResolver
 16:47:13.050  DEBUG  o.a.c.core.osgi.OsgiCamelContextHelper:48  Using
 OsgiComponentResolver
 16:47:13.050  DEBUG  o.a.c.core.osgi.OsgiCamelContextHelper:50  Using
 OsgiLanguageResolver
 16:47:13.050  DEBUG  o.a.c.core.osgi.OsgiCamelContextHelper:52  Using
 OsgiDataFormatResolver
 16:47:13.050  DEBUG  o.a.c.core.osgi.OsgiDefaultCamelContext:626   
 Adding
 routes from builder: Routes: []
 16:47:13.176  INFO   o.a.c.core.osgi.OsgiDefaultCamelContext:1398  
 Apache
 Camel 2.10.4 (CamelContext: 14-camel-2) is starting
 16:47:13.207  DEBUG  o.a.c.management.DefaultManagementAgent:262
  

Re: bean with method parameters in camel

2013-06-03 Thread Tarun Kumar
Hi Claus,

I have gone through all these links. Is there anything specific i am
missing here?


On Mon, Jun 3, 2013 at 2:02 PM, Claus Ibsen claus.ib...@gmail.com wrote:

 Hi

 Yeah read the docs
 http://camel.apache.org/bean-integration.html
 http://camel.apache.org/bean-binding.html
 http://camel.apache.org/parameter-binding-annotations.html

 On Mon, Jun 3, 2013 at 10:14 AM, Tarun Kumar agrawal.taru...@gmail.com
 wrote:
  my use case is:
 
  from().bean().end()
 
  Based on user input, i want to make bean call. So, basically method
  parameters for bean call will come from exchange as well as user input. I
  was wondering if there is any way to make bean call with method
 parameters
  as exchange as well some user input parameters.
 
 
  On Sun, Jun 2, 2013 at 1:46 PM, Claus Ibsen claus.ib...@gmail.com
 wrote:
 
  Hi
 
  You can call a method without parameters that call the method you want
  (as its just java code and you can call it yourself), or use a inlined
  Camel processor to call the method from java code etc.
 
  The bean component is intended for calling methods with parameter
  values with data from the Camel Exchange / Message - and not hardcoded
  values.
 
  So what is your use case for calling this method with hard-coded values
 ?
 
 
  On Sat, Jun 1, 2013 at 9:31 AM, Jan Matèrne (jhm) apa...@materne.de
  wrote:
   The exchange could be passed to the bean method, therefore you could
  store
   these values in the header or as exchange-properties.
  
   Something like
   class abc extends RouteBuilder {
   private string str1 = 'a';
   private string str2 = 'b';
   .
   .
   .setHeader(str1, str1)
   .setHeader(str2, str2)
   .to().bean(myBean, methodName).end();
   }
  
   // @see http://camel.apache.org/bean.html
   // @see http://camel.apache.org/bean-binding.html
   class MyBean {
   public String method(@Header(str1) str1, @Header(str2) str2) {
   
   }
   }
  
  
   Jan
  
   -Ursprüngliche Nachricht-
   Von: Claus Ibsen [mailto:claus.ib...@gmail.com]
   Gesendet: Samstag, 1. Juni 2013 08:09
   An: users@camel.apache.org
   Betreff: Re: bean with method parameters in camel
  
   You cannot do this.
  
   On Thu, May 30, 2013 at 11:48 AM, Tarun Kumar
   agrawal.taru...@gmail.com wrote:
If i try .bean(className, methodName('a', 'b')) : it calls method
methodName of class className with method parameters 'a' and 'b'.
However, if i want value of method variables to come from class
variables, how can i do that?
   
what i mean is :
class abc extends RouteBuilder {
  private string str1 = 'a';
  private string str2 = 'b';
.
.
to().bean(className, methodName(str1, str2)).end();
   
i get str1 and str2 classes not found exception. How can i pass
 str1
and
str2 values as method parameters without actually hardcoding them?
  
  
  
   --
   Claus Ibsen
   -
   www.camelone.org: The open source integration conference.
  
   Red Hat, Inc.
   FuseSource is now part of Red Hat
   Email: cib...@redhat.com
   Web: http://fusesource.com
   Twitter: davsclaus
   Blog: http://davsclaus.com
   Author of Camel in Action: http://www.manning.com/ibsen
  
 
 
 
  --
  Claus Ibsen
  -
  www.camelone.org: The open source integration conference.
 
  Red Hat, Inc.
  FuseSource is now part of Red Hat
  Email: cib...@redhat.com
  Web: http://fusesource.com
  Twitter: davsclaus
  Blog: http://davsclaus.com
  Author of Camel in Action: http://www.manning.com/ibsen
 



 --
 Claus Ibsen
 -
 www.camelone.org: The open source integration conference.

 Red Hat, Inc.
 FuseSource is now part of Red Hat
 Email: cib...@redhat.com
 Web: http://fusesource.com
 Twitter: davsclaus
 Blog: http://davsclaus.com
 Author of Camel in Action: http://www.manning.com/ibsen



Re: A web service consumer route per operation

2013-06-03 Thread Claus Ibsen
See this example also, how to have a route per operation
http://camel.apache.org/cxf-tomcat-example.html

On Sun, Jun 2, 2013 at 10:11 PM, Hilde hilde.sch...@yahoo.de wrote:
 Ich verstehe, vielen Dank!




 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/A-web-service-consumer-route-per-operation-tp5733630p5733633.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


RE: bean with method parameters in camel

2013-06-03 Thread Diether
Put short: you can pass method parameters if they are part of the Exchange 
(either body or as headers).

But it's still unclear for me where these params should come from, or what you 
are trying to do.
You say user input, but user input should be done before sending the Exchange 
and entering the Camel route.
So then they are part of the Exchange and you can use the methods mentioned 
previously.





--
View this message in context: 
http://camel.465427.n5.nabble.com/bean-with-method-parameters-in-camel-tp5733474p5733678.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel Splunk component

2013-06-03 Thread Claus Ibsen
Hi

Maybe the SMX team can do a OSGi wrap bundle of splunk and release it
in maven central as they do today
http://repo2.maven.org/maven2/org/apache/servicemix/bundles/

Then we can use that bundle/JAR in the camel-splunk component.

On Sun, Jun 2, 2013 at 4:23 PM, Preben.Asmussen p...@dr.dk wrote:
 Small update on this.

 The Splunk Dev team wants to keep there releases in their own  repository
 http://blogs.splunk.com/2013/04/04/splunk-sdk-for-java-now-has-maven-support/
 (as i read this no support for Maven central from their side).

 Same goes for osgi as stated on this thread
 http://splunk-base.splunk.com/answers/49450/splunk-java-sdk-as-osgi-bundle

 I guess this will make it harder for the camel-splunk component to be
 donated.





 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Camel-Splunk-component-tp5730476p5733620.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


activemq replyTo not working sometimes

2013-06-03 Thread kiranreddykasa
Hi 

We have following routes

parent : from(CXF).to(JMS)
child: from(JMS).to(processor)

In jms endpoint we have set exclusive reply queue.
Normally there is no issue, but sometimes if we are restarting the child
route cxf is not receiving the replies
and default time out exception is thrown.





-
Regards

kiran Reddy
--
View this message in context: 
http://camel.465427.n5.nabble.com/activemq-replyTo-not-working-sometimes-tp5733682.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Messages disappear if fabric endpoint resolves to null / blank

2013-06-03 Thread fordm
HI,

I've got a fairly simple camel route that uses a recipient list to route
messages:

route
from uri=activemq:my-from-queue /
process ref=getRouteKey /
log message=Route key is ${header.routeKey} /
recipientList
simplefabric:${header.routeKey}/simple
/recipientList
/route

The getRouteKey process refers to a bean that adds a routeKey field to the
exchange header, which is then used as a lookup in the fabric registry.

Providing there is a matching routeKey, e.g. fabric:boo, in the registry
everything works fine (i.e. I've got a container somewhere in the fabric
with a route that consumes from e.g. fabric:boo:activemq:my-boo-to-queue).

However, if there is no matching routeKey, e.g. fabric:foo, then the message
just disappears. I can see that a message was enqueued and dequeued on
(from) my-from-queue, but that's it. No exception, nothing.

Obviously, I can have the getRouteKey process lookup routeKey in the fabric
registry and throw an exception if it's not found, but it seems cleaner to
me to have a separate check in the camel route.

Any ideas?



--
View this message in context: 
http://camel.465427.n5.nabble.com/Messages-disappear-if-fabric-endpoint-resolves-to-null-blank-tp5733683.html
Sent from the Camel - Users mailing list archive at Nabble.com.


references in Camel using Blueprint.

2013-06-03 Thread bruno.meseguer
Hi,

I'm new to Camel, and I'm still digesting all the bits and pieces.

I'm having a problem with the combination Blueprint/Camel, I would say it's
more on the Blueprint side.
First of all could you please confirm you could can help me here with
Blueprint difficulties?

The problem is the following:
I'm defining an OSGI service and I'm trying to make use of it from an
external Camel context using a reference.

To do this I need to specify in the reference's filter the version of the
service defined, as follows:

reference id=helper interface=com.service.helperInterface
filter=(version=helper_1-0-0)/

The version filter is needed as I may have running multiple versions, and it
needs to be configurable, ideally it would look like:

reference id=helper interface=com.service.helperInterface
filter=(version={{helper_version}})/

The property-placeholder feature from Blueprint does not work here.


Thanks in advance,

Bruno



--
View this message in context: 
http://camel.465427.n5.nabble.com/references-in-Camel-using-Blueprint-tp5733684.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel Weblogic 12c

2013-06-03 Thread Jose
Hi Preben,

Thanks for the link. 

I have managed to run Camel in Weblogic 12 but without using Spring
following the instructions described in this link:
http://docs.oracle.com/cd/E24329_01/web.1211/e24964/data_types.htm#CIHBHDGI






--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Weblogic-12c-tp5733473p5733685.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel without Spring. Limitations?

2013-06-03 Thread Jose
Hi, I am trying to use Camel without Spring and I am wondering if there are
some limitations. I guess the configuration would be more complicated but I
wonder if I will loose some features.

In particular, I am planning to use Camel with CXF. All the examples that I
have seen use Camel with Spring.

Thanks a lot.

Jose




--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-without-Spring-Limitations-tp5733686.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Messages disappear if fabric endpoint resolves to null / blank

2013-06-03 Thread Claus Ibsen
Hi

This is the Apache Camel mailing list, and as such questions about the
Apache project should be primary discussed.

You can use the FuseSource forums / or the fabric mailing list for
fabric questions, for any new questions about fuse or fabric
http://fusesource.com/forums/index.jspa
http://fuse.fusesource.org/community.html

And the source for fabric is at github so you can also use its issue tracker.
https://github.com/jboss-fuse/fuse

And we love contributions so pull requests is acceptable also.


Though I have logged a ticket in FABRIC about the issue you posted.
http://fusesource.com/issues/browse/FABRIC-466

Btw what version of Fabric / Fuse ESB are you using?

On Mon, Jun 3, 2013 at 12:34 PM, fordm ford.j.mar...@gmail.com wrote:
 HI,

 I've got a fairly simple camel route that uses a recipient list to route
 messages:

 route
 from uri=activemq:my-from-queue /
 process ref=getRouteKey /
 log message=Route key is ${header.routeKey} /
 recipientList
 simplefabric:${header.routeKey}/simple
 /recipientList
 /route

 The getRouteKey process refers to a bean that adds a routeKey field to the
 exchange header, which is then used as a lookup in the fabric registry.

 Providing there is a matching routeKey, e.g. fabric:boo, in the registry
 everything works fine (i.e. I've got a container somewhere in the fabric
 with a route that consumes from e.g. fabric:boo:activemq:my-boo-to-queue).

 However, if there is no matching routeKey, e.g. fabric:foo, then the message
 just disappears. I can see that a message was enqueued and dequeued on
 (from) my-from-queue, but that's it. No exception, nothing.

 Obviously, I can have the getRouteKey process lookup routeKey in the fabric
 registry and throw an exception if it's not found, but it seems cleaner to
 me to have a separate check in the camel route.

 Any ideas?



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Messages-disappear-if-fabric-endpoint-resolves-to-null-blank-tp5733683.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Camel-process

2013-06-03 Thread milan777
ftp_context.addRoutes(new RouteBuilder() {
public void configure() {
Processor ftpProcessor = new Processor() {
public void process(Exchange e) {
Message inboundMessage = 
e.getIn();

System.out.println(inboundMessage.getBody(String.class));

from(inboundMessage.getBody(String.class)).to(

file:src/temp);
}
};

// System.out.println(path);
// from(path).to(file:src/temp);//we must 
require temp
// directory in src folder project
// 
ftp://cuboidology8@127.1.2.3:21/src?password=cuboidology8?noop=true
from(seda:ftpProcessor).process(ftpProcessor);
}

});



i am not able to download the file from ftpcan anyone help me out
pleasee??? here string
ftp://127.1.1.1/src?password=fileName=comma.txtnoop=true
 is working but still we are not able to get the file :( :(



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-process-tp5733662p5733688.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Messages disappear if fabric endpoint resolves to null / blank

2013-06-03 Thread fordm
Thanks Claus,

I appreciate this is more of a fabric than a camel question, I'll repost to
the FuseSource forum.

I'm using Fuse version 7.1.0.fuse-047 and Camel 2.10.4

Cheers



--
View this message in context: 
http://camel.465427.n5.nabble.com/Messages-disappear-if-fabric-endpoint-resolves-to-null-blank-tp5733683p5733689.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: mybatis, velocity and html response

2013-06-03 Thread Conneen Michael
Christoph (et all), 

Thanks for the reply... I apologize for not being clear.. I know that is 
important for effective use of everyones time.   Here is the use case.. 
User http posts a form to servlet (camel servlet 
I have this working via the camel tomcat example as starting point.. )

Servlet validates post, parses parameters, executes query, passes query results 
to velocity to generate html, returns response

It is the later that I broke down into junit tests to ensure I understand the 
syntax and that each step works.. So.. what I have is.. 

execute query .. 
I have this working via a junit that basically has a route of . 
from(direct:start) 
.to(mybatis:selectMyList?statementType=SelectList) .log(Tapped message body 
is ${body}) .to(mock:result); 

and then after the template.sendBody() .. the junit does a 
ListAccount list = 
mock.getReceivedExchanges().get(0).getIn().getBody(List.class); 

and iterates over the returned collection .. so I know myBatis is 
working as designed. 
 
generate html from list.. 
I kind of have this working in a junit.. though I currently do not 
execute myBatis via a route.. I execute it as I always have..

I execute this .. (mainly because I am struggling to link the routes.. 
) 
myList = mySqlSession.selectList(selectMyList);  // pojo style 
myBaits. 
template.requestBody(direct:start, myList);

my route looks like.. 
from(direct:start)   // start from camel itself .. no input queue 
.to(velocity:myVelocityTemplate.vm)// run velocity against input 
message
.to(file://target/subfolder)// write the output of the velocity 
to a file. 
;

where I am trying to get to is something like this.. 

route looks like... 
from(direct:start)   // start from camel itself .. no input queue 
.to(mybatis:selectMyList?statementType=SelectList) 
.log(Tapped message body is ${body})
.to(velocity:myVelocityTemplate.vm)// run velocity against input 
message
.to(file://target/subfolder)// write the output of the velocity 
to a file. 
;

and eventually ..  burry all that into a config.. using the example tomcat 
servlet as my starting point.. 

So..finally.. to provide response to your questions.. 
 A: Are you executing this example as unit test? If so, why don't you apply 
 the ProducerTemplate and simply pass the list when executing the sendBody() 
 operation?
I tried following the Camel In Action book's logic of an anonymous 
inner class new Processor().., but that seems to have moved to an interface 
now.  I will look into the ProducerTemplate...

 B: We'll, ... you probably need to send it somewhere via the to() statement, 
 e.g. to the jetty component or any other
I need to send to the servlet output stream as the use case is post 
form.. return formatted response.. 
I was just going to tackle this problem in a plain old servlet, but 
thought I would use this as an opportunity to learn camel's EIP capabilities. 
;) 

Kind Regards,

Michael L. Conneen
Information Integrators, Inc.
http://www.infointegrators.com
PGP Key: http://mconneen.infointegrators.net/mconneen.asc



On Jun 3, 2013, at 02:55 , Christoph Emmersberger wrote:

 Hi Michael,
 
 let me try to ask some questions:
 
 A: Are you executing this example as unit test? If so, why don't you apply 
 the ProducerTemplate and simply pass the list when executing the sendBody() 
 operation?
 B: We'll, ... you probably need to send it somewhere via the to() statement, 
 e.g. to the jetty component or any other.
 
 Cheers,
 
 - Christoph
 
 On Jun 2, 2013, at 11:01 PM, Conneen Michael wrote:
 
 Folks, 
 
 I  suspect I am a stones throw away from the ah ha moment.. but I cannot 
 seem to get there..   I am a newbie so I purchased and downloaded the Camel 
 In Action ebook... Great overview and has gotten me this far.. I do have 
 some of the individual pieces working.. I just cannot figure out how to 
 build the route correctly. 
 
 I have searched the camel user forum for mybatis selectlist velocity ... 
 but have yet to find what I am looking for... 
 
 Here is what I want to do.. 
 1.  Run camel using a servlet endpoint as the starting point.   
  From the tomcat example, got this working and mostly understand the 
 spring configuration... 
  
 2.  Parse off a parameter and pass into a myBatis select list. .. 
  I have worked with myBatis a lot from POJOs... so I have both POJOs.. 
 and I think a direct junit test of the mybatis route.. 
  
 3.  Route the query results to velocity to produce an html table. ... 
  I have junit working where I pass a list via  
 template.requestBody(direct:in, list);
  
 4.  Return the results of the velocity template as the html response
  Have not tackled this yet.   Trying to get routes 2 and 3 above first.. 
 
 Things I 

RE: Camel-process

2013-06-03 Thread Diether

Where do you want to download the file too?
You don't need a processor for that, camel has it all build in.

Try something like:

from(ftp://127.1.1.1/src?password=fileName=comma.txtnoop=true;)
.to(file:localDirectory);


But I really think you should look at the Camel examples first and try them out.
So you start to understand what camel is and how it should be used.


Van: milan777 [via Camel] [ml-node+s465427n5733688...@n5.nabble.com]
Verzonden: maandag 3 juni 2013 13:24
Aan: Wuyts Diether
Onderwerp: Re: Camel-process

ftp_context.addRoutes(new RouteBuilder() {
public void configure() {
Processor ftpProcessor = new Processor() {
public void process(Exchange e) {
Message inboundMessage = 
e.getIn();

System.out.println(inboundMessage.getBody(String.class));

from(inboundMessage.getBody(String.class)).to(

file:src/temp);
}
};

// System.out.println(path);
// from(path).to(file:src/temp);//we must 
require temp
// directory in src folder project
// 
ftp://cuboidology8@127.1.2.3:21/src?password=cuboidology8?noop=true
from(seda:ftpProcessor).process(ftpProcessor);
}

});



i am not able to download the file from ftpcan anyone help me out 
pleasee??? here string 
ftp://127.1.1.1/src?password=fileName=comma.txtnoop=true
 is working but still we are not able to get the file :( :(


If you reply to this email, your message will be added to the discussion below:
http://camel.465427.n5.nabble.com/Camel-process-tp5733662p5733688.html
To start a new topic under Camel - Users, email 
ml-node+s465427n465428...@n5.nabble.com
To unsubscribe from Camel - Users, click 
herehttp://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=465428code=ZGlldGhlci53dXl0c0BvcHRpcy5iZXw0NjU0Mjh8OTE4NjI3OTg5.
NAMLhttp://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




--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-process-tp5733662p5733692.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Problem with runTimeException handling.

2013-06-03 Thread Claus Ibsen
Hi

If you have a copy of Camel in Action, see chapter 5, section 5.4.5

You can tell Camel to continue with the onException.

You can find a bit of information on the Camel web site also about this.



On Mon, Jun 3, 2013 at 9:47 AM, suyash.singh suyash.si...@gmail.com wrote:
 Hi,

 We are developing an app using Apache Camel and using timers to control
 sessions. When a timer expires, we throw a runtimeException to send a
 message to the customer. The CAMEL route in the meantime does not continue
 as a result and breaks out of the pipeline.

 In certain cases, we would like the CAMEL route to continue inspite of a
 RunTimeException being raised. Any ideas on how to do this?



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Problem-with-runTimeException-handling-tp5733659.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: how does force stop a ftp consumer immediately?

2013-06-03 Thread Claus Ibsen
Hi

You can possible enable streamDownload which may be able to break the
download if shutting down.

Camel uses Commons Net 3.1. So you can also look at this docs/user
forums etc to see if they have a solution to this.
Maybe there is a piece missing in camel-ftp to make this easy out of the box?

On Tue, May 28, 2013 at 2:20 PM, kknd2015 super...@gmail.com wrote:
 I have a ftp consumer to pull some huge files by a specified pattern. I need
 to stop it without stoping the camel context and jvm.
 I have tryied the stoproute with abort option, also set the ShutdownStrategy
 to 5 seconds.

camelContext.getShutdownStrategy().setTimeout(5);
camelContext.getShutdownStrategy().setTimeUnit(TimeUnit.SECONDS);
camelContext.stopRoute(routeName, 2, TimeUnit.SECONDS, false);

 but it can't work if the ftpconsumer has loginned into ftp and start pull
 files. it need spend 5-10minutes to stop.

 I try to interrrupt the binded thread, it didn't work.

 any other way i can try?





 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/how-does-force-stop-a-ftp-consumer-immediately-tp5733354.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: activemq replyTo not working sometimes

2013-06-03 Thread kiranreddykasa
While restarting child route, Existing consumers are getting closed on the
reply queue.

And again it's not trying to reconnect!!




-
Regards

kiran Reddy
--
View this message in context: 
http://camel.465427.n5.nabble.com/activemq-replyTo-not-working-sometimes-tp5733682p5733695.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Graceful shutdown not working

2013-06-03 Thread miljenko
Hi,

I've got graceful shutdown issue that can be reproduced with this route:


errorHandler(deadLetterChannel(direct:queue2)
.maximumRedeliveries(1)
);

from(seda:queue1)
.log(Checkpoint 1)
.split(body())
.log(Checkpoint 2)
.end()
.log(Checkpoint 3);


from(direct:queue2)
.log(Checkpoint 4);


If .maximumRedeliveries(1) is commented out, it works as expected, but
with this line, message stays in flight and Checkpoint 2 is never reached.

Is this a Camel bug, if not, how can it be fixed?

Best regards,
Miljenko



--
View this message in context: 
http://camel.465427.n5.nabble.com/Graceful-shutdown-not-working-tp5733697.html
Sent from the Camel - Users mailing list archive at Nabble.com.


placeholder in an endpoint?

2013-06-03 Thread PJ Walstroem
I'm trying to do 

.to(${in.header.JMSReplyTo})

but can not get it to work. Is there any way to easily fetch the Exchange
headers and use them in the ProcessorDefinition?



--
View this message in context: 
http://camel.465427.n5.nabble.com/placeholder-in-an-endpoint-tp5733698.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: placeholder in an endpoint?

2013-06-03 Thread Claus Ibsen
Hi

See this FAQ
http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html

On Mon, Jun 3, 2013 at 3:18 PM, PJ Walstroem walst...@hotmail.com wrote:
 I'm trying to do

 .to(${in.header.JMSReplyTo})

 but can not get it to work. Is there any way to easily fetch the Exchange
 headers and use them in the ProcessorDefinition?



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/placeholder-in-an-endpoint-tp5733698.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Passing a list of parameters in SQL endpoint

2013-06-03 Thread Claus Ibsen
I logged a ticket about this
https://issues.apache.org/jira/browse/CAMEL-6418

On Thu, May 16, 2013 at 9:29 AM, Claus Ibsen claus.ib...@gmail.com wrote:
 Hi

 Ah yeah maybe something we can improve.

 Can you details Camel version used. And also maybe the SQL you want to
 execute. And what your body contains.
 Then we can ponder how to improve the camel component.



 On Wed, May 15, 2013 at 10:17 AM, Shishir shi...@gmail.com wrote:
 We are using IN clause and need to supply  , delimited list of values to
 the query.

 So we have used a single # and the expectation is that, the entire list
 should be replaced.

 Tried to pass # as String String list, named parameter, but it seems camel
 breaks every , in value and try to find that many number of # in the
 query. Quite sure missing something basic.



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Passing-a-list-of-parameters-in-SQL-endpoint-tp5732583.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



 --
 Claus Ibsen
 -
 www.camelone.org: The open source integration conference.

 Red Hat, Inc.
 FuseSource is now part of Red Hat
 Email: cib...@redhat.com
 Web: http://fusesource.com
 Twitter: davsclaus
 Blog: http://davsclaus.com
 Author of Camel in Action: http://www.manning.com/ibsen



-- 
Claus Ibsen
-
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: placeholder in an endpoint?

2013-06-03 Thread PJ Walstroem
great, thank you very much!



--
View this message in context: 
http://camel.465427.n5.nabble.com/placeholder-in-an-endpoint-tp5733698p5733702.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Trying to set JaxbDataFormat on CdiCamelContext

2013-06-03 Thread Claus Ibsen
Hi

Do you have a jaxb.index file in the classpath so JAXB knows which
JAXB classes you have?

On Thu, May 30, 2013 at 4:54 PM, Ornitorrinc ornitorr...@gmail.com wrote:
 My goal is to set on the CdiCamelContext, the information required about
 JaxbDataFormat to be able to use Jaxb on the routes building. But I have not
 found how to do it on the forums or in the book Camel in Action.

 That would be an example of what I'd like to do using Spring:
 camel:camelContext id=processesCamelContext
 camel:contextScan /
 camel:dataFormats
  camel:jaxb id=jaxb contextPath=es.gc.epsilon.core.domain /
 /camel:dataFormats
 /camel:camelContext

 That is the code on my BootStrap to configure JaxbDataFormat:

   @Inject
   private CdiCamelContext camelCtx;

 [...]

 JaxbDataFormat jdb = new JaxbDataFormat();
 jdb.setContextPath(es.gc.epsilon.core.domain);
 jdb.setPrettyPrint(true);
 jdb.setCamelContext(camelCtx);
 DataFormatDefinition dfd = new DataFormatDefinition(jdb);
 camelCtx.getDataFormats().put(jaxb, dfd);

 And that is my attempt to configure a route:


 from(jms:queue:EP_QUEUE_JOURNAL).marshal().jaxb().bean(journalEventProcessor);

 But on the deploy, I get that error:

 Caused by: javax.xml.bind.JAXBException: class
 es.gc.epsilon.core.domain.JournalEvent nor any of its superclass is known to
 this context
 at
 com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:593)
 [jaxb-impl-2.2.6.jar:2.2.6]
 at
 com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:482)
 [jaxb-impl-2.2.6.jar:2.2.6]
 at
 com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:323)
 [jaxb-impl-2.2.6.jar:2.2.6]
 at
 com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:251)
 [jaxb-impl-2.2.6.jar:2.2.6]
 at
 javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:74)
 [jboss-jaxb-api_2.2_spec-1.0.3.Final.jar:1.0.3.Final]
 at
 org.apache.camel.converter.jaxb.JaxbDataFormat.marshal(JaxbDataFormat.java:146)
 [camel-jaxb-2.11.0.jar:2.11.0]
 at
 org.apache.camel.converter.jaxb.JaxbDataFormat.marshal(JaxbDataFormat.java:126)
 [camel-jaxb-2.11.0.jar:2.11.0]
 ... 47 more

 I'm using:
 Apache Camel 2.11.0
 Windows7
 Jboss7
 java version 1.7.0_11
 Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
 Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)

 Any help will be appreciated.



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Trying-to-set-JaxbDataFormat-on-CdiCamelContext-tp5733512.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Graceful shutdown not working

2013-06-03 Thread Claus Ibsen
Sounds a bit odd. If the splitter only logs

What Camel version do you use?


On Mon, Jun 3, 2013 at 3:01 PM, miljenko miljenko.br...@2e-systems.com wrote:
 Hi,

 I've got graceful shutdown issue that can be reproduced with this route:


 errorHandler(deadLetterChannel(direct:queue2)
 .maximumRedeliveries(1)
 );

 from(seda:queue1)
 .log(Checkpoint 1)
 .split(body())
 .log(Checkpoint 2)
 .end()
 .log(Checkpoint 3);


 from(direct:queue2)
 .log(Checkpoint 4);


 If .maximumRedeliveries(1) is commented out, it works as expected, but
 with this line, message stays in flight and Checkpoint 2 is never reached.

 Is this a Camel bug, if not, how can it be fixed?

 Best regards,
 Miljenko



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Graceful-shutdown-not-working-tp5733697.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


How to build a nested content based router?

2013-06-03 Thread Hilde
Hello Everybody,

How can I model a nested content based router via the java dsl?
The following trial was not successful:

.choice()
.when(header(CxfConstants.OPERATION_NAME).isEqualTo(importOrder))
   .beanRef(logOrderConverter)
   .to(jpa:com.company.production.entities.OrderMerging)
   .choice()
.when(method(routeCheck, checkSnapshot)) //content based 
router
.to(activemq:queue: + JmsDestinations.QUEUE_ORDER_INPUT +
?disableReplyTo=true)
.to(direct:endRoute)
.otherwise()
.process(new OrderConverter())
.to(activemq:queue: + JmsDestinations.QUEUE_DI_JOB +
?disableReplyTo=true)
.to(direct:endRoute)
  .endChoice()
.when(header(CxfConstants.OPERATION_NAME).isEqualTo(deleteBrandData))
   .beanRef(convertWSBeanToOrderMergingEntityBean)
   .to(jpa:com.copany.production.entities.OrderMerging)
.process(new OutMessageProcessor())
.endChoice();

Actually I don't know the differences between end() vs. endChoice().

Do you have any idea?

Thanks in advanced!

Cheers
Hilde



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-build-a-nested-content-based-router-tp5733708.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: A web service consumer route per operation

2013-06-03 Thread Hilder
Oh, that is beautiful! Thank you Claus!



--
View this message in context: 
http://camel.465427.n5.nabble.com/A-web-service-consumer-route-per-operation-tp5733630p5733709.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re:ActiveMQ Component: Stop route when no more messages are being received

2013-06-03 Thread Okello Nelson
Hi Guys,

I've been trying to work on this. Time has been hard to come by though.
Having thought hard about a potential solution, i think using timer
component would be the way to go. When period on the timer elpases, i
retrieve the number of exchanges at the endpoints of interest.

A timer route like:

from(timer://controller?fixedRate=trueperiod=5000).to(ref:routesManager)

I retrieve exchanges count in the  routesManager bean. Now, my problem is
that i still don't know how to retrieve the count of exchanges at an
endpoint. Any assistance here will be appreciated very much.

BTW: I've also posted this question at stackoverflow.com (
stackoverflow.com/questions/16898646/exchanges-count-at-camel-endpoint).
On May 30, 2013 4:48 PM, Okello Nelson cn.oke...@gmail.com wrote:

 Hi Guys,

 I'm wondering how to stop an ActiveMQ route and start another one when
 it's nolonger receiving exchanges.

 I'm thinking that I probably need to use timeouts, but I'm not sure how to
 proceed. I've done some research but no success so far. Anyone with a
 solution, please assist.

 Kind Regards,
 Okello Nelson.



Re: Camel Jetty - Performance Issue

2013-06-03 Thread WPk
public class ScanningServicesProcessor implements Processor {
 
private static GlobalLogger log =
GlobalLogger.getLogger(ScanningServicesProcessor.class.getName());
private LoadServicesHandler loadServicesHandler ;
  
@Autowired
public ScanningServicesProcessor (LoadServicesHandler loadHandler) {
this.loadServicesHandler = loadHandler;
}
/**
* 
* This method overrides the org.apache.camel.Processor.process
method.
* Consumes the HTTP based requests coming from the Captiva Service
and
* start processing in the method.
* 
* @param loadExchange
*- The Exchange object. Returns 200 - OK - When the
processing
*is completed with no errors. Returns 444 - No Content -
When
*the Freight Management - Load Details returns 404.
Returns 500
*- Internal Server Error - When any internal exception
is
*encountered. Returns 400 - Bad Request if the input
loadId is
*bad (Null, Empty or non-integer value).
*/
@Override
public void process(Exchange loadExchange) {
 
final CamelContext context = loadExchange.getContext();
final ProducerTemplate template =
context.createProducerTemplate();
int freightResponseCode = 0;
Message loadMsgOut = null;
final String loadId = (String)
loadExchange.getIn().getHeader(loadId);
MapString, Object headersMap = new HashMapString,
Object();
 
/** Start processing for a valid loadId **/
if (null != loadId  !.equals(loadId) 
loadId.matches([0-9]+)) {
FetchLoadStopResponse fetchLoadStopResponse = null;
 
log.debug(Started invoking the Load Details Service
in the Freight Management Module for the Load Id: 
+ loadId);
MapString, Object loadHeader = new HashMapString,
Object();
loadHeader.put(Exchange.HTTP_PATH, loadId);
Exchange exchange = ScanningServicesUtils
.invokeCamelHTTPService(
template,
   
ScanningServicesCommonConstants.FREIGHT_LOAD_SVCS_URL_PROPERTY,
loadHeader, null);
loadMsgOut = (null != exchange) ? exchange.getOut()
: null;
InputSource loadMsgSource = null != loadMsgOut ?
loadMsgOut
.getBody(InputSource.class) : null;
freightResponseCode = (null != loadMsgOut  null !=
loadMsgSource) ? (loadMsgOut
   
.getHeader(Exchange.HTTP_RESPONSE_CODE, Integer.class)) : 0;
log.debug(Load Details Service in the Freight
Management Module for the Load Id: 
+ loadId
+  returned a response code 
+ freightResponseCode);
 
/** Process the Load Details if the response code is
200 **/
try {
if (freightResponseCode ==
ScanningServicesCommonConstants.HTTP_STATUS_SUCCESS) {
log.debug(Load Details Service in
the Freight Management Module for the Load Id: 
+ loadId + 
returned + loadMsgSource.toString());
fetchLoadStopResponse =
loadServicesHandler
   
.processPickUpStops(context, loadMsgSource);
 
}
/**
* Set the Message Out Body from the Scanning
Services Web
* Service
**/
if (null != fetchLoadStopResponse

fetchLoadStopResponse.getLoadStops().size()  0) {
headersMap
   
.put(Exchange.HTTP_RESPONSE_CODE,
   
ScanningServicesCommonConstants.HTTP_STATUS_SUCCESS);
   
ScanningServicesUtils.setExchangeBodyAndHeaders(
loadExchange,
ScanningServicesUtils.marshal(
   
fetchLoadStopResponse,
   

Re: camel-xmljson

2013-06-03 Thread Surendra
Did anybody came across this issue? any clues?



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-xmljson-tp5733645p5733712.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel-xmljson

2013-06-03 Thread Raul Kripalani
I'll take a look at it later.

Regards,

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

On Mon, Jun 3, 2013 at 4:02 PM, Surendra surendrapam...@hotmail.com wrote:

 Did anybody came across this issue? any clues?



 --
 View this message in context:
 http://camel.465427.n5.nabble.com/camel-xmljson-tp5733645p5733712.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



Camel always sending MQRFH2 headers to target WebsphereMQ queue.

2013-06-03 Thread shashi.kant
I have been trying to send message to a IBM websphere MQ queue which has to
be in IBM500 charset, MQFMT_STRING format and encoding 273 from a Camel
2.10.4 application running on jboss. tried General ways of setting the
connectionfactory properly with following values:
connection.setTransportType(JMSC.MQJMS_CLIENT_NONJMS_MQ);
connection.setStringProperty(WMQConstants.JMS_IBM_CHARACTER_SET, 500);
connection.setStringProperty(WMQConstants.JMS_IBM_FORMAT, MQC.MQFMT_STRING);
connection.setIntProperty(WMQConstants.JMS_IBM_ENCODING, 273);
connection.setIntProperty(WMQConstants.WMQ_CONNECTION_MODE,
WMQConstants.WMQ_CLIENT_NONJMS_MQ); I have tried
IBMWebSphereMqDestinationResolver
https://jira.springsource.org/secure/attachment/12688/IBMWebSphereMqDestinationResolver.java
But everytime at the Websphere MQ end MQRFH2 header is there. I can't figure
out any solution to this problem.. Somebody please help me out.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-always-sending-MQRFH2-headers-to-target-WebsphereMQ-queue-tp5733725.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Using ActiveMQ with Camel

2013-06-03 Thread boday
likewise, you can use Camle/AMQ with Servicemix as well and it can provide
greater flexibility in terms of deployments (bundles with separate
lifecycles, etc)

see this guide for setting up AMQ:
http://servicemix.apache.org/docs/4.4.x/activemq/index.html
see this guide for setting up Camel:
http://servicemix.apache.org/docs/4.4.x/camel/index.html


VineetKK wrote
 Thanks Claus Ibsen.
 I got that working.
 
 However, later our design got changed and now I am trying to achieve the
 same but with ServiceMix.
 
 Regards,
 Vineet





-
Ben O'Day
IT Consultant -http://consulting-notes.com

--
View this message in context: 
http://camel.465427.n5.nabble.com/Using-ActiveMQ-with-Camel-tp5733407p5733728.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Accessing session variables in CAMEL given by Jboss servlet's JSPs

2013-06-03 Thread VineetKK
Hello,

I have the following scenario:

1) I have my application deployed on JBoss 7. (http://localhost:8080/)
2) I have my service mix running. (http://localhost:8181)
3) Servlet in my application sends some parameters in session of my jsp.
4) This jsp then calls camel url mentioned in beans.xml
5) I want to access these session parameters in my camel code... If I sets
the values in a hidden field I am able to access the same in Camel but when
i set in session I am not able to access the same.

Please guide me how to proceed with the same.

Regards,
Vineet



--
View this message in context: 
http://camel.465427.n5.nabble.com/Accessing-session-variables-in-CAMEL-given-by-Jboss-servlet-s-JSPs-tp5733729.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Using ActiveMQ with Camel

2013-06-03 Thread VineetKK
Yes, I agree...
After using servicemix, I really find it flexible and robust.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Using-ActiveMQ-with-Camel-tp5733407p5733730.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel Jetty - Performance Issue

2013-06-03 Thread boday
on a side note, you should reuse the ProducerTemplate in your processors
across subsequent requests...

minimize calls to context.createProducerTemplate() by using a static/class
level variable to hold this reference, should help performance...



WPk wrote
 public class ScanningServicesProcessor implements Processor {
  
 private static GlobalLogger log =
 GlobalLogger.getLogger(ScanningServicesProcessor.class.getName());
 private LoadServicesHandler loadServicesHandler ;
   
 @Autowired
 public ScanningServicesProcessor (LoadServicesHandler loadHandler)
 {
 this.loadServicesHandler = loadHandler;
 }
 /**
 * 
 * This method overrides the org.apache.camel.Processor.process
 method.
 * Consumes the HTTP based requests coming from the Captiva Service
 and
 * start processing in the method.
 * 
 * @param loadExchange
 *- The Exchange object. Returns 200 - OK - When the
 processing
 *is completed with no errors. Returns 444 - No Content
 - When
 *the Freight Management - Load Details returns 404.
 Returns 500
 *- Internal Server Error - When any internal exception
 is
 *encountered. Returns 400 - Bad Request if the input
 loadId is
 *bad (Null, Empty or non-integer value).
 */
 @Override
 public void process(Exchange loadExchange) {
  
 final CamelContext context = loadExchange.getContext();
 final ProducerTemplate template =
 context.createProducerTemplate();
 int freightResponseCode = 0;
 Message loadMsgOut = null;
 final String loadId = (String)
 loadExchange.getIn().getHeader(loadId);
 Maplt;String, Objectgt; headersMap = new
 HashMaplt;String, Objectgt;();
  
 /** Start processing for a valid loadId **/
 if (null != loadId  !.equals(loadId) 
 loadId.matches([0-9]+)) {
 FetchLoadStopResponse fetchLoadStopResponse =
 null;
  
 log.debug(Started invoking the Load Details
 Service in the Freight Management Module for the Load Id: 
 + loadId);
 Maplt;String, Objectgt; loadHeader = new
 HashMaplt;String, Objectgt;();
 loadHeader.put(Exchange.HTTP_PATH, loadId);
 Exchange exchange = ScanningServicesUtils
 .invokeCamelHTTPService(
 template,

 ScanningServicesCommonConstants.FREIGHT_LOAD_SVCS_URL_PROPERTY,
 loadHeader, null);
 loadMsgOut = (null != exchange) ?
 exchange.getOut() : null;
 InputSource loadMsgSource = null != loadMsgOut ?
 loadMsgOut
 .getBody(InputSource.class) :
 null;
 freightResponseCode = (null != loadMsgOut  null
 != loadMsgSource) ? (loadMsgOut

 .getHeader(Exchange.HTTP_RESPONSE_CODE, Integer.class)) : 0;
 log.debug(Load Details Service in the Freight
 Management Module for the Load Id: 
 + loadId
 +  returned a response code 
 + freightResponseCode);
  
 /** Process the Load Details if the response code
 is 200 **/
 try {
 if (freightResponseCode ==
 ScanningServicesCommonConstants.HTTP_STATUS_SUCCESS) {
 log.debug(Load Details Service in
 the Freight Management Module for the Load Id: 
 + loadId + 
 returned + loadMsgSource.toString());
 fetchLoadStopResponse =
 loadServicesHandler

 .processPickUpStops(context, loadMsgSource);
  
 }
 /**
 * Set the Message Out Body from the
 Scanning Services Web
 * Service
 **/
 if (null != fetchLoadStopResponse
 
 fetchLoadStopResponse.getLoadStops().size()  0) {
 headersMap

 .put(Exchange.HTTP_RESPONSE_CODE,

 

Re: Camel Splunk component

2013-06-03 Thread Preben.Asmussen
yeah thats possible.
I have some last features on the consumer side to hack on. When thats
complete lets see if we can get the Splunk dependencies hosted via SMX at
maven central :-)



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Splunk-component-tp5730476p5733739.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: mybatis, velocity and html response

2013-06-03 Thread Christoph Emmersberger
Hi Michael,

any luck with taking a look at the producer template.

As far as I can observe your routes, everything looks OK, except that it is 
still only partial and not bound together.

You can always execute myBatis from a Processor within your route, I mean 
trigger your existing code base from a Processor that does the job. This might 
ease your ramp up with the myBatis component config an eventually provide you a 
bit more freedom. Nevertheless you won't utilize the entire Camel feature set.

What I've seen in your last route, is that you might want to take a look at the 
section Using onConsume in http://camel.apache.org/mybatis.html

Kind regards,

- Christoph

On Jun 3, 2013, at 2:09 PM, Conneen Michael wrote:

 Christoph (et all), 
 
 Thanks for the reply... I apologize for not being clear.. I know that is 
 important for effective use of everyones time.   Here is the use case.. 
 User http posts a form to servlet (camel servlet 
   I have this working via the camel tomcat example as starting point.. )
 
 Servlet validates post, parses parameters, executes query, passes query 
 results to velocity to generate html, returns response
 
 It is the later that I broke down into junit tests to ensure I understand the 
 syntax and that each step works.. So.. what I have is.. 
 
 execute query .. 
   I have this working via a junit that basically has a route of . 
   from(direct:start) 
 .to(mybatis:selectMyList?statementType=SelectList) .log(Tapped message 
 body is ${body}) .to(mock:result); 
 
   and then after the template.sendBody() .. the junit does a 
   ListAccount list = 
 mock.getReceivedExchanges().get(0).getIn().getBody(List.class); 
 
   and iterates over the returned collection .. so I know myBatis is 
 working as designed. 
 
 generate html from list.. 
   I kind of have this working in a junit.. though I currently do not 
 execute myBatis via a route.. I execute it as I always have..
 
   I execute this .. (mainly because I am struggling to link the routes.. 
 ) 
   myList = mySqlSession.selectList(selectMyList);  // pojo style 
 myBaits. 
template.requestBody(direct:start, myList);
 
   my route looks like.. 
from(direct:start)   // start from camel itself .. no input queue 
.to(velocity:myVelocityTemplate.vm)// run velocity against input 
 message
.to(file://target/subfolder)// write the output of the velocity 
 to a file. 
;
 
 where I am trying to get to is something like this.. 
 
   route looks like... 
from(direct:start)   // start from camel itself .. no input queue 
   .to(mybatis:selectMyList?statementType=SelectList) 
   .log(Tapped message body is ${body})
.to(velocity:myVelocityTemplate.vm)// run velocity against input 
 message
.to(file://target/subfolder)// write the output of the velocity 
 to a file. 
;
 
 and eventually ..  burry all that into a config.. using the example tomcat 
 servlet as my starting point.. 
 
 So..finally.. to provide response to your questions.. 
 A: Are you executing this example as unit test? If so, why don't you apply 
 the ProducerTemplate and simply pass the list when executing the sendBody() 
 operation?
   I tried following the Camel In Action book's logic of an anonymous 
 inner class new Processor().., but that seems to have moved to an interface 
 now.  I will look into the ProducerTemplate...
 
 B: We'll, ... you probably need to send it somewhere via the to() statement, 
 e.g. to the jetty component or any other
   I need to send to the servlet output stream as the use case is post 
 form.. return formatted response.. 
   I was just going to tackle this problem in a plain old servlet, but 
 thought I would use this as an opportunity to learn camel's EIP capabilities. 
 ;) 
 
 Kind Regards,
 
 Michael L. Conneen
 Information Integrators, Inc.
 http://www.infointegrators.com
 PGP Key: http://mconneen.infointegrators.net/mconneen.asc
 
 
 
 On Jun 3, 2013, at 02:55 , Christoph Emmersberger wrote:
 
 Hi Michael,
 
 let me try to ask some questions:
 
 A: Are you executing this example as unit test? If so, why don't you apply 
 the ProducerTemplate and simply pass the list when executing the sendBody() 
 operation?
 B: We'll, ... you probably need to send it somewhere via the to() statement, 
 e.g. to the jetty component or any other.
 
 Cheers,
 
 - Christoph
 
 On Jun 2, 2013, at 11:01 PM, Conneen Michael wrote:
 
 Folks, 
 
 I  suspect I am a stones throw away from the ah ha moment.. but I cannot 
 seem to get there..   I am a newbie so I purchased and downloaded the Camel 
 In Action ebook... Great overview and has gotten me this far.. I do have 
 some of the individual pieces working.. I just cannot figure out how to 
 build the route correctly. 
 
 I have searched the camel user forum for mybatis selectlist velocity ... 
 but have yet to find what I am looking for... 
 
 

Re: mybatis, velocity and html response

2013-06-03 Thread Conneen Michael
Wow.. a PROACTIVE user forum.. I LOVE IT..   I have not had the chance to dig 
into that.. Thank you for the reference.. as well as the onConsume.. I plan on 
looking at both later today.

You guys ROCK! (that's a good thing in case there is any language differences 
on the list.. ;) 


Kind Regards,

Michael L. Conneen
Information Integrators, Inc.
http://www.infointegrators.com
PGP Key: http://mconneen.infointegrators.net/mconneen.asc




On Jun 3, 2013, at 13:17 , Christoph Emmersberger wrote:

 Hi Michael,
 
 any luck with taking a look at the producer template.
 
 As far as I can observe your routes, everything looks OK, except that it is 
 still only partial and not bound together.
 
 You can always execute myBatis from a Processor within your route, I mean 
 trigger your existing code base from a Processor that does the job. This 
 might ease your ramp up with the myBatis component config an eventually 
 provide you a bit more freedom. Nevertheless you won't utilize the entire 
 Camel feature set.
 
 What I've seen in your last route, is that you might want to take a look at 
 the section Using onConsume in http://camel.apache.org/mybatis.html
 
 Kind regards,
 
 - Christoph
 
 On Jun 3, 2013, at 2:09 PM, Conneen Michael wrote:
 
 Christoph (et all), 
 
 Thanks for the reply... I apologize for not being clear.. I know that is 
 important for effective use of everyones time.   Here is the use case.. 
 User http posts a form to servlet (camel servlet 
  I have this working via the camel tomcat example as starting point.. )
 
 Servlet validates post, parses parameters, executes query, passes query 
 results to velocity to generate html, returns response
 
 It is the later that I broke down into junit tests to ensure I understand 
 the syntax and that each step works.. So.. what I have is.. 
 
 execute query .. 
  I have this working via a junit that basically has a route of . 
  from(direct:start) 
 .to(mybatis:selectMyList?statementType=SelectList) .log(Tapped message 
 body is ${body}) .to(mock:result); 
 
  and then after the template.sendBody() .. the junit does a 
  ListAccount list = 
 mock.getReceivedExchanges().get(0).getIn().getBody(List.class); 
 
  and iterates over the returned collection .. so I know myBatis is 
 working as designed. 
 
 generate html from list.. 
  I kind of have this working in a junit.. though I currently do not 
 execute myBatis via a route.. I execute it as I always have..
 
  I execute this .. (mainly because I am struggling to link the routes.. 
 ) 
  myList = mySqlSession.selectList(selectMyList);  // pojo style 
 myBaits. 
   template.requestBody(direct:start, myList);
 
  my route looks like.. 
   from(direct:start)   // start from camel itself .. no input queue 
   .to(velocity:myVelocityTemplate.vm)// run velocity against input 
 message
   .to(file://target/subfolder)// write the output of the velocity 
 to a file. 
   ;
 
 where I am trying to get to is something like this.. 
 
  route looks like... 
   from(direct:start)   // start from camel itself .. no input queue 
  .to(mybatis:selectMyList?statementType=SelectList) 
  .log(Tapped message body is ${body})
   .to(velocity:myVelocityTemplate.vm)// run velocity against input 
 message
   .to(file://target/subfolder)// write the output of the velocity 
 to a file. 
   ;
 
 and eventually ..  burry all that into a config.. using the example tomcat 
 servlet as my starting point.. 
 
 So..finally.. to provide response to your questions.. 
 A: Are you executing this example as unit test? If so, why don't you apply 
 the ProducerTemplate and simply pass the list when executing the sendBody() 
 operation?
  I tried following the Camel In Action book's logic of an anonymous 
 inner class new Processor().., but that seems to have moved to an 
 interface now.  I will look into the ProducerTemplate...
 
 B: We'll, ... you probably need to send it somewhere via the to() 
 statement, e.g. to the jetty component or any other
  I need to send to the servlet output stream as the use case is post 
 form.. return formatted response.. 
  I was just going to tackle this problem in a plain old servlet, but 
 thought I would use this as an opportunity to learn camel's EIP 
 capabilities. ;) 
 
 Kind Regards,
 
 Michael L. Conneen
 Information Integrators, Inc.
 http://www.infointegrators.com
 PGP Key: http://mconneen.infointegrators.net/mconneen.asc
 
 
 
 On Jun 3, 2013, at 02:55 , Christoph Emmersberger wrote:
 
 Hi Michael,
 
 let me try to ask some questions:
 
 A: Are you executing this example as unit test? If so, why don't you apply 
 the ProducerTemplate and simply pass the list when executing the sendBody() 
 operation?
 B: We'll, ... you probably need to send it somewhere via the to() 
 statement, e.g. to the jetty component or any other.
 
 Cheers,
 
 - Christoph
 
 On Jun 2, 2013, at 11:01 

Routing from servlet to CXF JAXRS via direct

2013-06-03 Thread Todd Orr
I'm relatively new to Camel. I did research what I am attempting to do, but
did not find much help.

The goal is to take an existing standalone CXF rest service (with many
service beans) and split it into multiple independent CXF rest services
coordinated by Camel.

As an initial step, I am attempting to front the existing service with
Camel. So to be clear, at this stage, I only want to pass HTTP requests
from Camel down to the CXF service. To this end I have run into multiple
issues. I am currently unable to route the HTTP message received by Camel
to the CXF service.

My route:


route
  from
uri=servlet:///rest?servletName=CamelAPIamp;matchOnUriPrefix=true /
  to uri=ref:message-logger /
  setBodysimpleCamelHttpServletRequest/simple/setBody
  to uri=ref:message-logger /
  to uri=direct:api /
/route

I have configured CXF using camel's transport factory using:

  bean
class=org.apache.camel.component.cxf.transport.CamelTransportFactory
property name=bus ref=cxf /
property name=camelContext ref=camelContext /
property name=checkException value=true /
property name=transportIds
  list
valuehttp://cxf.apache.org/transports/camel/value
  /list
/property
  /bean

This was required to get around some earlier issues I ran into. My CXF
service is configured like:


  jaxrs:server id=restService address=direct:api
jaxrs:serviceBeans
  ...

Startup is fine. On attempting to hit the servlet via RESTClient I can see
the message I passed in logged correctly. However, the CXF service cannot
receive the message. The error is:

No consumers available on endpoint: Endpoint[direct://api] to process:
Exchange ...

Any help is greatly appreciated.

T


Re: confirm unsubscribe from users@camel.apache.org

2013-06-03 Thread Lars Fischer
Excerpts from users-help's message of 2013-06-03 21:49:31 +0200:
 Hi! This is the ezmlm program. I'm managing the
 users@camel.apache.org mailing list.
 
 I'm working for my owner, who can be reached
 at users-ow...@camel.apache.org.
 
 To confirm that you would like
 
fisc...@wiwi.uni-siegen.de
 
 removed from the users mailing list, please send a short reply 
 to this address:
 

 users-uc.1370288971.eonanebdndlhiffbgbhk-fischer=wiwi.uni-siegen...@camel.apache.org
 
 Usually, this happens when you just hit the reply button.
 If this does not work, simply copy the address and paste it into
 the To: field of a new message.
 
 or click here:
 
 mailto:users-uc.1370288971.eonanebdndlhiffbgbhk-fischer=wiwi.uni-siegen...@camel.apache.org
 
 I haven't checked whether your address is currently on the mailing list.
 To see what address you used to subscribe, look at the messages you are
 receiving from the mailing list. Each message has your address hidden
 inside its return path; for example, m...@xdd.ff.com receives messages
 with return path: users-return-number-mary=xdd.ff@camel.apache.org.
 
 Some mail programs are broken and cannot handle long addresses. If you
 cannot reply to this request, instead send a message to
 users-requ...@camel.apache.org and put the entire address listed above
 into the Subject: line.
 
 
 --- Administrative commands for the users list ---
 
 I can handle administrative requests automatically. Please
 do not send them to the list address! Instead, send
 your message to the correct command address:
 
 To subscribe to the list, send a message to:
users-subscr...@camel.apache.org
 
 To remove your address from the list, send a message to:
users-unsubscr...@camel.apache.org
 
 Send mail to the following for info and FAQ for this list:
users-i...@camel.apache.org
users-...@camel.apache.org
 
 Similar addresses exist for the digest list:
users-digest-subscr...@camel.apache.org
users-digest-unsubscr...@camel.apache.org
 
 To get messages 123 through 145 (a maximum of 100 per request), mail:
users-get.123_...@camel.apache.org
 
 To get an index with subject and author for messages 123-456 , mail:
users-index.123_...@camel.apache.org
 
 They are always returned as sets of 100, max 2000 per request,
 so you'll actually get 100-499.
 
 To receive all messages with the same subject as message 12345,
 send a short message to:
users-thread.12...@camel.apache.org
 
 The messages should contain one line or word of text to avoid being
 treated as sp@m, but I will ignore their content.
 Only the ADDRESS you send to is important.
 
 You can start a subscription for an alternate address,
 for example john@host.domain, just add a hyphen and your
 address (with '=' instead of '@') after the command word:
 users-subscribe-john=host.dom...@camel.apache.org
 
 To stop subscription for this address, mail:
 users-unsubscribe-john=host.dom...@camel.apache.org
 
 In both cases, I'll send a confirmation message to that address. When
 you receive it, simply reply to it to complete your subscription.
 
 If despite following these instructions, you do not get the
 desired results, please contact my owner at
 users-ow...@camel.apache.org. Please be patient, my owner is a
 lot slower than I am ;-)
 
 --- Enclosed is a copy of the request I received.
 
 Return-Path: fisc...@wiwi.uni-siegen.de
 Received: (qmail 50626 invoked by uid 99); 3 Jun 2013 19:49:31 -
 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230)
 by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Jun 2013 19:49:31 +
 X-ASF-Spam-Status: No, hits=-12.0 required=10.0
 tests=ASF_LIST_OPS,ASF_LIST_UNSUB_A,SPF_PASS
 X-Spam-Check-By: apache.org
 Received-SPF: pass (nike.apache.org: local policy)
 Received: from [141.99.10.66] (HELO esa-public.zimt.uni-siegen.de) 
 (141.99.10.66)
 by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Jun 2013 19:49:24 +
 X-IronPort-Anti-Spam-Filtered: true
 X-IronPort-Anti-Spam-Result: 
 AvYMAD7yrFGNYwtG/2dsb2JhbABZD4MqEiKCQ0W7RwEDgR1wBIIbMg8BG2ACJgISIQsMFQMQHQSFVYIbCJtDjnmSARaBEIw/MDiDJQ6BBgOofoJWAjmBbw
 X-IronPort-AV: E=Sophos;i=4.87,794,1363129200; 
d=scan'208;a=9251126
 Received: from mail3.ad.uni-siegen.de (HELO mail.uni-siegen.de) 
 ([141.99.11.70])
   by esa-private.zimt.uni-siegen.de with ESMTP/TLS/AES128-SHA; 03 Jun 2013 
 21:49:03 +0200
 Received: from fly (141.99.1.44) by mail.uni-siegen.de (141.99.11.70) with
  Microsoft SMTP Server (TLS) id 14.3.123.3; Mon, 3 Jun 2013 21:49:03 +0200
 Content-Type: text/plain; charset=UTF-8
 From: Lars Fischer fisc...@wiwi.uni-siegen.de
 To: users-unsubscribe users-unsubscr...@camel.apache.org
 Subject: Unsubscribe
 Date: Mon, 3 Jun 2013 21:49:02 +0200
 Message-ID: 1370288933-sup-2...@fly.wiwi.uni-siegen.de
 User-Agent: Sup/0.13.0
 Content-Transfer-Encoding: 8bit
 MIME-Version: 1.0
 X-PMWin-Version: 3.1.2.0, Antivirus-Engine: 3.43.0, Antivirus-Data: 4.89G
 X-Virus-Checked: Checked by 

Camel 2.9.2, CXF 2.6.2 - How should the response look for CXF producer using Payload dataformat

2013-06-03 Thread Monga, Sunita (GE Healthcare)
Hello all,

I have a route which sends a request to CXF webservice using Payload 
dataformat. My question should the response consist of only Soap:body or should 
it be the entire message soap:envelope

Spring context

cxf:cxfEndpoint id=xdrReceiverEndpoint
   address=${xdrWebserviceUrl}
  endpointName=s:CcdaXdrServicePort
  serviceName=s:CcdaXdrService
  
xmlns:s=http://service.webservices.xdrreceiverimpl.pil.hcit.ge.com;
 cxf:properties
entry key=mtom-enabled value=true/
 entry key=dataFormat value=PAYLOAD/
  entry key=loggingFeatureEnabled value=true/
  !-- entry key=defaultOperationName value=submitCcda/--
 /cxf:properties
/cxf:cxfEndpoint

Sample request:

static final String REQ_MESSAGE=ccdaRequest xmlns=\ 
+http://service.webservices.xdrreceiverimpl.pil.hcit.ge.com/CcdaXdrService\;
+clinicalDocument
+ccDocument
+xop:Include 
xmlns:xop=\http://www.w3.org/2004/08/xop/include\;
+  href=\cid: + REQ_DOC_CID + \/
+/ccDocument
+/clinicalDocument
+/ccdaRequest;


I am trying to use SoapUI mockservice to mock the response as below


  ccdaResponse 
xmlns=http://service.webservices.xdrreceiverimpl.pil.hcit.ge.com/CcdaXdrService;
 !--Optional:--
 ccdaAcknowledgement
!--Optional:--
statusCode0/statusCode
!--Optional:--
statusDescSuccess/statusDesc
 /ccdaAcknowledgement
  /ccdaResponse

But I get following error

[http-bio-8080-exec-1] WARN org.apache.cxf.phase.PhaseInterceptorChain - 
Interceptor for 
{http://service.webservices.xdrreceiverimpl.pil.hcit.ge.com}CcdaXdrService#{http://camel.apache.org/cxf/jaxws/dispatch}Invoke
 has thrown exception, unwinding now
org.apache.cxf.binding.soap.SoapFault: 
http://service.webservices.xdrreceiverimpl.pil.hcit.ge.com/CcdaXdrService;, 
the namespace on the ccdaResponse element, is not a valid SOAP version.
at 
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.readVersion(ReadHeadersInterceptor.java:116)
at 
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:142)
at 
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:61)

If the response is the entire soap envelope I get following error. So not sure 
what the response should like


org.apache.cxf.interceptor.Fault: Unexpected element 
{http://model.webservices.ihe.adapters.ccg.dataexchange.hcit.ge.com/CcdaXdrService}ccdaResponse
 found.   Expected {http://camel.apache.org/cxf/jaxws/dispatch}InvokeResponse.



at 
org.apache.cxf.interceptor.DocLiteralInInterceptor.validatePart(DocLiteralInInterceptor.java:258)



at 
org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:200)





Re: Routing from servlet to CXF JAXRS via direct

2013-06-03 Thread Sergey Beryozkin

Hi
On 03/06/13 20:53, Todd Orr wrote:

I'm relatively new to Camel. I did research what I am attempting to do, but
did not find much help.

The goal is to take an existing standalone CXF rest service (with many
service beans) and split it into multiple independent CXF rest services
coordinated by Camel.

As an initial step, I am attempting to front the existing service with
Camel. So to be clear, at this stage, I only want to pass HTTP requests
from Camel down to the CXF service. To this end I have run into multiple
issues. I am currently unable to route the HTTP message received by Camel
to the CXF service.

My route:


 route
   from
uri=servlet:///rest?servletName=CamelAPIamp;matchOnUriPrefix=true /
   to uri=ref:message-logger /
   setBodysimpleCamelHttpServletRequest/simple/setBody
   to uri=ref:message-logger /
   to uri=direct:api /
 /route

I have configured CXF using camel's transport factory using:

   bean
class=org.apache.camel.component.cxf.transport.CamelTransportFactory
 property name=bus ref=cxf /
 property name=camelContext ref=camelContext /
 property name=checkException value=true /
 property name=transportIds
   list
 valuehttp://cxf.apache.org/transports/camel/value
   /list
 /property
   /bean

This was required to get around some earlier issues I ran into. My CXF
service is configured like:


   jaxrs:server id=restService address=direct:api
 jaxrs:serviceBeans
   ...

Startup is fine. On attempting to hit the servlet via RESTClient I can see
the message I passed in logged correctly. However, the CXF service cannot
receive the message. The error is:

No consumers available on endpoint: Endpoint[direct://api] to process:
Exchange ...

Any help is greatly appreciated.

This is an interesting idea, to try to use a 'direct' URI scheme as 
jaxrs server endpoint. I don't think it works right now, and I'm not 
sure what has to be done yet, but definitely worth investigating...

In meantime, using Camel transport scheme will do, try something like this:

jaxrs:server id=hello_rest 
address=camel://direct:HelloWorldRestServerEndpoint

!-- usual declarations here --
/jaxrs:server

!-- Camel routes from addresses on the servlet to rest and jaxws 
servers --
camelContext id=camelContext 
xmlns=http://camel.apache.org/schema/spring; trace=false

route
from uri=servlet:///HelloWorld?matchOnUriPrefix=true/
to uri=direct:HelloWorldRestServerEndpoint/
/route
/camelContext


HTH, Sergey

T





Re: Routing from servlet to CXF JAXRS via direct

2013-06-03 Thread Todd Orr
That works perfectly. Thanks!


On Mon, Jun 3, 2013 at 4:09 PM, Sergey Beryozkin sberyoz...@gmail.comwrote:

 Hi

 On 03/06/13 20:53, Todd Orr wrote:

 I'm relatively new to Camel. I did research what I am attempting to do,
 but
 did not find much help.

 The goal is to take an existing standalone CXF rest service (with many
 service beans) and split it into multiple independent CXF rest services
 coordinated by Camel.

 As an initial step, I am attempting to front the existing service with
 Camel. So to be clear, at this stage, I only want to pass HTTP requests
 from Camel down to the CXF service. To this end I have run into multiple
 issues. I am currently unable to route the HTTP message received by Camel
 to the CXF service.

 My route:


  route
from
 uri=servlet:///rest?**servletName=CamelAPIamp;**matchOnUriPrefix=true
 /
to uri=ref:message-logger /
setBodysimple**CamelHttpServletRequest/**simple/setBody
to uri=ref:message-logger /
to uri=direct:api /
  /route

 I have configured CXF using camel's transport factory using:

bean
 class=org.apache.camel.**component.cxf.transport.**
 CamelTransportFactory
  property name=bus ref=cxf /
  property name=camelContext ref=camelContext /
  property name=checkException value=true /
  property name=transportIds
list
  
 valuehttp://cxf.apache.org/**transports/camelhttp://cxf.apache.org/transports/camel
 /value
/list
  /property
/bean

 This was required to get around some earlier issues I ran into. My CXF
 service is configured like:


jaxrs:server id=restService address=direct:api
  jaxrs:serviceBeans
...

 Startup is fine. On attempting to hit the servlet via RESTClient I can see
 the message I passed in logged correctly. However, the CXF service cannot
 receive the message. The error is:

 No consumers available on endpoint: Endpoint[direct://api] to process:
 Exchange ...

 Any help is greatly appreciated.

  This is an interesting idea, to try to use a 'direct' URI scheme as
 jaxrs server endpoint. I don't think it works right now, and I'm not sure
 what has to be done yet, but definitely worth investigating...
 In meantime, using Camel transport scheme will do, try something like this:

 jaxrs:server id=hello_rest address=camel://direct:**
 HelloWorldRestServerEndpoint
 !-- usual declarations here --
 /jaxrs:server

 !-- Camel routes from addresses on the servlet to rest and jaxws
 servers --
 camelContext id=camelContext xmlns=http://camel.apache.**
 org/schema/spring http://camel.apache.org/schema/spring trace=false
 route
 from uri=servlet:///HelloWorld?**matchOnUriPrefix=true/
 to uri=direct:**HelloWorldRestServerEndpoint/**
 /route
 /camelContext


 HTH, Sergey

 T





Performance Degradation due to Reverse DNS Lookups

2013-06-03 Thread rouble
Camel Dudes,

We have detected a very strange issue in that our https routes degrade
in performance when an ip address is used (as opposed to a domain
name).

Turns out that the Java core libraries do reverse DNS lookup for ip
address when SSL connections are created. Read all about it here:

https://forums.oracle.com/forums/thread.jspa?threadID=1532033
http://stackoverflow.com/questions/3193936/how-to-disable-javas-ssl-reverse-dns-lookup

This becomes an issue when the IP address is not configured in the DNS
server and the reverse DNS fails. In this case each connection has to
wait for a timeout of the reverse DNS request before it can proceed.
This makes domain name connections faster than ip address connections
- which is backwards.

Is this a known issue? There are a few workarounds/hacks recommended
on the interwebs, I was wondering if it would be possible to introduce
them into camel
(http://www.velocityreviews.com/forums/showpost.php?p=2959030postcount=8).

tia,
rouble


Re: mybatis, velocity and html response

2013-06-03 Thread Conneen Michael
Christoph (et all)

Thanks much..   OK.. I did get further.. I had a few errors.. 

1.  My SQLMapConfig.xml file was not there.. as when I use POJOs I usually name 
it differently and then use code to look it up.  I did see the reference to If 
the file is located in another location, you will need to configure the 
configurationUri option on the MyBatisComponent component. on the 
http://camel.apache.org/mybatis.html .. so for now.. I simply named it back.. 

2.  My velocity template was not properly referencing the returned collection.  
Fixed that and poof... 

So.. my route  of .. 
from(direct:start)   // start from camel itself .. no input 
queue 
.to(mybatis:selectMyList?statementType=SelectList)// 
select list of bulletin board messages. 
.log(Tapped message body is ${body})
.to(velocity:myVelocityTemplate.vm)// run velocity 
against input message
.to(file://target/subfolder)// write the output of the 
velocity to a file. 
.to(mock:result);

now works as desired..   Last hurdle .. get this into the servlet output 
stream..   My travels thus far have taught me a bit more as to how to read and 
interpret 
http://camel.apache.org/servlet.html

I am inching closer to my ah ha moment..  

Kind Regards,

Michael L. Conneen
Information Integrators, Inc.
http://www.infointegrators.com
PGP Key: http://mconneen.infointegrators.net/mconneen.asc

On Jun 3, 2013, at 13:17 , Christoph Emmersberger wrote:

 Hi Michael,
 
 any luck with taking a look at the producer template.
 
 As far as I can observe your routes, everything looks OK, except that it is 
 still only partial and not bound together.
 
 You can always execute myBatis from a Processor within your route, I mean 
 trigger your existing code base from a Processor that does the job. This 
 might ease your ramp up with the myBatis component config an eventually 
 provide you a bit more freedom. Nevertheless you won't utilize the entire 
 Camel feature set.
 
 What I've seen in your last route, is that you might want to take a look at 
 the section Using onConsume in http://camel.apache.org/mybatis.html
 
 Kind regards,
 
 - Christoph
 
 On Jun 3, 2013, at 2:09 PM, Conneen Michael wrote:
 
 Christoph (et all), 
 
 Thanks for the reply... I apologize for not being clear.. I know that is 
 important for effective use of everyones time.   Here is the use case.. 
 User http posts a form to servlet (camel servlet 
  I have this working via the camel tomcat example as starting point.. )
 
 Servlet validates post, parses parameters, executes query, passes query 
 results to velocity to generate html, returns response
 
 It is the later that I broke down into junit tests to ensure I understand 
 the syntax and that each step works.. So.. what I have is.. 
 
 execute query .. 
  I have this working via a junit that basically has a route of . 
  from(direct:start) 
 .to(mybatis:selectMyList?statementType=SelectList) .log(Tapped message 
 body is ${body}) .to(mock:result); 
 
  and then after the template.sendBody() .. the junit does a 
  ListAccount list = 
 mock.getReceivedExchanges().get(0).getIn().getBody(List.class); 
 
  and iterates over the returned collection .. so I know myBatis is 
 working as designed. 
 
 generate html from list.. 
  I kind of have this working in a junit.. though I currently do not 
 execute myBatis via a route.. I execute it as I always have..
 
  I execute this .. (mainly because I am struggling to link the routes.. 
 ) 
  myList = mySqlSession.selectList(selectMyList);  // pojo style 
 myBaits. 
   template.requestBody(direct:start, myList);
 
  my route looks like.. 
   from(direct:start)   // start from camel itself .. no input queue 
   .to(velocity:myVelocityTemplate.vm)// run velocity against input 
 message
   .to(file://target/subfolder)// write the output of the velocity 
 to a file. 
   ;
 
 where I am trying to get to is something like this.. 
 
  route looks like... 
   from(direct:start)   // start from camel itself .. no input queue 
  .to(mybatis:selectMyList?statementType=SelectList) 
  .log(Tapped message body is ${body})
   .to(velocity:myVelocityTemplate.vm)// run velocity against input 
 message
   .to(file://target/subfolder)// write the output of the velocity 
 to a file. 
   ;
 
 and eventually ..  burry all that into a config.. using the example tomcat 
 servlet as my starting point.. 
 
 So..finally.. to provide response to your questions.. 
 A: Are you executing this example as unit test? If so, why don't you apply 
 the ProducerTemplate and simply pass the list when executing the sendBody() 
 operation?
  I tried following the Camel In Action book's logic of an anonymous 
 inner class new Processor().., but that seems to have moved to an 
 interface now.  I will look into the 

No bean named 'CamelBeanParameterMappingStrategy' is defined

2013-06-03 Thread salemi
Hi,

I started profilng my code with an APM software and I
seeorg.springframework.beans.factory.NoSuchBeanDefinitionException and the
message detail is No bean named 'CamelBeanParameterMappingStrategy' is
defined.

Did I miss something in my Spring Context?

Thanks,
Ali



-
Alireza Salemi
--
View this message in context: 
http://camel.465427.n5.nabble.com/No-bean-named-CamelBeanParameterMappingStrategy-is-defined-tp5733753.html
Sent from the Camel - Users mailing list archive at Nabble.com.


SSH using dynamic slip

2013-06-03 Thread Gvvenkat
Hi, 
 I am trying to build a dynamic end using Slip for SSH flow. The goal is to
run a ksh command in a remote linux machine. End machinne  script name
changes based on the input file name. So I decided to use slip and this same
method has helped me in solving such issues before ( with ftp compoants).
With SSH componant, I tried setting up the ksh command in body and return
SSH ( synamically built command) as return string of the method. For some
reason, the ksh is command is not getting executed. This is all done thru
Java DSL. Can you please help me how I can achieve this using Java DSL. 

Thanks a lot

GVvenkat



--
View this message in context: 
http://camel.465427.n5.nabble.com/SSH-using-dynamic-slip-tp5733752.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Performance Degradation due to Reverse DNS Lookups

2013-06-03 Thread rouble
In my router configuration I am specifying https4 - is that what you
wanted to know?

cheers
rouble

On Mon, Jun 3, 2013 at 9:59 PM, Willem jiang willem.ji...@gmail.com wrote:
 Hi,

 There are lots of http related components can provide the https connection, 
 it could be helpful if you can tell us which http component you are using.

 --
 Willem Jiang

 Red Hat, Inc.
 FuseSource is now part of Red Hat
 Web: http://www.fusesource.com | http://www.redhat.com
 Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
 (English)
   http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
 Twitter: willemjiang
 Weibo: 姜宁willem





 On Tuesday, June 4, 2013 at 5:20 AM, rouble wrote:

 Camel Dudes,

 We have detected a very strange issue in that our https routes degrade
 in performance when an ip address is used (as opposed to a domain
 name).

 Turns out that the Java core libraries do reverse DNS lookup for ip
 address when SSL connections are created. Read all about it here:

 https://forums.oracle.com/forums/thread.jspa?threadID=1532033
 http://stackoverflow.com/questions/3193936/how-to-disable-javas-ssl-reverse-dns-lookup

 This becomes an issue when the IP address is not configured in the DNS
 server and the reverse DNS fails. In this case each connection has to
 wait for a timeout of the reverse DNS request before it can proceed.
 This makes domain name connections faster than ip address connections
 - which is backwards.

 Is this a known issue? There are a few workarounds/hacks recommended
 on the interwebs, I was wondering if it would be possible to introduce
 them into camel
 (http://www.velocityreviews.com/forums/showpost.php?p=2959030postcount=8).

 tia,
 rouble






Re: Performance Degradation due to Reverse DNS Lookups

2013-06-03 Thread Willem jiang
Hi,

I'm not sure if setting the dummy implementation of X509HostnameVerifier can 
resolve the issue.
Can you try it to see if it work?


--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
  http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Tuesday, June 4, 2013 at 10:23 AM, rouble wrote:

 In my router configuration I am specifying https4 - is that what you
 wanted to know?
  
 cheers
 rouble
  
 On Mon, Jun 3, 2013 at 9:59 PM, Willem jiang willem.ji...@gmail.com 
 (mailto:willem.ji...@gmail.com) wrote:
  Hi,
   
  There are lots of http related components can provide the https connection, 
  it could be helpful if you can tell us which http component you are using.
   
  --
  Willem Jiang
   
  Red Hat, Inc.
  FuseSource is now part of Red Hat
  Web: http://www.fusesource.com | http://www.redhat.com
  Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
  (English)
  http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
  Twitter: willemjiang
  Weibo: 姜宁willem
   
   
   
   
   
  On Tuesday, June 4, 2013 at 5:20 AM, rouble wrote:
   
   Camel Dudes,

   We have detected a very strange issue in that our https routes degrade
   in performance when an ip address is used (as opposed to a domain
   name).

   Turns out that the Java core libraries do reverse DNS lookup for ip
   address when SSL connections are created. Read all about it here:

   https://forums.oracle.com/forums/thread.jspa?threadID=1532033
   http://stackoverflow.com/questions/3193936/how-to-disable-javas-ssl-reverse-dns-lookup

   This becomes an issue when the IP address is not configured in the DNS
   server and the reverse DNS fails. In this case each connection has to
   wait for a timeout of the reverse DNS request before it can proceed.
   This makes domain name connections faster than ip address connections
   - which is backwards.

   Is this a known issue? There are a few workarounds/hacks recommended
   on the interwebs, I was wondering if it would be possible to introduce
   them into camel
   (http://www.velocityreviews.com/forums/showpost.php?p=2959030postcount=8).

   tia,
   rouble
   
  





Re: unmarshalling with jaxb

2013-06-03 Thread wagnermarques

I will study it, thanks for be kind



--
View this message in context: 
http://camel.465427.n5.nabble.com/unmarshalling-with-jaxb-tp5733598p5733743.html
Sent from the Camel - Users mailing list archive at Nabble.com.


using http:conduit without CXF

2013-06-03 Thread Pikej
Hi,

I am wondering if it is possible to use http:conduit without CXF. I would
like to use it with https4 compnent. I was looking for examples but all I
have found is about CXF. 

This is the part i would like to use with my https4 component:

  http:conduit
name={http://www.company.com/product/orderEntry/service/1}OrderEntry.http-conduit;
http:tlsClientParameters disableCNCheck=true
  sec:trustManagers
sec:keyStore type=JKS password=${trustStore.password}
file=${trustStore.file}/
  /sec:trustManagers
  sec:cipherSuitesFilter
sec:include.*_EXPORT_.*/sec:include
sec:include.*_EXPORT1024_.*/sec:include
sec:include.*_WITH_DES_.*/sec:include
sec:include.*_WITH_NULL_.*/sec:include
sec:exclude.*_DH_anon_.*/sec:exclude
  /sec:cipherSuitesFilter
/http:tlsClientParameters
  /http:conduit

How can I instruct Camel to consider this conduit with my https4 requests ?

Thanks!



--
View this message in context: 
http://camel.465427.n5.nabble.com/using-http-conduit-without-CXF-tp5733744.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: camel-xmljson

2013-06-03 Thread Surendra
Thank you. 

Date: Mon, 3 Jun 2013 08:53:18 -0700
From: ml-node+s465427n5733722...@n5.nabble.com
To: surendrapam...@hotmail.com
Subject: Re: camel-xmljson



I'll take a look at it later.


Regards,


*Raúl Kripalani*

Enterprise Architect, Open Source Integration specialist, Program

Manager | Apache

Camel Committer

http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani
http://blog.raulkr.net | twitter: @raulvk


On Mon, Jun 3, 2013 at 4:02 PM, Surendra [hidden email] wrote:


 Did anybody came across this issue? any clues?







 --

 View this message in context:

 http://camel.465427.n5.nabble.com/camel-xmljson-tp5733645p5733712.html
 Sent from the Camel - Users mailing list archive at Nabble.com.














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

http://camel.465427.n5.nabble.com/camel-xmljson-tp5733645p5733722.html



To unsubscribe from camel-xmljson, click here.

NAML
  



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-xmljson-tp5733645p5733742.html
Sent from the Camel - Users mailing list archive at Nabble.com.