Re: Sometimes exceptions are not getting handled

2009-02-04 Thread Claus Ibsen
On Wed, Feb 4, 2009 at 1:51 PM, Manish K Bafna
manish.ba...@headstrong.com wrote:
 Hi,
 I have added onException clause in the route. But sometimes it is not getting 
 called. Can't identify the exact scenario in which this block is not getting 
 executed. Any hints or issues around it.

 Thanks,
 Manish.
Hi

In Camel 1.6 the onException strategy for picking up how and when to
handle an exception has been much improved.
It doesnt really look down the exception tree to find caused by's so
that could affect.

What is you route? Which onException have you defined?






 ***The information transmitted is intended only for the person or entity to 
 which it is addressed and may contain confidential and/or privileged 
 material. Any review,retransmission,dissemination or other use of, or taking 
 of any action in reliance upon, this information by persons or entities other 
 than the intended recipient is prohibited. If you received this in error, 
 please contact the sender and delete the material from any computer.***




-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/


Re: CAMEL 2.0 SNAPSHOT sources jars are not in maven repo

2009-02-04 Thread James Strachan
2009/2/4 Willem Jiang willem.ji...@gmail.com:
 Hi James,

 I just checked the script , we need to update the
 svn co https://svn.apache.org/repos/asf/activemq/camel/trunk camel 
 $LOGDIR/camel-deploy.log

 to
 svn co https://svn.apache.org/repos/asf/camel/trunk camel 
 $LOGDIR/camel-deploy.log

 to deploy the latest camel 2.0 snapshot.

 Willem


 James Strachan wrote:
 2009/1/3 Willem Jiang willem.ji...@gmail.com:
 Hi,

 I don't know how does the CAMEL 2.0 SNAPSHOT be deployed into maven
 repo. May be James the best man (he manages lots of cron scripts :)) to
 answer that.
 But it should be easy to deploy the source, as I did CXF SNAPSHOT
 deploying just by typing mvn -Pdeploy deploy [1]

 I will try to fix it add a deploy profile later today , but we also need
 to update the cron deploy script.

 [1] http://cwiki.apache.org/CXF/release-management.html

 I've fixed the scripts.

 FWIW they live here...

 http://svn.apache.org/repos/asf/servicemix/scripts/builds/bin/

 e.g.

 http://svn.apache.org/repos/asf/servicemix/scripts/builds/bin/camel-nightly.sh



Fixed. Manually kicked off the next build and fingers crossed - it should work!

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Write routing condition in xml config file

2009-02-04 Thread mta38

Hi all,
Is someone can say me how to test a header exchange value in a xml config
file.
For example, if the header TEST exists in my  IN message and its value is
10, I want to do the following:

route
from uri=…
choice
when
In.header.TEST==10
to uri=…/
/when

…
/choice

/route
Any help are welcome,

Best regards

Mta38

-- 
View this message in context: 
http://www.nabble.com/Write-routing-condition-in-xml-config-file-tp21828008s22882p21828008.html
Sent from the Camel - Users mailing list archive at Nabble.com.



JMS Transactions

2009-02-04 Thread benshort

Hi, 

I have the following route...

from(jms:rts_messages_email?concurrentConsumers=1)
.process(new SendingProcessor())

.onException(Exception.class)
.handled(true)
.maximumRedeliveries(0)
.process(new SendFailedProcessor())
.to(jms:message_status, jms:failed_messages)
.end()

.to(jms:message_status, smtp)
.process(new SentProcessor())
.to(jms:message_status);

Errors while sending the smtp will be caught and sent to jms:message_status
and jms:failed_messages.

jms:message_status is used to log out the send attempts. jms:failed_messages
is a queue of failed messages that are processed to decide if they should be
retried or not.

Now what I would like to do is make the shown route transactional. So the
message is not removed from jms:rts_messages_email until it has been added
to jms:message_status and jms:failed_messages in the case of an error or
jms:message_status in the case of no error.

I want to do this so that if the application dies while the message is
trying to be sent it will still be in the jms:rts_messages_email jms queue.
and next time the application is started it will be pulled out and retried.

Is this possible?

Ben
-- 
View this message in context: 
http://www.nabble.com/JMS-Transactions-tp21832102s22882p21832102.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: understanding SEDA and Thread processor

2009-02-04 Thread Roman Kalukiewicz
2009/2/3 huntc hu...@mac.com:

 I think that what you're looking for is something akin to the
 concurrentConsumers parameter for a JMS endpoint.

 My recommendation is to raise a JIRA request for an enhancement so that the
 SEDA endpoint can receive a concurrentConsumers parameter. After all seems
 to me that using SEDA is a poor-mans JMS endpoint.

I even created such a JIRA:

https://issues.apache.org/activemq/browse/CAMEL-1297

In fact it is almost done, but I have to access a box that I was
working on to commit this thing ;)

Roman


Re: Write routing condition in xml config file

2009-02-04 Thread Claus Ibsen
On Wed, Feb 4, 2009 at 11:39 AM, mta38 mtaraud@orange-ftgroup.com wrote:

 Hi all,
 Is someone can say me how to test a header exchange value in a xml config
 file.
 For example, if the header TEST exists in my  IN message and its value is
 10, I want to do the following:

 route
from uri=…
choice
when
In.header.TEST==10
to uri=…/
/when

…
/choice

 /route
 Any help are welcome,
See this wiki page:
http://camel.apache.org/content-based-router.html

The $ notation will get the header.

So you should do:
xpath$TEST = '10'/xpath

Otherwise you can try some of the other languages
http://camel.apache.org/languages.html

... that can do = comparison, such as EL.
http://camel.apache.org/el.html

And the xpath is documented here:
http://camel.apache.org/xpath.html




 Best regards

 Mta38

 --
 View this message in context: 
 http://www.nabble.com/Write-routing-condition-in-xml-config-file-tp21828008s22882p21828008.html
 Sent from the Camel - Users mailing list archive at Nabble.com.





-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/


Mina consuming endpoint with sync - how to override?

2009-02-04 Thread huntc

Hi there,

I have a consuming mina: endpoint with sync=true set on it. In my use case I
have some messages coming in that require a response, and some that do not.
Unfortunately where I do not want to return a message Camel is still
expecting that I should and throws an ExchangeTimedOutException. How can I
tell Camel that despite stating sync=true, for a given exchange it should
not expect a response?

I have tried a few things including the invocation of a Processor that
closes the Mina session after the InOnly endpoint
(exchange.getSession().close()).

Here's my route currently:


from(
   
mina:tcp://0.0.0.0:11010?codec=ilvCodecFactoryamp;lazySessionCreation=trueamp;sync=true)
.choice().when(body().isNotNull()).to(
direct:logFingerprintEvent).otherwise()
.throwFault(
Unknown notification sent by fingerprint reader);

from(direct:logFingerprintEvent)
.choice()
.when(body().isInstanceOf(ControlOKEvent.class))
.to(
activemq-sender:queue:...?exchangePattern=InOut)
.when(body().isInstanceOf(ControlFailedEvent.class))
.to(
activemq-sender:queue:...?exchangePattern=InOnly)
.otherwise()
.throwFault(
Unhandled notification sent by fingerprint reader);


Thanks for any help.

Kind regards,
Christopher


-- 
View this message in context: 
http://www.nabble.com/Mina-consuming-endpoint-with-sync---how-to-override--tp21845069s22882p21845069.html
Sent from the Camel - Users mailing list archive at Nabble.com.