Hi Chris,
I think a kind of interceptor makes sense but I would not inject a jms
listener. We could define a correlation interceptor that does two things:
- When sending out a message it stores the exchange and the correlation id
- When receiving a message it finds the correlated exchange and connects
the incoming message to the exchange
This should allow you to write an interceptor that manages persistence
of messages. Recently we added continuation support to the transports
perhaps this could also be done with such an interceptor.
The aproach would then also allow to create an interceptor that simply
does no correlation so you can receive all responses asynchronously.
Greetings
Christian
cxfuser17 schrieb:
Adrian/Christian,
I've been looking over the JMSConduit code. I believe we could solve this
issue if we allowed for developers to inject their own JMS listener into the
conduit.
We have set up an interceptor to inject our own JMS correlation Id into the
Message Object. If we had a way to inject our own consumer to the conduit
we could manage the persistence and correlation of request/response
messages.
Let me know what you think.
Thanks!
-Chris
Christian Schneider wrote:
Hi Adrian,
I think this can be done in CXF. I was talking more about what you do in
the application layer and how you design your service.
For example if your service call creates a customer object then you can
simply return a generated customer id on success.
In this case you need the correlation id to make sense of the reply. If
you instead return the complete Customer data you just set including the
customer id that was created while doing
the call then you can probably process the reply without knowing the
request that caused this reply. When doing loosely coupled asynchronous
services it is very important to design like
in the second example.
Greetings
Christian
Adrian Corcoran schrieb:
Hi Christian,
So when you say that you have to write the client in a really
asynchronous
way are you saying you don't really think that there is a way that this
can
be done using CXF?
Thanks,
Adrian
--
Christian Schneider
---
http://www.liquid-reality.de
--
Christian Schneider
---
http://www.liquid-reality.de