Re: MongoDB transaction Handling

2013-11-11 Thread Dewitte P-Alban
Hi, MongoDB does not handle transactions http://docs.mongodb.org/manual/faq/developers/#how-do-i-do-transactions-and-locking-in-mongodb . For your need i would rather use a custom error managment that's update database after succes or error. Best regards P-Alban On Mon, Nov 11, 2013 at 8:01 P

Re: how to assign the jmx objectname without host name

2013-11-11 Thread Claus Ibsen
>From Camel 2.13 onwards the hostname is no longer included by default. http://camel.apache.org/camel-2130-release.html Though in earlier releases you can configure the hostname using org.apache.camel.management.DefaultManagementNamingStrategy On Tue, Nov 12, 2013 at 2:47 AM, CamelTyro <328549.

Re: XML to JSON using XMLJSON - BufferDataException

2013-11-11 Thread Willem jiang
As you are send Text message, I think you can use http instead of the TCP message to send the XML message and receive the JSON data. If you just want to test the XmlJsonDataFormat , you can just prepare String with XML message and check if the result is what you want. -- Willem Jiang Red H

Re: How to retrieve only the last message from 10 messages passed to queue

2013-11-11 Thread Rajalakshmi Raman
I needs to be remained in activemq. But while passing to browser it should only the last message. Thanks Raji -- View this message in context: http://camel.465427.n5.nabble.com/How-to-retrieve-only-the-last-message-from-10-messages-passed-to-queue-tp5743024p5743067.html Sent from the Camel - U

MongoDB transaction Handling

2013-11-11 Thread bipin.sutariya
Hi, I am trying to implement transaction handling to MongoDB in Camel Routes. What I am trying to achieve is get data from external system insert data in Mongodb. now route same data to other Route and do some processing and update state of inserted data to "processing". Now if there any error

Re: testing camel : ClassNotFoundException - org.apache.camel.core.xml.AbstractCamelEndpointFactoryBean

2013-11-11 Thread Willem jiang
There some magic happens when you use the maven bundle plugin to build the bundle. The bundle plugin generates the OSGi bundle which is based on the packages import and export description and class path. If you just run the test from the root, the bundle plugin doesn’t have a chance to be called

how to assign the jmx objectname without host name

2013-11-11 Thread CamelTyro
When I config the jmx on camel, the objectname is auto genenrated as org.apache.camel:context=*Happiness*/camelContext,type=components,name="activemqTCP" and the Happiness is the my hostname, whether I can config it, e.g. make it as *localhost*/camelContext, I need access it by program and it may c

Re: Propose add annotation @BeanInject

2013-11-11 Thread alexey-s
Hi Each framework has its own set of annotations to insert objects. 1) OSGI bluprint have annotation @Bean 2) Spring have annotation @Autowire 3) CDI Weld and Guice have annotation @Inject 4) EJB have annotations @EJB and @Resource This zoo annotations are not universal. I'm not looking Varant us

Re: testing camel : ClassNotFoundException - org.apache.camel.core.xml.AbstractCamelEndpointFactoryBean

2013-11-11 Thread lb
It works if I run the test (after clean install) from the camel-bindy subproject, I does not if I test it from the root, is that expected? On Mon, Nov 11, 2013 at 2:05 AM, Willem jiang wrote: > Hi, > > I’m not sure if you ran the test after you started the whole build. It > looks like the bundle

Re: endDoTry() problem

2013-11-11 Thread Claus Ibsen
You need to end the split also. On Mon, Nov 11, 2013 at 6:56 PM, kamranzafar wrote: > Thanks for replying, doTry is there in the route. The only reason I used > "endDoTry" is because I need to split the exchange body before persistence. > It won't let me use split without "endDoTry". > > from("jp

Re: Camel-JPA for single select statements

2013-11-11 Thread scottdawson
Christian: Yes, we have experimented with camel-jdbc and camel-sql, however, we have a Hibernate layer that we would like to leverage which is why we are trying to use camel-jpa. Claus: It sounds like you are suggesting that maybe camel-jpa is not the right tool for the job. Thanks to both of you

Re: endDoTry() problem

2013-11-11 Thread kamranzafar
Thanks for replying, doTry is there in the route. The only reason I used "endDoTry" is because I need to split the exchange body before persistence. It won't let me use split without "endDoTry". from("jpa:org.example.SystemProperty?consumeDelete=true&consumer.namedQuery=ControlProductLoadTrigger")

Re: endDoTry() problem

2013-11-11 Thread Claus Ibsen
endDoTry() is only needed in some cases if you use doTry .. doCatch. And you must have a doTry, which you do NOT have. On Mon, Nov 11, 2013 at 6:17 PM, kamranzafar wrote: > Hi I am having the same issue in camel version 2.10.2. The route below throws > exception > > from("jpa:org.example.System

Re: endDoTry() problem

2013-11-11 Thread kamranzafar
Hi I am having the same issue in camel version 2.10.2. The route below throws exception from("jpa:org.example.SystemProperty?consumeDelete=true&consumer.namedQuery=ControlProductLoadTrigger") .routeId(getClass().getSimpleName()).doTry().process(new Processor() { @Override public vo

Re: Camel-JPA for single select statements

2013-11-11 Thread Claus Ibsen
You can just use regular JPA API and call it from a java bean, and have Camel call that bean. On Mon, Nov 11, 2013 at 4:34 PM, scottdawson wrote: > I would like to use the Camel JPA component to perform single select > statements, in other words, I would like to use the component as a consumer >

Re: Camel-JPA for single select statements

2013-11-11 Thread Christian Posta
Is camel-ibatis or camel-sql component an option? On Mon, Nov 11, 2013 at 8:34 AM, scottdawson wrote: > I would like to use the Camel JPA component to perform single select > statements, in other words, I would like to use the component as a consumer > without the default polling behavior. I want

Re: How to retrieve only the last message from 10 messages passed to queue

2013-11-11 Thread Christian Posta
What should happen to the messages ahead of the last 10? can those be tossed away? or do those need to remain somehow? On Mon, Nov 11, 2013 at 3:35 AM, Rajalakshmi Raman wrote: > I am trying to get only only the last message from 10 messages passed to > queue. I read messages in XML format and ex

Camel-JPA for single select statements

2013-11-11 Thread scottdawson
I would like to use the Camel JPA component to perform single select statements, in other words, I would like to use the component as a consumer without the default polling behavior. I want to receive an invocation over HTTP (via the Jetty component perhaps) which will cause one select statement to

Re: onCompletion() in apache camel called more than one time

2013-11-11 Thread Christian Posta
Please post your route. On Mon, Nov 11, 2013 at 1:26 AM, vishalfichadiya wrote: > I am new to the camel. I am using bindy to transform my csv file to object. > Now i want to do some post processing once all the route completed. so i > used camel > > .onCompletion() tag for the same. > > But in ca

Re: HttpOperationFailedException not throwed on response code 302

2013-11-11 Thread Claus Ibsen
Maybe it follow redirects, you can see if you can turn that off. On Mon, Nov 11, 2013 at 3:30 PM, martin11 wrote: > Hello, > > I`m using camel ver. 2.11.0 and HTTP component to call SSL (port 443) REST > web services like this: > uri="http://{{address}}:{{port}}/{{context}}?httpClientConfigurerR

HttpOperationFailedException not throwed on response code 302

2013-11-11 Thread martin11
Hello, I`m using camel ver. 2.11.0 and HTTP component to call SSL (port 443) REST web services like this: http://{{address}}:{{port}}/{{context}}?httpClientConfigurerRef=httpClientConfig"/> For SSL I used my implementation (httpClientConfig) of org.apache.camel.component.http.HttpClientConfigurer

Re: When - an Apache Camel Component for time slots management

2013-11-11 Thread Lorenzo Bolzani
2013/11/11 Jan Matèrne (jhm) : >> I was able to get this working >> >> from("direct:start").filter("when", "MON-FRI 9:30-18:30").to(...) > > Does that matches the current system time? Yes. You can also define an header called "when.date" to do the matching on this one instead. I do not like this

Re: How to retrieve only the last message from 10 messages passed to queue

2013-11-11 Thread Cecilio Alvarez
Hi, take a look to advisory messages for activemq. -- View this message in context: http://camel.465427.n5.nabble.com/How-to-retrieve-only-the-last-message-from-10-messages-passed-to-queue-tp5743024p5743037.html Sent from the Camel - Users mailing list archive at Nabble.com.

AW: When - an Apache Camel Component for time slots management

2013-11-11 Thread jhm
> I was able to get this working > > from("direct:start").filter("when", "MON-FRI 9:30-18:30").to(...) Does that matches the current system time? > but I'm struggling with the matches method. This works: > .filter( > header("anyHeader") > .matches( new LanguageExpression("when", tim

Re: When - an Apache Camel Component for time slots management

2013-11-11 Thread Lorenzo Bolzani
2013/11/11 Claus Ibsen : > Hi > > Nice work keep it going. > > A cron like predicate would be nice. Hi Claus, thanks, I'll consider this. I was able to get this working from("direct:start").filter("when", "MON-FRI 9:30-18:30").to(...) but I'm struggling with the matches method. This works:

How to retrieve only the last message from 10 messages passed to queue

2013-11-11 Thread Rajalakshmi Raman
I am trying to get only only the last message from 10 messages passed to queue. I read messages in XML format and extracted the dat and passed to activemq. My message in activemq in the form Sending message Broadcast Message 37 Received on : Mon Nov 11 15:41:2 5 IST 2013EURUSR1.358EUR/USR97.12

Re: When - an Apache Camel Component for time slots management

2013-11-11 Thread Claus Ibsen
Hi Nice work keep it going. A cron like predicate would be nice. And for compound predicates you can do that in Camel in Java DSL using the predicate builder. http://www.davsclaus.com/2009/02/apache-camel-and-using-compound.html Though when working with date/times. You need to consider the time

Key (field name) required instead of Tag number

2013-11-11 Thread Manoranjitham G
Hi, I am trying to convert a model object into FIX message using Bindy. I am passing the List object of the model class(purchase_order) and getting the following *output : 1=Camel in Action|3=19|4=40| * Here it is like* tag=value*, I need it as *Key(field name)=value*. What should I do for that

XML to JSON using XMLJSON - BufferDataException

2013-11-11 Thread Malathi G
Hi, I am trying to convert XML into JSON format using XMLJson in TCP client server program. I am having three files - TCPClient, TCPServer and CamelDemo class. In between client and server, i am using CamelDemo class for conversion. It shows BufferDataFormat Exception in CamelDemo class. This is m

Model object into FIX message conversion using Bindy

2013-11-11 Thread Manoranjitham G
Hi, I am trying to convert a model object into a FIX message using Bindy dataformat. This is my code: Purchase_order Model class: package CamelBindy.Test; import java.math.BigDecimal; import org.apache.camel.dataformat.bindy.annotation.DataField; import org.apache.camel.dataformat.bindy.anno

onCompletion() in apache camel called more than one time

2013-11-11 Thread vishalfichadiya
I am new to the camel. I am using bindy to transform my csv file to object. Now i want to do some post processing once all the route completed. so i used camel .onCompletion() tag for the same. But in case of that if i have multiple lines in my csv file then i want to call onCompletion() after bo

Re: SJMS failure with stale reply queue

2013-11-11 Thread Harald Wellmann
As a proof of concept, I created a new component camel-sjmsee as a simplified version of camel-sjms: https://github.com/hwellmann/camel/tree/sjmsee/components/camel-sjmsee Given that a Java EE container provides connection pools anyway, this component does not pool any connections, producers or In

Re: how to get the target url of a router

2013-11-11 Thread CamelTyro
I can get the routedefinition instance by List routes = this.camelContext.getRoutes(); for (Route route : routes) { RouteDefinition routeDefinition = route.getRouteContext() .getRoute(); routerInfos.add(routerInfo); } But I don't find a intu

Re: Test exception thrown in junit test

2013-11-11 Thread sdelanghe
Thnx for the advise, My purpose was to test my general exception handling in routes. -- View this message in context: http://camel.465427.n5.nabble.com/Test-exception-thrown-in-junit-test-tp5742984p5743006.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: java.lang.NoSuchMethodError: org.apache.camel.model.RouteDefinition.transacted()

2013-11-11 Thread Agostino Calamita
I recompiled it with 2.12.1. I compiled this route for the first time, in 2.12.1 ( following an example that I found in Apache Camel site ) and this ends with error ( NoSuchMethodException ); then I tried to compile the same code with Camel 2.11.0 and it worked ( no Exception ). I don't know I h