You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by g8torPaul <pa...@ventyx.abb.com> on 2014/10/30 14:19:53 UTC

CXF Inteceptor Error handling with Camel-CXF, JMS and ActiveMQ

I have an inbound CXF webservice that consumes a SOAP message off a JMS
queue. 
The endpoint is configured via Camel Spring using the
org.apache.cxf.transport.jms.JMSConfigFeature. 
The JMS Configuration is setup to consume off an ActiveMQ JMS queue and it
is transactional. 
The CXF endpoint has a inbound interceptor for WSSecurity. 
If a user sends in a SOAP message with invalid Security headers the CXF
endpoint interceptor will throw an exception. 
The exception gets processed by the internal Spring DMLC used by the CXF
JMSConfigFeature and a rollback is initiated. 
Since our ActiveMQ is setup with a redelivery policy to continuously
redeliver the message, the message gets rolled back to the queue and gets
redelivered. 

The problem is that the message gets another exception upon redelivery and
repeats the cycle infinitely which results in blocking the JMS queue (which
only has one a consumer). 

I am trying to figure out how to handle this special case of WSSecurity
exceptions such that I can dump the message to a log and remove the message
from the queue for redelivery. 
Camel Exception handling (errorHandler, onException) does not help in this
case because the message never makes it into the route (the exception occurs
in an interceptor). 

Does anyone know a way to handle this? 

This issue is cross-posted in the Apache Camel forum (using Camel CXF).

http://camel.465427.n5.nabble.com/CXF-Inteceptor-Error-handling-with-Camel-CXF-JMS-and-ActiveMQ-tt5758297.html#none





--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-Inteceptor-Error-handling-with-Camel-CXF-JMS-and-ActiveMQ-tp5750450.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXF Inteceptor Error handling with Camel-CXF, JMS and ActiveMQ

Posted by g8torPaul <pa...@ventyx.abb.com>.
Fixed. See my reply on the Camel forum.



--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-Inteceptor-Error-handling-with-Camel-CXF-JMS-and-ActiveMQ-tp5750450p5750605.html
Sent from the cxf-user mailing list archive at Nabble.com.