Re: Memory leak with Camel JMX DefaultMBeanServerInterceptor

2012-06-11 Thread Claus Ibsen
Hi

Yes there has been some fixes in recent Camel releases. So you can try to
upgrade your Camel.


On Mon, Jun 11, 2012 at 3:12 AM, mattg matthew.glee...@fronde.com wrote:

 I've been looking into a memory leak we're experiencing with our Camel
 application and have found that the culprit seems to be
 com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.
 Using MAT  taking heap dumps at the start and end of an 8 day period I can
 see that the memory consumption for DefaultMBeanServerInterceptor has gone
 from 115mb to 541mb.
 If I drill down further I can see that the number of objects accumulated by
 DefaultMBeanServerInterceptor  has increased from 4,403 to 14,385. Of the
 managed resource objects being held by DefaultMBeanServerInterceptor, their
 were 703 instances of org.apache.camel.management.mbean.ManagedThreadPool
 at
 the beginning of the 8 day period, and 10,657 by the end. So the majority
 of
 14,385 objects being held by DefaultMBeanServerInterceptor were
 ManagedThreadPool.

 We are running Camel version 2.8.3. The application is a messaging (SMS 
 email) gateway connecting to multiple SMSCs and dozens of clients. It has
 approx 340 routes and uses ActiveMQ.

 We make extensive use of JMX to connect and query for memory usage, routes
 and ActiveMQ queues every minute or so from a separate monitoring
 application.

 Is there any knows memory issues with JMX being enabled in Camel,
 specifically with ManagedThreadPool?

 --
 View this message in context:
 http://camel.465427.n5.nabble.com/Memory-leak-with-Camel-JMX-DefaultMBeanServerInterceptor-tp5714271.html
 Sent from the Camel - Users mailing list archive at Nabble.com.




-- 
Claus Ibsen
-
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Using % sign in spring route sql select fails

2012-06-11 Thread Jesper Olsen
We are using camel version 2.7.1

--
View this message in context: 
http://camel.465427.n5.nabble.com/Using-sign-in-spring-route-sql-select-fails-tp5714171p5714275.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel aws s3 get only files I need

2012-06-11 Thread Bilgin Ibryam
inline

On 8 June 2012 18:34, fachhoch fachh...@gmail.com wrote:
 The change is very simple

yes that's correct


 here the code from S3consumer


 first change is to the S3Configuration  add new field String prefix;


 second update the above method to call setPrefix on   the ListObjectsRequest
 if prefix is present


but it will be more helpful if you provide a patch with unit tests for
the change.
Also it seems like the prefix and separator goes together, so it will
be better if we add both options now.

have a look here on how to submit patches here
http://camel.apache.org/contributing.html

Thanks
Bilgin




 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/camel-aws-s3-get-only-files-I-need-tp5714095p5714226.html
 Sent from the Camel - Users mailing list archive at Nabble.com.


Handling Database and Activemq connection exceptions

2012-06-11 Thread Nafees
Hi,

I want to catch database related exceptions. e.g. if username  or password
are incorrect , it throws exceptions, i want a mechanism in which i could
handle the exception, and specify user what details were wrong. Database
details are specified in persistence.xml file and we are using JpaTemplate
to perform database operations.

my camel context is configured as a spring bean 

camel:camelContext id=camelServer  

camel:routeBuilder id=tuberoute ref=tubeRoute /

/camel:camelContext


I have a main class like this 

MediationServer extends org.apache.camel.spring.Main {
...
new MediationServer.run();  // it loads xml file etc etc 

//  we are keeping try - catch also exception is not getting caught.
}


in tuberoute we have a route which listens to activemq

from(activemq:queue:mediation-mq).to(bean:mediationManager?method=processMessage);


If activemq instance is not running  - in that case also, i would specify
user to start the activemq service. 

I am unable to handle these connection related exceptions. Please guide me. 

Thanks

 Nafees

--
View this message in context: 
http://camel.465427.n5.nabble.com/Handling-Database-and-Activemq-connection-exceptions-tp5714284.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Using % sign in spring route sql select fails

2012-06-11 Thread Claus Ibsen
Hi

I logged a ticket to see if we can fix this
https://issues.apache.org/jira/browse/CAMEL-5355


On Mon, Jun 11, 2012 at 9:38 AM, Jesper Olsen j...@dr.dk wrote:

 We are using camel version 2.7.1

 --
 View this message in context:
 http://camel.465427.n5.nabble.com/Using-sign-in-spring-route-sql-select-fails-tp5714171p5714275.html
 Sent from the Camel - Users mailing list archive at Nabble.com.




-- 
Claus Ibsen
-
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: doTry/doCatch with original message

2012-06-11 Thread Jens

Claus Ibsen-2 wrote
 
 On Wed, May 30, 2012 at 2:09 PM, Jens wrote:

 Jens wrote


 Claus Ibsen-2 wrote

 Hi

 Have you tried enabling stream caching?
 http://camel.apache.org/stream-caching.html


 Yes, and I also tried converting the message to a String right away but
 neither change helped.

 This is with Camel 2.8.3, by the way.


 It seems this problem is in some way related to the CXF component. If I
 simply replace the routing to the primary CXF endpoint with a
 throwException
 the route works as expected, resuming with the original message in the
 catch
 block. So does the CXF component erase the orignal message? Is this
 worthy
 of filing a bug?

 
 Yes it would help a lot if you can create a small sample application /
 unit test that reproduces the issue.
 And then create a JIRA ticket and attach the sample.\
 

https://issues.apache.org/jira/browse/CAMEL-5356

--
View this message in context: 
http://camel.465427.n5.nabble.com/doTry-doCatch-with-original-message-tp5713695p5714289.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel Error handling throwing exception; not moving to error queue

2012-06-11 Thread javaxmlsoapdev
using 2.9.2. Could you let me know if there is an issue with such
deadLetterChannel setting working with receipientList EIP?

Thanks,

--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Error-handling-throwing-exception-not-moving-to-error-queue-tp5714076p5714290.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Using % sign in spring route sql select fails

2012-06-11 Thread Claus Ibsen
In XML DSL you should be able to do it using spring bean style. It does
take a bit XML as you need to setup a spring jdbc template also

bean id=myJdbcTemplate class= ...JdbcTemplate
 ... the data source need to be injected
/bean

bean id=foo class=org.apache.camel.component.sql.SqlEndpoint
  property name=jdbcTemplate ref=myJdbcTemplate/
  property name=query value=insert the SQL value here/
/bean

And in the DSL refer to the foo endpoint

to ref=foo/



On Mon, Jun 11, 2012 at 12:58 PM, Claus Ibsen claus.ib...@gmail.com wrote:

 Hi

 I logged a ticket to see if we can fix this
 https://issues.apache.org/jira/browse/CAMEL-5355


 On Mon, Jun 11, 2012 at 9:38 AM, Jesper Olsen j...@dr.dk wrote:

 We are using camel version 2.7.1

 --
 View this message in context:
 http://camel.465427.n5.nabble.com/Using-sign-in-spring-route-sql-select-fails-tp5714171p5714275.html
 Sent from the Camel - Users mailing list archive at Nabble.com.




 --
 Claus Ibsen
 -
 FuseSource
 Email: cib...@fusesource.com
 Web: http://fusesource.com
 Twitter: davsclaus, fusenews
 Blog: http://davsclaus.com
 Author of Camel in Action: http://www.manning.com/ibsen




-- 
Claus Ibsen
-
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Web Services calls via camel not working (Class cast exception)

2012-06-11 Thread semecamel
I have a web service which I published via cxf endpoint and added to my camel
context in spring xml file.
My web service method returns an object. I created a Processor class to do
actual work.

How I can return an object after calling my cxf endpoint? 
I am getting class cast exception. 
I am trying everything, but it is not working, I always get class cast
exception

Here is my sample route

camel:route id=loanBrokerRoute
camel:from uri=cxf:bean:wscamel/
camel:process ref=orderProcessor/
camel:process ref=preOrderProcessor/

/camel:route

--
View this message in context: 
http://camel.465427.n5.nabble.com/Web-Services-calls-via-camel-not-working-Class-cast-exception-tp5714293.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How does Camel work with ofbiz?

2012-06-11 Thread bibryam
Just an update on this old thread: I've blogged about how to connect OFBiz
with Camel here
http://www.ofbizian.com/2012/06/connect-apache-ofbiz-with-real-world.html

And provided two examples for connecting them:
1. Run Camel as part of OFBiz
2. Run Camel and OFBiz separately and use the RMI component for the
interaction.

Bilgin

--
View this message in context: 
http://camel.465427.n5.nabble.com/How-does-Camel-work-with-ofbiz-tp4522972p5714295.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Possible threading issue

2012-06-11 Thread jhart
Thanks for the feedback, I've reviewed the references you pointed out and
decided to simplify the route.

I have remove all of my .threads(...) DSL calls.  I only use
parallelProcessing in 1 place now and I am still running into the problem.

Below is a version that fails and one that works because a threads(1,1)
makes it single threaded at 1 point.

*This route throws the NullPointerException:*

  ExpressionNode resultDefinition = routeDefinition.split()
  
.tokenizeXML(GenericTMCXMLProcessor.FLOW_TAG_DELIMITER).streaming()
   .parallelProcessing().timeout(timeout)
   .process(new GenericTMCXMLProcessor(appGlobals, jobProps))
   .split(genericTmcMappingProcessor)
   .process(preDestinationProcessor);
   .multicast()
  .to(destinationURIs);

*This version works:*

  ExpressionNode resultDefinition = routeDefinition.split()
  
.tokenizeXML(GenericTMCXMLProcessor.FLOW_TAG_DELIMITER).streaming()
   .parallelProcessing().timeout(timeout)
   .process(new GenericTMCXMLProcessor(appGlobals, jobProps))
   .split(genericTmcMappingProcessor)
   .process(preDestinationProcessor);
   *.threads(1, 1)*
   .multicast()
.to(destinationURIs);


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


RE: Possible threading issue

2012-06-11 Thread jhart
Thanks.

From: ext jhart [via Camel] [mailto:ml-node+s465427n5714299...@n5.nabble.com]
Sent: Monday, June 11, 2012 2:22 PM
To: Hart James (Nokia-LC/Malvern)
Subject: Re: Possible threading issue

Thanks for the feedback, I've reviewed the references you pointed out and 
decided to simplify the route.

I have remove all of my .threads(...) DSL calls.  I only use parallelProcessing 
in 1 place now and I am still running into the problem.

Below is a version that fails and one that works because a threads(1,1) makes 
it single threaded at 1 point.

This route throws the NullPointerException:

  ExpressionNode resultDefinition = routeDefinition.split()
   
.tokenizeXML(GenericTMCXMLProcessor.FLOW_TAG_DELIMITER).streaming()
   .parallelProcessing().timeout(timeout)
   .process(new GenericTMCXMLProcessor(appGlobals, jobProps))
   .split(genericTmcMappingProcessor)
   .process(preDestinationProcessor);
   .multicast()
  .to(destinationURIs);

This version works:

  ExpressionNode resultDefinition = routeDefinition.split()
   
.tokenizeXML(GenericTMCXMLProcessor.FLOW_TAG_DELIMITER).streaming()
   .parallelProcessing().timeout(timeout)
   .process(new GenericTMCXMLProcessor(appGlobals, jobProps))
   .split(genericTmcMappingProcessor)
   .process(preDestinationProcessor);
   .threads(1, 1)
   .multicast()
.to(destinationURIs);


If you reply to this email, your message will be added to the discussion below:
http://camel.465427.n5.nabble.com/Possible-threading-issue-tp5714069p5714299.html
To unsubscribe from Possible threading issue, click 
herehttp://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=5714069code=amFtZXMuaGFydEBub2tpYS5jb218NTcxNDA2OXwtMTY1NDQ3ODE3NA==.
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


The information contained in this communication may be CONFIDENTIAL and is 
intended only for the use of the recipient(s) named above. If you are not the 
intended recipient, you are hereby notified that any dissemination, 
distribution, or copying of this communication, or any of its contents, is 
strictly prohibited. If you have received this communication in error, please 
notify the sender and delete/destroy the original message and any copy of it 
from your computer or paper files.


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

Re: Custom Camel Component instantiated twice

2012-06-11 Thread boday
your CustomComponent class should only be instantiated once per CamelContext,
but there can be multiple Consumer  Producer instances in a given context
(one per route reference)


Edwin wrote
 
 Hi Folks
 
 I am referencing the same camel endpoint from 2 different routes.
 
 E.g.
 customcomponent:custom-uri is being referenced from the 2 routes below
 from(“customcomponent:custom-uri”).to(…….
 from(“file:myfile?fileProperties..”).to(“customcomponent:custom-uri”);
 
 I notice that the corresponding camel component(customcomponent) is
 instantiated twice - hence endpoint instantiated twice also.
 
 I would have expected it only to be instantiated once, i.e. component,
 endpoint, consumer and producer shared between the 2 different routes.
 
 Could you please confirm whether this behaviour is as expected
 
 Thanks
 Edwin
 


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

--
View this message in context: 
http://camel.465427.n5.nabble.com/Custom-Camel-Component-instantiated-twice-tp5714297p5714302.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Custom Camel Component instantiated twice

2012-06-11 Thread gilboy
So if there can be multiple Consumer  Producer instances in a given context
(one per route reference), this would imply that there could be multiple
instance of the Endpoint(again one per route reference)?

I have a custom component where I need to share state between the producer
and the consumer for the same endpoint across different routes. Is this
possible?

Thanks
Joe

--
View this message in context: 
http://camel.465427.n5.nabble.com/Custom-Camel-Component-instantiated-twice-tp5714297p5714304.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Custom Camel Component instantiated twice

2012-06-11 Thread boday
yes, there are multiple Endpoint instances as well (one per route
reference)...

If you need to share state between instances, then you can define it in the
Component class and pass into into endpoint/producer/consumer instances via
constructors. for an example of doing this, see camel-hazelcast, it passes
around references to hazelcastInstance to its producers/consumers

https://svn.apache.org/repos/asf/camel/trunk/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/

otherwise, I suppose you could use class level variables in the
Endpoint/Consumer/Producer classes as well...


gilboy wrote
 
 So if there can be multiple Consumer  Producer instances in a given
 context (one per route reference), this would imply that there could be
 multiple instance of the Endpoint(again one per route reference)?
 
 I have a custom component where I need to share state between the producer
 and the consumer for the same endpoint across different routes. Is this
 possible?
 
 Thanks
 Joe
 


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

--
View this message in context: 
http://camel.465427.n5.nabble.com/Custom-Camel-Component-instantiated-twice-tp5714297p5714307.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Custom Camel Component instantiated twice

2012-06-11 Thread Edwin
Hi Folks

I am referencing the same camel endpoint from 2 different routes.

E.g.
customcomponent:custom-uri is being referenced from the 2 routes below
from(“customcomponent:custom-uri”).to(…….
from(“file:myfile?fileProperties..”).to(“customcomponent:custom-uri”);

I notice that the corresponding camel component(customcomponent) is
instantiated twice - hence endpoint instantiated twice also.

I would have expected it only to be instantiated once, i.e. component,
endpoint, consumer and producer shared between the 2 different routes.

Could you please confirm whether this behaviour is as expected

Thanks
Edwin


--
View this message in context: 
http://camel.465427.n5.nabble.com/Custom-Camel-Component-instantiated-twice-tp5714297.html
Sent from the Camel - Users mailing list archive at Nabble.com.


How to generate XML comments in XML file using Java annotations

2012-06-11 Thread reddy.janke
Hi , I am generating XML file based on the Java beans using JAXB. I want to
add XML comments in the XML file. Please let me know how to add comments.


--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-generate-XML-comments-in-XML-file-using-Java-annotations-tp5714301.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Simplest Camel HTTP4 example not working!

2012-06-11 Thread pmcb55
Hi,

I'm using Camel already, but am now trying to use the HTTP component, and
started with the simplest possible usage I can think of - sending a simple
search query to Google using a ProducerTemplate. The code runs, but just
hangs on the 'template.request(...' call until a timeout of two minutes
before throwing a NPE and then the 'DONE!' message:


package com.test;

import org.apache.camel.CamelContext;
import org.apache.camel.Exchange;
import org.apache.camel.Message;
import org.apache.camel.Processor;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.impl.DefaultCamelContext;

public class OrderProduct {
public static void main(String[] args) {
CamelContext context = new DefaultCamelContext();

try {
ProducerTemplate template = context.createProducerTemplate();
context.start();

Exchange exchange =
template.request(http4://www.google.com/search, new Processor() {
public void process(Exchange exchange) throws Exception {
}
});

if (null != exchange) {
Message out = exchange.getOut();
int responseCode =
out.getHeader(Exchange.HTTP_RESPONSE_CODE, Integer.class);
System.out.println(Response:  +
String.valueOf(responseCode));
}
   
Thread.sleep(1000 * 3);
context.stop();
} catch (Exception ex) {
System.out.println(Exception:  + ex);
}

System.out.println(DONE!!);
}
}


*CONSOLE OUTPUT*

11-Jun-2012 20:46:13 org.apache.camel.impl.DefaultCamelContext start
INFO: Apache Camel 2.9.2 (CamelContext: camel-1) is starting
11-Jun-2012 20:46:13 org.apache.camel.management.ManagementStrategyFactory
create
INFO: JMX enabled. Using ManagedManagementStrategy.
11-Jun-2012 20:46:13
org.apache.camel.management.DefaultManagementLifecycleStrategy doStart
INFO: StatisticsLevel at All so enabling load performance statistics
11-Jun-2012 20:46:14
org.apache.camel.impl.converter.AnnotationTypeConverterLoader load
INFO: Found 3 packages with 15 @Converter classes to load
11-Jun-2012 20:46:14
org.apache.camel.impl.converter.BaseTypeConverterRegistry
loadCoreTypeConverters
INFO: Loaded 170 core type converters (total 170 type converters)
11-Jun-2012 20:46:14
org.apache.camel.impl.converter.AnnotationTypeConverterLoader load
INFO: Loaded 2 @Converter classes
11-Jun-2012 20:46:14
org.apache.camel.impl.converter.BaseTypeConverterRegistry loadTypeConverters
INFO: Loaded additional 9 type converters (total 179 type converters) in
0.013 seconds
11-Jun-2012 20:46:14 org.apache.camel.impl.DefaultCamelContext start
INFO: Total 0 routes, of which 0 is started.
11-Jun-2012 20:46:14 org.apache.camel.impl.DefaultCamelContext start
INFO: Apache Camel 2.9.2 (CamelContext: camel-1) started in 0.292 seconds
11-Jun-2012 20:46:14 org.apache.camel.component.http4.HttpComponent
createConnectionManager
INFO: Created ClientConnectionManager
org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager@18b1aebf
11-Jun-2012 20:46:14 org.apache.camel.component.http4.HttpComponent
registerPort
INFO: Registering PLAIN scheme http on port 80
11-Jun-2012 20:46:14 org.apache.camel.component.http4.HttpComponent
registerPort
INFO: Registering PLAIN scheme http4 on port 80
Exception: java.lang.NullPointerException
DONE!!


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


Bit-wise operators in Simple?

2012-06-11 Thread dunnlow
I just wanted to verify that I'm not missing something.  I'd like to do bit
arithmetic (i.e. use a bitmapped value).  I know I could use javascript, but
I like Simple's the null safe operator;  however I don't see where bitwise
operators exist in Simple.  Is that correct?

--
View this message in context: 
http://camel.465427.n5.nabble.com/Bit-wise-operators-in-Simple-tp5714306.html
Sent from the Camel - Users mailing list archive at Nabble.com.


XPath Filter not working

2012-06-11 Thread paramjyotsingh
Hi,

I am trying to use XPath, but somehow it is not responding the way it is
supposed to.

Example i have a xml input of type:-

Products
   Product type=BOX
   ..
   /Product
/Products

and I am trying spring dsl filter:-

route
  from uri=file:///test/folder /
  filter
 xpath/Products/Product[@type='BOX']/xpath
 to uri=file://test/matchedFile /
  /filter
/route

with XML input i provided the filter should match Xpath predicate and should
move file to /test/mactchedFile folder. But this is not happening

Please help me to resolve this issue.

Regards,
Paramjyot

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


Re: Custom Camel Component instantiated twice

2012-06-11 Thread Claus Ibsen
On Mon, Jun 11, 2012 at 11:48 PM, boday ben.o...@initekconsulting.comwrote:

 yes, there are multiple Endpoint instances as well (one per route
 reference)...


No that depends if your endpoint is singleton or not.
If the producer and consumer have the exact uri, then they can share the
same endpoint if its singleton.

And in terms of lifecycle of the Camel components/endpoints/services etc,
then read this
http://camel.apache.org/lifecycle.html




 If you need to share state between instances, then you can define it in the
 Component class and pass into into endpoint/producer/consumer instances via
 constructors. for an example of doing this, see camel-hazelcast, it passes
 around references to hazelcastInstance to its producers/consumers


 https://svn.apache.org/repos/asf/camel/trunk/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/

 otherwise, I suppose you could use class level variables in the
 Endpoint/Consumer/Producer classes as well...


 gilboy wrote
 
  So if there can be multiple Consumer  Producer instances in a given
  context (one per route reference), this would imply that there could be
  multiple instance of the Endpoint(again one per route reference)?
 
  I have a custom component where I need to share state between the
 producer
  and the consumer for the same endpoint across different routes. Is this
  possible?
 
  Thanks
  Joe
 


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

 --
 View this message in context:
 http://camel.465427.n5.nabble.com/Custom-Camel-Component-instantiated-twice-tp5714297p5714307.html
 Sent from the Camel - Users mailing list archive at Nabble.com.




-- 
Claus Ibsen
-
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: How to generate XML comments in XML file using Java annotations

2012-06-11 Thread Claus Ibsen
On Mon, Jun 11, 2012 at 9:46 PM, reddy.janke reddy.ja...@gmail.com wrote:

 Hi , I am generating XML file based on the Java beans using JAXB. I want to
 add XML comments in the XML file. Please let me know how to add comments.


This is not possible with JAXB as far as I remember.
Something we would love being added to JAXB. But so far sun/oracle has not
raised to the occasion.




 --
 View this message in context:
 http://camel.465427.n5.nabble.com/How-to-generate-XML-comments-in-XML-file-using-Java-annotations-tp5714301.html
 Sent from the Camel - Users mailing list archive at Nabble.com.




-- 
Claus Ibsen
-
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Bit-wise operators in Simple?

2012-06-11 Thread Claus Ibsen
On Mon, Jun 11, 2012 at 11:47 PM, dunnlow dunn...@yahoo.com wrote:

 I just wanted to verify that I'm not missing something.  I'd like to do bit
 arithmetic (i.e. use a bitmapped value).  I know I could use javascript,
 but
 I like Simple's the null safe operator;  however I don't see where bitwise
 operators exist in Simple.  Is that correct?


Yes there is no bitwise operations.
Some of the other languages most likely have that.
http://camel.apache.org/languages


 --
 View this message in context:
 http://camel.465427.n5.nabble.com/Bit-wise-operators-in-Simple-tp5714306.html
 Sent from the Camel - Users mailing list archive at Nabble.com.




-- 
Claus Ibsen
-
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: XPath Filter not working

2012-06-11 Thread Claus Ibsen
On Tue, Jun 12, 2012 at 12:17 AM, paramjyotsingh
paramjyotsi...@gmail.comwrote:

 Hi,

 I am trying to use XPath, but somehow it is not responding the way it is
 supposed to.

 Example i have a xml input of type:-

 Products
   Product type=BOX
   ..
   /Product
 /Products

 and I am trying spring dsl filter:-

 route
  from uri=file:///test/folder /
  filter
 xpath/Products/Product[@type='BOX']/xpath
 to uri=file://test/matchedFile /
  /filter
 /route

 with XML input i provided the filter should match Xpath predicate and
 should
 move file to /test/mactchedFile folder. But this is not happening

 Please help me to resolve this issue.


What version of Camel are you using?

And are you using any namespaces in your XML? If so the xpath expression
must have namespace mapping as well.

Also you can try to force loading the file content into memory before the
xpath filter, using convert body to:
 from uri=file:///test/folder /
 convertBodyTo type=String/
 filter



Regards,
 Paramjyot

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




-- 
Claus Ibsen
-
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Web Services calls via camel not working (Class cast exception)

2012-06-11 Thread Claus Ibsen
Hi

If you read this page, you get some pointers how to ask for help.
http://camel.apache.org/support

How do you expect people want to help you when you provide little details.



On Mon, Jun 11, 2012 at 5:09 PM, semecamel diata.ke...@gmail.com wrote:

 I have a web service which I published via cxf endpoint and added to my
 camel
 context in spring xml file.
 My web service method returns an object. I created a Processor class to do
 actual work.

 How I can return an object after calling my cxf endpoint?
 I am getting class cast exception.
 I am trying everything, but it is not working, I always get class cast
 exception

 Here is my sample route

 camel:route id=loanBrokerRoute
camel:from uri=cxf:bean:wscamel/
camel:process ref=orderProcessor/
camel:process ref=preOrderProcessor/

/camel:route

 --
 View this message in context:
 http://camel.465427.n5.nabble.com/Web-Services-calls-via-camel-not-working-Class-cast-exception-tp5714293.html
 Sent from the Camel - Users mailing list archive at Nabble.com.




-- 
Claus Ibsen
-
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: sftp to remote server and move ftpied file to other location on remote server

2012-06-11 Thread Claus Ibsen
On Tue, Jun 12, 2012 at 12:22 AM, paramjyotsingh
paramjyotsi...@gmail.comwrote:

 I tried this but still same problem. It is not creating temporary file in
 folder /a/test2/
 instead it creates /a/test1/a/test2 folder and copies temporary file there.


I am not sure that absolute paths is supported for temp files.
Its a temporary file that is supposed to be relative to the target file.



 --
 View this message in context:
 http://camel.465427.n5.nabble.com/sftp-to-remote-server-and-move-ftpied-file-to-other-location-on-remote-server-tp5714088p5714311.html
 Sent from the Camel - Users mailing list archive at Nabble.com.




-- 
Claus Ibsen
-
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen