Changing Endpoint URI's at runtime

2010-05-20 Thread jejmaster
Hi, I would like to inquire on how to change endpoint uri at runtime. We have cxfrs routes which we need to change the adresses dynamically through database. http://localhost:5001"; serviceClass="com.proj.test.TestService" /> Thanks in advance. -- View this message in c

Re: not working.

2010-05-20 Thread ankelee
Isn't recipientList overkill for this? The endpoint is not dynamically changing during runtime. It's just resolved at route creation. In Java DSL I do as such: .wireTap("file://" + props.getProperty("directory.incoming.backup") + "?fileName=${in.header.backupFileName}") Claus Ibsen-2 wrote: >

Re: not working.

2010-05-20 Thread ankelee
Obviously it is changing, but only the fileName - but shouldn't this be perfectly valid or am I misusing it? ankelee wrote: > > Isn't recipientList overkill for this? The endpoint is not dynamically > changing during runtime. It's just resolved at route creation. > > In Java DSL I do as such:

Re: not working.

2010-05-20 Thread Claus Ibsen
On Thu, May 20, 2010 at 10:51 AM, ankelee wrote: > > Isn't recipientList overkill for this? The endpoint is not dynamically > changing during runtime. It's just resolved at route creation. > > In Java DSL I do as such: > Just use {{ }} in Java DSL also. .wireTap("file://{{directory.incoming.bac

Re: Recipient List with optional destinations.

2010-05-20 Thread Eric Bouer
Hi Willem. Sorry for the late reply. Thanks for committing that. I can verify it's working as expected except for that unnecessary warning at the logs :) willem.jiang wrote: > > Hi Eric, > > I just committed a quick fix on your JIRA[1] > Can you check out the latest Camel 2.3-SNAPSHOT to veri

Re: Camel SMTP Server

2010-05-20 Thread Olli Poyry
Thank you for creating the camel-smtp component. I would like to use it inside Apache Servicemix Fuse 4.2 OSGi container - so far with no success. It seems that Apache James has a long list of dependencies. I added these to Fuse, but when checking the pom.xml in Apache James it seems that the lis

Re: Camel SMTP Server

2010-05-20 Thread Norman Maurer
Hi Oli, for the camel-smtp server you don't need the pom.xml of james server. It use only james-protocols, which really is more slim. See: http://svn.apache.org/viewvc/james/protocols/trunk/pom.xml?view=markup Bye, Norman 2010/5/20 Olli Poyry : > > Thank you for creating the camel-smtp compone

Re: how to route a single message to multiple MessageGroups?

2010-05-20 Thread Claus Ibsen
Hi Use the Content Based Router to route the message to either one. And on the way you can set the header accordingly. On Thu, May 20, 2010 at 5:06 AM, Mike Reynolds wrote: > > I'm using Camel 2.2, ActiveMQ 5.3. > I'd like to route a single message to a number ActiveMQ MessageGroups (as > dete

Re: 2.3-SNAPSHOT: Stream Caching again enabled by Bug Fix for Camel-2686 and CAMEL-2694 (rev 941275)?

2010-05-20 Thread _Jens
Hi Willem, unfortunately I was not able to get this working. I saw the unit test that you checked in for this. The test runs without an error. However, it does not verify this completely. Although it is now possible to get the stream, the stream has been read. I changed the route builder used in

Re: not working.

2010-05-20 Thread ankelee
Yeah I am aware that I could do that but I'm trying to recreate that Java DSL line using Spring DSL. Claus Ibsen-2 wrote: > > On Thu, May 20, 2010 at 10:51 AM, ankelee wrote: >> >> Isn't recipientList overkill for this? The endpoint is not dynamically >> changing during runtime. It's just res

Re: not working.

2010-05-20 Thread Claus Ibsen
On Thu, May 20, 2010 at 1:38 PM, ankelee wrote: > > Yeah I am aware that I could do that but I'm trying to recreate that Java DSL > line using Spring DSL. > {{ }} works as well in Spring XML. > > > Claus Ibsen-2 wrote: >> >> On Thu, May 20, 2010 at 10:51 AM, ankelee wrote: >>> >>> Isn't recipi

Re: 2.3-SNAPSHOT: Stream Caching again enabled by Bug Fix for Camel-2686 and CAMEL-2694 (rev 941275)?

2010-05-20 Thread Willem Jiang
Hi Jens, It's my bad, I should not try to covert the message into StreamCache. As it will consume the input stream, I will commit a quick fix shortly. Willem _Jens wrote: Hi Willem, unfortunately I was not able to get this working. I saw the unit test that you checked in for this. The test ru

Re: how to route a single message to multiple MessageGroups?

2010-05-20 Thread Mike Reynolds
But how do I send it multiple recipients? I'd like to send the message to QueueA with JMSXGroupID=GROUPA and QueueA with JMSXGroupID=GROUPB So - basically multiple copies of the message to the same queue but with different JMSXGroupID's. Claus Ibsen-2 wrote: > > Hi > > Use the Content Based Ro

Reusing redelivery policy with camel 1.4

2010-05-20 Thread pratibhaG
Hi, I am using camel 1.4 in servicemix 3.2.2 I have created many message flows where on a connection error I need to do the redelivery of the message. I do it this way: exception(java.net.SocketException.class) .maximumRedeliveries(2) .useExponentialBackOff()

jmsbinding problem

2010-05-20 Thread dlawson
To All: I am experiencing a problem when routing a Camel message from ActiveMQ to WebSphereMQ 7 using the JMSComponent. My Camel version is 2.2.0. As the stack trace below indicates, the exception is thrown when the "JMS-IBM_Last_Msg_In_Group" header/property in the Camel Message is being mapp

Re: Reusing redelivery policy with camel 1.4

2010-05-20 Thread pratibhaG
I am setting the properties as follows in the constructor: public MyBean() { maximumRedeliveries(3); useExponentialBackOff(); initialRedeliveryDelay(15000); backOffMultiplier(2.0); maximumRedeliveryDe

camel-http converts headers to lower case

2010-05-20 Thread attilav
Hi everyone, I'm trying to use the camel-http to send a soap request, however the camel exchange headers get converted to lowercase during the http post. Is this a feature, or bug? Is there a way around it? My setup is something like this: from("activemq:queue:tempque") .setHeader(Exchang

Re: jmsbinding problem

2010-05-20 Thread Claus Ibsen
Hi I have created a ticket https://issues.apache.org/activemq/browse/CAMEL-2742 You could most likely use a custom JMSBinding by setting it on the endpoint uri to("mq:?binding=#myCustomBinding"); And then myCustomBinding is the id of a bean in the registry to lookup as a JmsBinding type. O

Re: camel-http converts headers to lower case

2010-05-20 Thread Willem Jiang
Hi Which Camel version are you using? I just checked the camel trunk code, there is no code which turn the headers into lower case. Willem attilav wrote: Hi everyone, I'm trying to use the camel-http to send a soap request, however the camel exchange headers get converted to lowercase durin

AW: camel-http converts headers to lower case

2010-05-20 Thread Schneider Christian
Hi Willem, can this be the problem that headers in camel are case insensitive since some 2.x version? Greetings Christian Christian Schneider Team Handel und Risikomanagement Informationsverarbeitung Business Solutions Trading EnBW Systeme Infrastruktur Support GmbH Informationsverarbeitu

Re: camel-http converts headers to lower case

2010-05-20 Thread attilav
Hi Willem, I'm using camel 2.2.0 - within servicemix 3.3. thanks for the quick answer, attilav willem.jiang wrote: > > Hi > > Which Camel version are you using? > I just checked the camel trunk code, there is no code which turn the > headers into lower case. > > Willem > > attilav wrote:

Re: camel-http converts headers to lower case

2010-05-20 Thread attilav
Some more info I found: After the http request the camel exchange headers (exchange.getIn().getHeaders()) seem to be OK, that is, the headers are copied correctly from the in message, and the http response headers are added too. 2010-05-20 13:29:46,502 | INFO | xINH VVV{CamelHttpMet

Re: camel-http converts headers to lower case

2010-05-20 Thread Willem Jiang
Oh, I found the key, it's a bug of camel-http. Current message header is using CaseInsensitiveMap[1] to store the header key and value. And the HttpProducer should use the map.entrySet() to access the value instead of use map.getKeySet() to go through the headers. I already create a JIRA[2]

Re: how to route a single message to multiple MessageGroups?

2010-05-20 Thread Claus Ibsen
On Thu, May 20, 2010 at 2:10 PM, Mike Reynolds wrote: > > But how do I send it multiple recipients? > I'd like to send the message to QueueA with JMSXGroupID=GROUPA and QueueA > with JMSXGroupID=GROUPB > So - basically multiple copies of the message to the same queue but with > different JMSXGroup

Re: camel-http converts headers to lower case

2010-05-20 Thread attilav
thnx, so no workaround until 2.4 :( attilav willem.jiang wrote: > > Oh, I found the key, it's a bug of camel-http. > Current message header is using CaseInsensitiveMap[1] to store the > header key and value. > > And the HttpProducer should use the map.entrySet() to access the value > instea

Re: camel-http converts headers to lower case

2010-05-20 Thread Willem Jiang
Hi attilav I'm afraid there is no workaround :( As we just cut the camel 2.3.0, I don't think this issue is a blocker issue of Camel, so I marked the JIRA to be resolve in camel 2.4.0. Maybe you can use the Fuse camel 2.3.0, which will come out in an month, if you can't wait for the Camel 2.4

camel-http how to retrieve response body from HttpOperationFailedException

2010-05-20 Thread attilav
Hi, I'm trying to use camel-http to post a soap message. The remote server returns status code 500, with a body, which causes camel to throw a HttpOperationFailedException. According to the docs (http://camel.apache.org/http.html): """ This exception contains the following information: * T

Re: jmsbinding problem

2010-05-20 Thread dlawson
Claus: The first solution seems the easiest. Is it as simple as adding the binding option to the endpoint and then creating a subclass of JmsBinding that overrides the "getValidJMSHeaderValue" method? I'm fuzzy on how to get the bean into the registry for lookup. Thanks, David Claus Ibsen-2 wr

Re: camel-http converts headers to lower case

2010-05-20 Thread Claus Ibsen
Hi Use a custom HttpBinding as a work around On Thu, May 20, 2010 at 4:20 PM, Willem Jiang wrote: > Hi attilav > > I'm afraid there is no workaround :( > As we just cut the camel 2.3.0, I don't think this issue is a blocker issue > of Camel, so I marked the JIRA to be resolve in camel 2.4.0. >

Re: jmsbinding problem

2010-05-20 Thread Claus Ibsen
On Thu, May 20, 2010 at 4:29 PM, dlawson wrote: > > Claus: > > The first solution seems the easiest. Is it as simple as adding the binding > option to the endpoint and then creating a subclass of JmsBinding that > overrides the "getValidJMSHeaderValue" method? I'm fuzzy on how to get the > bean in

Re: camel-http converts headers to lower case

2010-05-20 Thread Willem Jiang
As the fix is on the HttpProducer side, I'm afraid you need a customer HttpProducer to work around that issue. Willem Claus Ibsen wrote: Hi Use a custom HttpBinding as a work around On Thu, May 20, 2010 at 4:20 PM, Willem Jiang wrote: Hi attilav I'm afraid there is no workaround :( As w

Re: camel-http how to retrieve response body from HttpOperationFailedException

2010-05-20 Thread Willem Jiang
attilav wrote: Hi, I'm trying to use camel-http to post a soap message. The remote server returns status code 500, with a body, which causes camel to throw a HttpOperationFailedException. According to the docs (http://camel.apache.org/http.html): """ This exception contains the following infor

Re: Changing Endpoint URI's at runtime

2010-05-20 Thread Willem Jiang
Hi As CxfRsProducer set the client address when it is created, I'm afraid you can change the address of the CxfRsProducer dynmaiclally. But you can leverage the camel URI and recipientList[1] to do this kind of job. The cxfrs endpoint uri could be cxfrs://address?resourceClass=com.proj.test

Re: Recipient List with optional destinations.

2010-05-20 Thread Willem Jiang
Eric Bouer wrote: Hi Willem. Sorry for the late reply. Thanks for committing that. I can verify it's working as expected except for that unnecessary warning at the logs :) Cool, thank your for the verification. Willem willem.jiang wrote: Hi Eric, I just committed a quick fix on your JIRA

Re: Camel SMTP Server

2010-05-20 Thread Willem Jiang
Camel mail doesn't need to use james server to receive the mail, you can use the javax.mail which is provided in servicemix to do the same job. BTW, there is a camel-mail feature in SMX that you can use. Willem Norman Maurer wrote: Hi Oli, for the camel-smtp server you don't need the pom.xml

Re: Preven leaks in Camel App during development phase

2010-05-20 Thread Willem Jiang
Did you use Hudson for daily build of your Camel app ? Maybe it relates to how your write the application, we don't hit that kind of problem when we run the test of camel. Willem Muhammad Ichsan wrote: Hi All Does Anyone know how to prevent problem in your Camel application during developme

Re: how to route a single message to multiple MessageGroups?

2010-05-20 Thread Mike Reynolds
>You can send them one at a time and change the JMSXGroupID. >Or you can use a bean to send the messages from java code using the >ProducerTemplate to do that in one line of code. >Then you can set/change the JMSXGroupID in Java code. Thanks, Claus. I ended up using the loop DSL, and it looks li