Re: camel-servlet / Karaf / War / Tomcat

2010-01-06 Thread Charles Moulliard
yep but in this case, we create a dependency between CamelHttpTransportServlet and Karaf bootsrap class. This is not really important as I'm not sure that using camel + karaf or SMX4 embedded in a WAR is the best choice. It is better to create a classical WAR in this case containing camel/spring

packageScan element warning when deploying in an OSGi server

2010-01-06 Thread Jörn Kottmann
Hello, we are running our camel routes (camel 2.0.0) in an OSGi server, each time a route is deployed we get the following warning: [2010-01-06 11:32:35.494] server-dm-7 org.apache.camel.spring.CamelContextFactoryBean.unknown W Using a packages element to specify

Re: packageScan element warning when deploying in an OSGi server

2010-01-06 Thread Claus Ibsen
On Wed, Jan 6, 2010 at 11:37 AM, Jörn Kottmann kottm...@gmail.com wrote: Hello, we are running our camel routes (camel 2.0.0) in an OSGi server, each time a route is deployed we get the following warning: [2010-01-06 11:32:35.494] server-dm-7

Publish source jar files to maven repository

2010-01-06 Thread Jörn Kottmann
Hello, I am just doing some debugging of the camel-mail component with eclipse and noticed that the camel team is not publishing the camel source jars to their maven repository. Publishing the source jars has the advantage that the camel jar files are automatically linked to the source code in

Re: packageScan element warning when deploying in an OSGi server

2010-01-06 Thread Claus Ibsen
Hi I have created a ticket https://issues.apache.org/activemq/browse/CAMEL-2338 And the WARN will be removed from Camel 2.2 onwards. On Wed, Jan 6, 2010 at 12:25 PM, Claus Ibsen claus.ib...@gmail.com wrote: On Wed, Jan 6, 2010 at 11:37 AM, Jörn Kottmann kottm...@gmail.com wrote: Hello, we

Re: Not sure of syntax or if its possible or an example

2010-01-06 Thread Claus Ibsen
Maybe try some of the other scripting languages mvel ognl groovy to see if they can evaluate that expression or maybe you need to use .equals instead of == On Wed, Jan 6, 2010 at 2:14 AM, SoaMattH matt...@netpacket.com.au wrote: Just to clarify the body is Body:ALLREADY_PROCESSED

Re: Router logic

2010-01-06 Thread Claus Ibsen
Hi When it comes to JDBC I prefer some simpler solutions using spring-jdbc (their JdbcTemplate) and sometimes iBatis. Often JPA, Hibernate etc. is overkill for integration works where you need to work with a few tables and move/update rows. You can then do the logic in a simple POJO and have

Re: @Consumed

2010-01-06 Thread Claus Ibsen
Hi Check out the source and test code for camel-jpa https://svn.apache.org/repos/asf/camel/trunk/components/camel-jpa/src/test/ Generally JPA is very often complex and overkill for simple integration works where you need to work with a few tables. So consider twice if you really want to impose

NoSuchEndpointException: getting exception when talking to http endpoint using camel

2010-01-06 Thread Harbeer Kadian
Hi, I created a new camel router to send a message to a webservice using camel-http component. The configure method of the router is as follows. public void configure() throws Exception { from(direct:ProducerUri)

Re: Publish source jar files to maven repository

2010-01-06 Thread Willem Jiang
Hi We publish the source jar when doing the camel release, but we don't deploy the source jar when publishing the snapshot. Do you means we need to do the same thing for snapshot deploy? If so, you can check out camel source code do that kind of build yourself. I don't think there are lots

Re: NoSuchEndpointException: getting exception when talking to http endpoint using camel

2010-01-06 Thread Willem Jiang
How did you create the CamelContext? As you know there are some difference between the standalone java application and OSGi application. If you don't use Spring configuration, you need to use org.apache.camel.osgi.CamelContextFactory to create the CamelContext for you, and you also need to

Re: Publish source jar files to maven repository

2010-01-06 Thread Jon Anstey
I set up Hudson to deploy the source jars a while ago but there was some problem... the issue is tracked here https://issues.apache.org/jira/browse/INFRA-2352 Hopefully we can get a resolution to this soon! On Wed, Jan 6, 2010 at 9:10 AM, Willem Jiang willem.ji...@gmail.com wrote: Hi We

Re: Publish source jar files to maven repository

2010-01-06 Thread Jörn Kottmann
Willem Jiang wrote: Hi We publish the source jar when doing the camel release, but we don't deploy the source jar when publishing the snapshot. Yes, thanks, after downloading the sources with mvn dependency:sources they where linked to the dependencies in eclipse after mvn eclipse:eclipse.

context.stopRoute() API hangs periodically

2010-01-06 Thread boday
I'm using Camel 2.1 on SMX 3.3.1. I'm using a timer to periodically reprocess messages that I've sent to an error queue. While reprocessing I want to stop the main message processing route as follows (for some specific client requirements)...

Re: ActiveMQ - Camel as client POST?

2010-01-06 Thread user09772
Thanks. I've setup a route as you suggested. I'm getting the following indicating i need to specify dateFormat, but not sure where/how I do that. Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route route1 at: Marshal[org.apache.camel.model.dataformat.JsonDataForm

Re: problem with simple message to file example under osgi

2010-01-06 Thread dlawson
Willem: I modified my code to create the camel context using the CamelContextFactory and now the type converters are read in as expected. Are there any helpful hints or other things to watch out for when using Camel in an OSGi container? Thanks for your help, David Hi, How did you create the

Re: Issue trying to browse a activemq queue

2010-01-06 Thread boday
I just use JMX to get these statistics... here is some raw code to create a connection and iterate over the AMQ queues to find a given queues size... note: be careful to close/resuse JMX connections or they will cause OutOfMemoryExceptions on the MBeanServer ... JMXServiceURL url = new

Re: ActiveMQ - Camel as client POST?

2010-01-06 Thread user09772
I had the xstream depend. missing. Although I'm unable to POST to a simple Jersey service. Doing this in the camel config: from(direct:simple-http-send).marshal().json().to(http://host:port/service;); In the consumer: ProducerTemplate producerTemplate = camelContext.createProducerTemplate();

Re: ActiveMQ - Camel as client POST?

2010-01-06 Thread Stephen Gargan
No the JsonDataFormat does not set the content type you'll need to do that yourself. Try specifying the content type explicitly from(direct:simple-http-send).marshal().json().setHeader(Exchange.CONTENT_TYPE, constant(application/json)).to(http://host:port/service;) use what ever mime type your

Re: problem with simple message to file example under osgi

2010-01-06 Thread Willem Jiang
You just need to make sure the BundleContext is passed into the CamelContextFactory. If you are using the spring to load the CamelContext, you don't need to do anything, camel-spring and camel-osgi bundle will take care of them. Here is another thing, if the Camel version is below than Camel

Re: Not sure of syntax or if its possible or an example

2010-01-06 Thread SoaMattH
I have also tried camel:el{$body == ALLREADY_PROCESSED}/camel:el camel:el{$body eq ALLREADY_PROCESSED}/camel:el camel:el{$body.equals( ALLREADY_PROCESSED)}/camel:el camel:el${in.body == INCIDENT_ALLREADY_PROCESSED}/camel:el but still the otherwise continues to be executed ? Does any one have

Re: Not sure of syntax or if its possible or an example

2010-01-06 Thread SoaMattH
SoaMattH wrote: I have also tried camel:el{$body == ALLREADY_PROCESSED}/camel:el camel:el{$body eq ALLREADY_PROCESSED}/camel:el camel:el{$body.equals( ALLREADY_PROCESSED)}/camel:el camel:el${in.body == ALLREADY_PROCESSED}/camel:el but still the otherwise continues to be executed ?

Re: @Consumed

2010-01-06 Thread vcheruvu
I have figured it out how to use @Consumed after reading the JpaConsumer class in the camel source. 1) I have added processed field in the table with default 0, which will be used to check if the record is processed or not. 2) added update method in the OldTableEntity and added @Consumed

Re: NoSuchEndpointException: getting exception when talking to http endpoint using camel

2010-01-06 Thread Harbeer Kadian
I created the camel context in following way JndiContext jndiContext = new JndiContext(); CamelContext camelContext = new DefaultCamelContext(jndiContext); I have used jndiContext because i have to bind some bean components. Ex: jndiContext.bind(endPoint, new EndPointImpl()); One more question

Re: NoSuchEndpointException: getting exception when talking to http endpoint using camel

2010-01-06 Thread Willem Jiang
After you create the CamelContext with CamelContextFactory, you can set the JndiContext with these codes CompositeRegistry compositeRegistry = new CompositeRegistry(); compositeRegistry.addRegistry(new JndiRegistry(jndiContext)); compositeRegistry.addRegistry(context.getRegistry());

Re: context.stopRoute() API hangs periodically

2010-01-06 Thread Willem Jiang
Hi, Can you check if there are deadlock of CamelContext which introduce this error? Did you use the camelContext as the monitor Object when you try to stop the Route ? Willem boday wrote: I'm using Camel 2.1 on SMX 3.3.1. I'm using a timer to periodically reprocess messages that I've sent