camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luis Augusto C. Sauerbronn" <lasa...@gmail.com>
Subject Problems with the Wire Tap Pattern
Date Mon, 18 Aug 2014 22:29:19 GMT
Good afternoon,

I am trying to apply the Wire Tap pattern to an existing (and working)
route but it seems not to work as I was expecting.
The original route is a CXF based Webservice. I want to intercept the
response and post it to a JMS queue for later consumption.

As I want to use the same queue to different operations (and different
responses), for each "Wire Tap" point I created a Processor that creates a
normalized Exchange with a Serializable Bean in its body.

As expected, the original route kept working without problems, but the
thread that is started to answer the Wire Tap is interrupted  with the
following JMSException informing it was not possible to serialize the
message.

"org.springframework.jms.UncategorizedJmsException: Uncategorized exception
occured during JMS processing; nested exception is javax.jms.JMSException:
Failed to serialize object; nested exception is
java.io.NotSerializableException: *some.package.someClass*"

The problem is, the message is indicating that it is trying to serialize
the original WebService response, not the normalized (and serializable)
object I created.

My route looks like this:

from(cxfendpoint)
     .processRef(firstProcessorReference)
     .processRef(secondProcessorReference)
     .processRef(thirdProcessorReference)
     .wiretap(jmsEndpoint)
          .newExchangeRef(wireTapProcessorReference)
     .end()
.end();

All endpoints an processor are being injected from the applicationContext.

Does anybody have an idea of why is it trying to serialize the wrong
object? I am doing something wrong?

Thanks in advance.

 Luis

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message