Re: SJMS and InOut

2013-02-13 Thread Harald Wellmann
Well, it should be clearly documented that inOut() does not have the desired effect and that camel-sjms behaves differently than camel-jms in this respect. I can live with the current approach, and I'm eager to see a release of camel-sjms in 2.11 to get rid of the transitive Spring dependency in m

building route in java dsl

2013-02-13 Thread kiranreddykasa
Can anyone tell me how to build camel route dynamically in dsl. I am aware of recepientlist, dynamic router. Suppose I have a list of endpoint url's, how can i build route by iterating the list ?? List listOfEndpoints= In Route builder configure method can i define a single route

AW: building route in java dsl

2013-02-13 Thread jhm
Even a JavaDSL is Java code, so you could store intermediate steps while creating the route - just "extract local variable". So you could use Java control commands: public class ProgrammaticalRouteTest extends CamelTestSupport { @Test public void sendToMultipleEndpoints() throws

How add a property ?

2013-02-13 Thread anakin59490
hello, I would like to add a property in the file which is defined in my camelContext : In my filtersDefinition_dev.properties file, i wrote : sepa.splitter=test and i would like to add a new property : sepa.splitter2=test2 I try to do that in a bean : @Resource(name="properties") protected

DestinationResolver for Reply Messages

2013-02-13 Thread prueegg
I need to connect to WebSphere MQ and set the correct header fields in the WMQ message header. This works fine for simple fire&forget as well as for request messages since I'm using a DestinationResolver to set all the required poperties to the destination. public Destination resolveDestinati

How to handle error when - Renaming file from: *** failed due cannot delete from file

2013-02-13 Thread briane80
Hi, I'm using camel 2.10.3 on windows 7. I have a route set up as follows: errorHandler("file:C:\\Errors").maximumRedeliveries(3).redeliveryDelay(5000).retryAttemptedLogLevel(LoggingLevel.WARN).useOriginalMessage()); from("file:C:\\Messages\\Inbox?consumer.delay=5000&include=.*.gz").unm

Re: building route in java dsl

2013-02-13 Thread Claus Ibsen
On Wed, Feb 13, 2013 at 10:12 AM, kiranreddykasa wrote: > > Can anyone tell me how to build camel route dynamically in dsl. > > I am aware of recepientlist, dynamic router. > > Suppose I have a list of endpoint url's, how can i build route by iterating > the list ?? > > List listOfEndpoints=..

Re: DestinationResolver for Reply Messages

2013-02-13 Thread Claus Ibsen
On Wed, Feb 13, 2013 at 12:32 PM, prueegg wrote: > I need to connect to WebSphere MQ and set the correct header fields in the > WMQ message header. > > This works fine for simple fire&forget as well as for request messages since > I'm using a DestinationResolver to set all the required poperties t

Re: How to handle error when - Renaming file from: *** failed due cannot delete from file

2013-02-13 Thread Claus Ibsen
Hi You should use the deadLetterChannel as the error handler. errorHandler(deadLetterChannel("...")... On Wed, Feb 13, 2013 at 2:06 PM, briane80 wrote: > Hi, > > I'm using camel 2.10.3 on windows 7. > > I have a route set up as follows: > > errorHandler("file:C:\\Errors").maximumRedeliveri

Re: How to handle error when - Renaming file from: *** failed due cannot delete from file

2013-02-13 Thread briane80
Hi Claus, Sorry there was an error in the text a copied over - I am using the deadLetterChannel as follows and get the problem: errorHandler(deadLetterChannel("file:C:\\Errors")).maximumRedeliveries(3).redeliveryDelay(5000).retryAttemptedLogLevel(LoggingLevel.WARN).useOriginalMessage()); fro

Dynamic XSL source - with 2.8.6

2013-02-13 Thread sammm
I have a route in version 2.9 which uses CamelXsltResourceUri to dynamically control the name of the XSL to use in an 'xslt' endpoint. However i need to get it working in 2.8.5 (as it needs to be integrated into a particular version of ServiceMix/Fuse). i can't see a way (short of writing my own

Re: Dynamic XSL source - with 2.8.6

2013-02-13 Thread sammm
i should also say that the route/context etc is specified with Spring XML. -- View this message in context: http://camel.465427.n5.nabble.com/Dynamic-XSL-source-with-2-8-6-tp5727501p5727502.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to handle error when - Renaming file from: *** failed due cannot delete from file

2013-02-13 Thread Claus Ibsen
On Wed, Feb 13, 2013 at 2:59 PM, briane80 wrote: > Hi Claus, > > Sorry there was an error in the text a copied over - I am using the > deadLetterChannel as follows and get the problem: > > errorHandler(deadLetterChannel("file:C:\\Errors")).maximumRedeliveries(3).redeliveryDelay(5000).retryAtte

how to set body clipped length on traceer using jmx

2013-02-13 Thread Preben.Asmussen
hi I have turned tracing on using jmx. Set tracing to true on the Route. The trace body however is clipped after 1000 chars In the log -> [Body clipped after 1000 chars, total length is 3253]] How can I change that using jmx so I get the full trace payload ? Best Preben -- View this messag

Re: Dynamic XSL source - with 2.8.6

2013-02-13 Thread Claus Ibsen
On Wed, Feb 13, 2013 at 3:06 PM, sammm wrote: > i should also say that the route/context etc is specified with Spring XML. > Maybe this FAQ can help http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Dynamic-

Re: how to set body clipped length on traceer using jmx

2013-02-13 Thread Claus Ibsen
On Wed, Feb 13, 2013 at 3:16 PM, Preben.Asmussen wrote: > hi > > I have turned tracing on using jmx. Set tracing to true on the Route. > > The trace body however is clipped after 1000 chars > > In the log -> [Body clipped after 1000 chars, total length is 3253]] > > How can I change that using jmx

ExchangeHelper.copyResults(...) doesn't copy exchange pattern

2013-02-13 Thread Marek Pszczolka
Why ExchangeHelper.copyResults(Exchange, Exchange) method doesn't copy exchange pattern from the source exchange? By default it is InOnly. The following junit fails: Exchange source = new DefaultExchange(context, ExchangePattern.InOut); source.getIn().setBody("source body

Re: ExchangeHelper.copyResults(...) doesn't copy exchange pattern

2013-02-13 Thread Claus Ibsen
On Wed, Feb 13, 2013 at 3:21 PM, Marek Pszczolka wrote: > Why ExchangeHelper.copyResults(Exchange, Exchange) method doesn't copy > exchange pattern from the source exchange? By default it is InOnly. > Because it copies the result which is the body + headers etc. > The following junit fails: > >

Re: how to set body clipped length on traceer using jmx

2013-02-13 Thread Claus Ibsen
On Wed, Feb 13, 2013 at 3:29 PM, Preben.Asmussen wrote: > But is it also possible to change this at runtime using jmx in the same way > you can turn tracing on off ? > No this is not possible. Well you can change the value on the getProperties on the CamelContext at runtime. But there is no JMX

Re: How add a property ?

2013-02-13 Thread Claus Ibsen
On Wed, Feb 13, 2013 at 12:17 PM, anakin59490 wrote: > hello, > > I would like to add a property in the file which is defined in my > camelContext : > So you want to add a property to a file? And you cannot just do that by opening the file in an editor and add the text? If not you can use Java AP

Re: Dynamic XSL source - with 2.8.6

2013-02-13 Thread sammm
Claus, thanks for that - i'd seen it and hoped it would do what i wanted but if errored in use. If i do this: concat('META-INF/xsl/',local-name(/*[local-name(.)='Envelope']/*[local-name(.)='Body']/*),'.xsl') When i run the route (using 'camel:run' with maven)

Re: Dynamic XSL source - with 2.8.6

2013-02-13 Thread Claus Ibsen
On Wed, Feb 13, 2013 at 3:51 PM, sammm wrote: > Claus, > > thanks for that - i'd seen it and hoped it would do what i wanted but if > errored in use. > > If i do this: > > >resultType="java.lang.String">concat('META-INF/xsl/',local-name(/*[local-name(.)='Envelope']/*[local-n

Re: ExchangeHelper.copyResults(...) doesn't copy exchange pattern

2013-02-13 Thread Marek Pszczolka
Thanks for quick response. We had something like this and it worked correctly: newExchange = template.send("direct:...", new Processor() { public void process(Exchange ex) throws Exception { ex.copyFrom(exchange)

Re: Dynamic XSL source - with 2.8.6

2013-02-13 Thread Claus Ibsen
On Wed, Feb 13, 2013 at 3:54 PM, Claus Ibsen wrote: > On Wed, Feb 13, 2013 at 3:51 PM, sammm wrote: >> Claus, >> >> thanks for that - i'd seen it and hoped it would do what i wanted but if >> errored in use. >> >> If i do this: >> >> >> > resultType="java.lang.String">concat(

Re: Dynamic XSL source - with 2.8.6

2013-02-13 Thread sammm
ok - i'll track that down. So, should: work as a dynamic reference? Martin -- View this message in context: http://camel.465427.n5.nabble.com/Dynamic-XSL-source-with-2-8-6-tp5727501p5727517.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Dynamic XSL source - with 2.8.6

2013-02-13 Thread Claus Ibsen
On Wed, Feb 13, 2013 at 3:58 PM, sammm wrote: > ok - i'll track that down. > > So, should: > > > > work as a dynamic reference? > No see the FAQ > Martin > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Dynamic-XSL-source-with-2-8-6-tp5727501p5727517.html > Sent

Re: DestinationResolver for Reply Messages

2013-02-13 Thread prueegg
btw. I think the problem is that the destination for reply is directly read from the JMS Message in the JmsMessageHelper with message.getJMSReplyTo(); This destination (instanceof Destination) could be directly used to send the reply without the DestinationResolver. The DestinationResolver is only

Re: ExchangeHelper.copyResults(...) doesn't copy exchange pattern

2013-02-13 Thread Claus Ibsen
Hi Why do you use those inlined processors to send a copy of an exchange? Can't you just copy the exchange? newExchange = template.send("direct:...", exchange.copy()); On Wed, Feb 13, 2013 at 3:53 PM, Marek Pszczolka wrote: > Thanks for quick response. > > We had something like this and it wor

Re: Dynamic XSL source - with 2.8.6

2013-02-13 Thread sammm
Bingo! 1. used recipientList (should reach the FAQ more carefully) and 2. set some more versions for jaxb etc which got rid of the bind error. Many Thanks -- View this message in context: http://camel.465427.n5.nabble.com/Dynamic-XSL-source-with-2-8-6-tp5727501p5727521.html Sent from the Came

Re: SJMS and InOut

2013-02-13 Thread Scott England-Sullivan
Thanks for the clarification Claus. I will update the documentation and plan for an update in a later release. Best Regards, Scott ES On Feb 13, 2013, at 12:59 AM, Harald Wellmann wrote: > Well, it should be clearly documented that inOut() does not have the > desired effect and that camel-sj

Re: How to handle error when - Renaming file from: *** failed due cannot delete from file

2013-02-13 Thread briane80
Converting to the byte array has worked thanks for the quick reply. -- View this message in context: http://camel.465427.n5.nabble.com/How-to-handle-error-when-Renaming-file-from-failed-due-cannot-delete-from-file-tp5727493p5727525.html Sent from the Camel - Users mailing list archive at Nabble

URL overwriting - SOAP vs restful

2013-02-13 Thread jdev.hari
Hi, I define my end point in camel context xml and during runtime I override them as I get it from a Service catalogue service. For SOAP webservice invocations, I am able to do the following in a processor just before the cxf bean invocation. Map requestContext = new HashMap(); requestContext.pu

Re: SJMS and InOut

2013-02-13 Thread Scott England-Sullivan
Harald, First, thanks again for your feedback. I will update the documentation with a warning clarifying the limitation. If you could clarify your use case for me, is this a one to many configuration? One endpoint definition to many routes? Thanks again, Scott ES On Feb 13, 2013, at 12:59

Re: URL overwriting - SOAP vs restful

2013-02-13 Thread Sergey Beryozkin
Hi, On 13/02/13 15:45, jdev.hari wrote: Hi, I define my end point in camel context xml and during runtime I override them as I get it from a Service catalogue service. For SOAP webservice invocations, I am able to do the following in a processor just before the cxf bean invocation. Map reques

RE: default maximum redelivery policy when overridding default error handler not right

2013-02-13 Thread boday
adding logStrackTrace(false) had no effect on my unit test...still works as expected (tried against 2.10 and against the latest trunk)... public class RedeliverTest extends ContextTestSupport { public void testRedeliver() throws Exception { template.sendBody("direct:start", "H

Re: URL overwriting - SOAP vs restful

2013-02-13 Thread jdev.hari
Hi, I tried it, I still get the same error. Caused by: org.apache.camel.component.cxf.CxfOperationException: JAXRS operation failed invoking direct://matching with statusCode: 404 at org.apache.camel.component.cxf.jaxrs.CxfRsProducer.populateCxfRsProducerException(CxfRsProducer.java:317)

Re: Using Dead letter channel with ActiveMQ?

2013-02-13 Thread dunnlow
Claus, I've tried to avoid this issue, but it is back upon me. Basically, I'm using camel 2.10.3 now, Spring 3.1.2 and activemq 5.7) I am consuming from an activemq broker which I do not control, and which does not allow use of a DLQ - it is clustered, robust, etc, etc. I want to make sure that

Re: VM Queues Disconnected after Karaf Bundle Update

2013-02-13 Thread Henryk Konsek
> Found the issue that causes VM producer and consumer to "disconnect" in an > OSGi environment when a bundle is restarted. Yeah, the fact that VM queues disconnects is apparently the bug. I wanted to investigate it but you were first :) Thanks for taking look at this. -- Henryk Konsek http://h

Re: SJMS and InOut

2013-02-13 Thread Harald Wellmann
Scott, basically, its one-to-one. Camel (S)JMS + Proxies + Beans (Spring or EJB) is our standard remoting mechanism. A client system has an outgoing route starting with a Camel proxy for FooService from("direct:fooProxy).to("sjms:queue:fooQueue") and the server system has a corresponding inco

Re: URL overwriting - SOAP vs restful

2013-02-13 Thread Sergey Beryozkin
Actually, you mentioned that >> Map requestContext = new HashMap(); >> requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,endPointURL); >> >> exchange.getOut().setHeader(Client.REQUEST_CONTEXT, requestContext); actually affects the RS path too - I can see WS & RS request context pro

Re: Reference OSGI Blueprint java.util.Properties service in Blueprint Camel property placeholder

2013-02-13 Thread CharlieD
Willem, I did add: However it cannot resolve the property. It is as if it can find the service yet the properties are not there. Caused by: java.lang.IllegalArgumentException: Property with key [customer.event.endpoint] not found in properties from text: {{customer.event.endpoint}} Claus, yes

Help with mocking a filter bean method call

2013-02-13 Thread whelmingbytes
Hello, I'm somewhat new to camel so sorry if I am not explaining the concepts very well. I have a route that looks something like: from('direct:start').filter().method('bean', 'matches').to('mock:endpoint').stop() In my test, I am trying to mock out the method 'matches' call using mockito. I hav

Re: Using Dead letter channel with ActiveMQ?

2013-02-13 Thread dunnlow
I have a solution that seems to be working. I have assigned a context errorHandler and have a deliverypolicy that has a dead letter uri (a route that dumps to a file), like: When a message fails 5 times (to test I am shutting down the

MongoDB Jackson Date Mapping Option

2013-02-13 Thread Ron Anderson
The mongodb component is using the Jackson library for object mapping and has mapping of dates defaulted to Unix timestamps rather than ISODate. This causes some problems with using the Aggregation Framework and makes queries more difficult to view dates. There is an option to set this default be

Re: MongoDB Jackson Date Mapping Option

2013-02-13 Thread Raul Kripalani
Hi Ron, Not at the MongoDB component itself. We just provide this Object => JSON conversion for convenience, not as a fully-fledged, flexible transformation path. That said, Camel provides a camel-jackson data format which is indeed more flexible and supports injecting a custom ObjectMapper with

Re: Camel Scala JAXB DSL

2013-02-13 Thread Henryk Konsek
> I used the following for my JaxbDataFormat and I guess this is the correct > one as well. > > org.apache.camel.model.dataformat.JaxbDataFormat Consider using org.apache.camel.converter.jaxb.JaxbDataFormat. "Model" package is primarly intended to be used with Java and XML DSLs. You probably just

Re: Help with mocking a filter bean method call

2013-02-13 Thread Henryk Konsek
Hi Spencer, Welcome to our community :) . > from('direct:start').filter().method('bean', > 'matches').to('mock:endpoint').stop() > > In my test, I am trying to mock out the method 'matches' call using mockito. The approach of mine choice would be to register Mockito mock in the Camel registry un

Re: Help with mocking a filter bean method call

2013-02-13 Thread whelmingbytes
Thanks for the quick reply! This will work for this example, but I only created this example for simplicity sake. In my actual test, my bean is loaded up with spring component scan (most of the tests that use this are integration tests) and the test is initialized with overriding the createApplica

Re: ExchangeHelper.copyResults(...) doesn't copy exchange pattern

2013-02-13 Thread Marek Pszczolka
I'm migrating our legacy code to new Camel so I would like to do only absolutely required changes :) That's why I used this existing inline copying processor. You are right, send("direct:...", exchange.copy()); works fine. I was mislead by other method ExchangeHelper.copyResultsPreservePattern(

How to start a polling Timer route for each message received?

2013-02-13 Thread pmcb55
Hi, I'm trying to implement a simple, but tricky little route! For each message that arrives on a queue I want to kick-off a polling timer to periodically check a specific database row for a 'safeToContinue' flag changing value from 'false' to 'true'. Once the corresponding flag in the database f

Camel HTTP component timeout issue

2013-02-13 Thread cgsk
Hi there, I am using camel http component for calling external webservice. For timeout I am setting httpClient.soTimeout=1 as a query parameter in the service url. But while testing the graceful degradation, we did dropped the response packets from the service host as part of our testing and I

JMS using inOut, but expecting multiple responses?

2013-02-13 Thread Ian Vellosa
Hello. Please forgive me if this is a basic question, but I have been hunting through the Camel documentation and patterns and not found what I’m looking for. I have a JMS infrastructure which is passing messages between two systems. I have created a simple camel route, something along the lines

Always receive String Message even with jmsMessageType set to Bytes

2013-02-13 Thread yxzhao
Hi All, We have a route which gets messages from an MQ queue. We expect messages in bytes, but always receive java.lang.String even when we set our route as below: Does anybody have a clue what we did wrong or missing? Thanks in advance for any h