Error when using XPath functions

2009-08-04 Thread Dragisa Krsmanovic
Camel 2.0-M3, trying setHeader like: substring(//atom:entry/atom:id/text(), 9) //atom:entry/atom:id/text() returns correct result, but if I try to use any of the XPath functions I get this error: org.apache.camel.builder.xml.InvalidXPathExpression: Invalid xpath: substring(//atom:entry/ato

Re: Error when using XPath functions

2009-08-05 Thread Dragisa Krsmanovic
Claus Ibsen-2 wrote: > > On Wed, Aug 5, 2009 at 12:59 AM, Dragisa Krsmanovic > wrote: >> >> Camel 2.0-M3, trying setHeader like: >> >> >>   substring(//atom:entry/atom:id/text(), 9) >> >> >> //atom:entry/atom:id/text() returns c

Regression in 2.0.0 : http fails with I/O Exception

2009-09-14 Thread Dragisa Krsmanovic
0-1. On delivery attempt: 0 caught: java.net.SocketException: Connection reset [ -- Dragisa Krsmanovic Java Developer Public Library of Science http://www.plos.org

pollEnrich doesn't look for FILE_NAME

2009-09-15 Thread Dragisa Krsmanovic
=none",1) .to("file:/test/ftpdir"); For some reason, pollEnrich doesn't seem to take Exchange.FILE_NAME header into account and fetches the first available file, not the one specified in setHeader(...) Is this a bug ? -- Dragisa Krsmanovic Java Developer Public Library of Science http://www.plos.org

Re: Regression in 2.0.0 : http fails with I/O Exception

2009-09-15 Thread Dragisa Krsmanovic
I created JIRA issue for this https://issues.apache.org/activemq/browse/CAMEL-2017 On Mon, 2009-09-14 at 15:51 -0700, Dragisa Krsmanovic wrote: > > > http fails with I/O Exception > Date: > Mon, 14 Sep 2009 15:51:11 -0700 -- Dragisa Krsmanovic

Re: pollEnrich doesn't look for FILE_NAME

2009-09-16 Thread Dragisa Krsmanovic
I want something like: ... .setHeader(Exchange.FILE_NAME).xpath("...") .pollEnrich("file:/test/data?noop=true&readLock=none", 1) -- Dragisa Krsmanovic Java Developer Public Library of Science http://www.plos.org

Re: pollEnrich doesn't look for FILE_NAME

2009-09-16 Thread Dragisa Krsmanovic
n which the > file you want to read. > > > See more here: > http://camel.apache.org/polling-consumer.html > -- Dragisa Krsmanovic Java Developer Public Library of Science http://www.plos.org

Calling setHeader() after to()

2009-10-12 Thread Dragisa Krsmanovic
... But it doesn't allow me to add any setHeader methods after .to("rnc:...") I want to validate a message before I try to extract Xpath and I have an onException handler to catch ValidationException. What am I doing wrong ? -- Dragisa Krsmanovic Java Developer Public Library of Science http://www.plos.org

Re: Calling setHeader() after to()

2009-10-13 Thread Dragisa Krsmanovic
On Tue, 2009-10-13 at 06:13 +0200, Claus Ibsen wrote: > On Mon, Oct 12, 2009 at 10:39 PM, Dragisa Krsmanovic > wrote: > > I am trying to do something like: > > > > from("activemq:plos.pmc") > >.to("rnc:pmc-message.rnc") > >.setHe

Re: Calling setHeader() after to()

2009-10-14 Thread Dragisa Krsmanovic
", String.class)) .to("mock:end"); xpath() is not defined in RouteBuilder. -- Dragisa Krsmanovic Java Developer Public Library of Science http://www.plos.org

Re: Calling setHeader() after to()

2009-10-15 Thread Dragisa Krsmanovic
On Thu, 2009-10-15 at 08:37 +0200, Claus Ibsen wrote: > On Wed, Oct 14, 2009 at 11:07 PM, Dragisa Krsmanovic > wrote: > > On Wed, 2009-10-14 at 05:58 +0200, Claus Ibsen wrote: > >> Ah the reason is that the javac and generics is limited in terms of DSL > >> wise. &g

Passing system properties to camel-maven-plugin when generating report

2009-10-28 Thread Dragisa Krsmanovic
Spring context. I need to pass some system properties to it. How do I do that ? -- Dragisa Krsmanovic Java Developer Public Library of Science http://www.plos.org

Transactions and aggregator

2009-11-11 Thread Dragisa Krsmanovic
on is somehow saved along the route ? Persistence works fine for routes that don't have aggregation. For example : from("activemq:worksfine) .transacted() .process(..) .delay(...) .to("mock:end"); In this case, on Camel restart, the messages will be picked fro

Interceptors and transactions

2009-11-11 Thread Dragisa Krsmanovic
Do interceptors work with transactions ? If I have transacted turned on, messages don't seem to be re-routed to the interceptor. -- Dragisa Krsmanovic Java Developer Public Library of Science http://www.plo

Intermittent validation error

2009-11-17 Thread Dragisa Krsmanovic
readOnlyProperties = true, readOnlyBody = true, droppable = false, text = }] 09:32:36,641 [enerContainer-1] MessageValidationFailed ERROR Exchange[Body:] I am also getting "[Fatal Error] :1:1: Premature end of file." on the standard out. -- Dragisa Krsmanovic Java Develo

Cyclic dependency in latest 2.1-SNAPSHOT

2009-11-17 Thread Dragisa Krsmanovic
l='org.apache.camel:camel-jms'}' introduces to cycle in the graph org.apache.camel:camel-jms --> org.apache.camel:camel-test --> org.apache.camel:camel-jms -- Dragisa Krsmanovic Java Developer

maximumRedeliveryDelay applies even if you are not using exponential back off

2009-11-18 Thread Dragisa Krsmanovic
ximum redelivery delay if using exponential back off." But it seems that it applies always. Maybe you just need to change the docs to reflect that ? -- Dragisa Krsmanovic Java Developer Public Library of Science http://ww

Original message body lost in transacted route

2009-11-20 Thread Dragisa Krsmanovic
package org.apache.camel; import org.springframework.test.context.testng.AbstractTestNGSpringContextTests; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.annotation.DirtiesContext; import org.apache.camel.spring.SpringRouteBuilder; import org.apache.camel.component.mock.MockEndpoint; import org.

Re: Original message body lost in transacted route

2009-11-23 Thread Dragisa Krsmanovic
detailed on transacted vs. non-transacted error handling. Another question. I want to redeliver N times and, if all fail, send message to another queue. If I want messages to be rolled back to JMS each time (not redelivered to the failed part of the route). How would

Re: Best Practices for Triggering Routes from Code

2009-12-02 Thread Dragisa Krsmanovic
I don't see other > methods used in the examples (or for that matter, I don't recall seeing > ProducerTemplate in non-test code, though I haven't searched too closely). > > Basically, just tryin

ActiveMQ 5.3.0 and PollingConsumer

2009-12-11 Thread Dragisa Krsmanovic
tivemq-camel 5.2.0 Interesting thing is that test will succeed with activemq-camel 5.3.0 if I take the transactional setup from context.xml (routes are not marked as transacted). In other words, if I just have this for activemq in context.xml:

Not possible to use onException and doTry()... doFinally() ?

2009-12-11 Thread Dragisa Krsmanovic
ead of seda, I would get the exception thrown back. -- Dragisa Krsmanovic Java Develo

onException() silently ignored if after transacted()

2009-12-14 Thread Dragisa Krsmanovic
fter transacted(). To silently ignore onException() seems to be most undesirable. Cheers, --

Re: ActiveMQ 5.3.0 and PollingConsumer

2009-12-14 Thread Dragisa Krsmanovic
Here is more details. On Fri, 2009-12-11 at 10:42 -0800, Dragisa Krsmanovic wrote: > @Test > @DirtiesContext > public void test() throws InterruptedException { > endpoint.setResultWaitTime(1l); > endpoint.expectedMessageCount(1); > endpoint.message(0).bod

Re: ActiveMQ 5.3.0 and PollingConsumer

2009-12-18 Thread Dragisa Krsmanovic
I created an issue for this problem https://issues.apache.org/activemq/browse/CAMEL-2305 On Mon, 2009-12-14 at 10:28 -0800, Dragisa Krsmanovic wrote: > Here is more details. > > On Fri, 2009-12-11 at 10:42 -0800, Dragisa Krsmanovic wrote: > > @Test > > @DirtiesContext &

What is difference between redeliverDelay() and redeliveryDelay() ?

2010-04-02 Thread Dragisa Krsmanovic
In OnExceptionDefinition there are two methods with very similar name: redeliverDelay and redeliveryDelay. This is what javadoc says: redeliverDelay(long delay) : Sets the delay redeliveryDelay(long delay) : Sets the fixed delay between redeliveries Which one should I use ? ---

Message blocks route until all redelivery attempts are exhausted

2010-04-02 Thread Dragisa Krsmanovic
I have a route that is configured to re-deliver messages on exception. If there are messages in that queue and one of them fails, all other messages are blocked until all re-delivery attempts are exhausted. I would like other messages to go through while the ones that failed are waiting for their

Re: Message blocks route until all redelivery attempts are exhausted

2010-04-05 Thread Dragisa Krsmanovic
to add this option "concurrentConsumers=5" into the seda > endpoint's URI? > By default there is only one thread to consumer the message in the queue. > > Willem > > Dragisa Krsmanovic wrote: > > I have a route that is configured to re-deliver messages on excep

Re: Move to Spring 3.0

2010-04-08 Thread Dragisa Krsmanovic
We run our Camel 2.2.0 app with Spring 3.0 (3.0.1 and 3.0.2 now) without problems. On Thu, 2010-04-08 at 00:51 -0700, umairt wrote: > Hi, > > > I am trying to shift my project(currently using Camel2.2.0 and Spring 2.5) > to spring 3.0. I have changed the spring version to 3 but I am getting the

Ommiting XML declaration when converting from Dom to String

2010-05-12 Thread Dragisa Krsmanovic
n.com/browse/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java?r=HEAD#l101 -- Dragisa Krsmanovic Java Developer Public Library of Sc

Re: Ommiting XML declaration when converting from Dom to String

2010-05-13 Thread Dragisa Krsmanovic
https://issues.apache.org/activemq/browse/CAMEL-2720 On Thu, 2010-05-13 at 09:23 +0200, Claus Ibsen wrote: > On Wed, May 12, 2010 at 11:23 PM, Dragisa Krsmanovic > wrote: > > XmlConverter is hardcoded to omit XML declarations when serializing Dom > > documents. The informatio

Re: Ommiting XML declaration when converting from Dom to String

2010-05-14 Thread Dragisa Krsmanovic
That was quick. Thanks ! On Fri, 2010-05-14 at 18:15 +0800, Willem Jiang wrote: > Hi Dragisa, > > I just committed a quick fix for it, please check the latest Camel > 2.3-SNAPSHOT and look up the usage on the JIRA. > > Willem > Dragisa Krsmanovic wrote: > > https:/