You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by David Karlsen <da...@gmail.com> on 2011/08/27 19:20:58 UTC
Global unique request id?
Does CXF assign requests an global unique ID - and how can I obtain it?
If not I guess I can create an interceptor an attach an ID to the
messagecontext?
--
David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen
Re: Global unique request id?
Posted by Freeman Fang <fr...@gmail.com>.
Hi,
org.apache.cxf.message.Message has API setId() and getId(), but in
most cases they're just NULL during runtime, I'm sure you can create
an interceptor and leverage those API to set a unique id.
Freeman
On 2011-8-28, at 上午1:20, David Karlsen wrote:
> Does CXF assign requests an global unique ID - and how can I obtain
> it?
> If not I guess I can create an interceptor an attach an ID to the
> messagecontext?
>
>
> --
> David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen
---------------------------------------------
Freeman Fang
FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
Re: Global unique request id?
Posted by Aki Yoshida <el...@googlemail.com>.
Hi David,
in that case, either you could make this ID as part of your event
message or invent your own ID property and set it in the message using
message.put("your-app-message-id-key", value) or you could set the
value using the API that Freeman mentioned.
you can use java.util.UUID for generating a unique ID value.
regards, aki
2011/8/29 David Karlsen <da...@gmail.com>:
> Inside. I'll be sending Come lokal events during the request which needs
> correlation.
> Den 29. aug. 2011 10:17 skrev "Aki Yoshida" <el...@googlemail.com>
> følgende:
>>
>> Hi,
>> what is your use case for this ID, within a system or across systems
>> (e.g., the client sending out a message that has this ID header)?
>>
>> For the latter, you can consider using ws-addressing. You can simply
>> activate the ws-a addressing feature and this will offer you the
>> MessageID header with the unique ID value.
>>
>> regards, aki
>>
>> 2011/8/27 David Karlsen <da...@gmail.com>:
>> > Does CXF assign requests an global unique ID - and how can I obtain it?
>> > If not I guess I can create an interceptor an attach an ID to the
>> > messagecontext?
>> >
>> >
>> > --
>> > David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen
>> >
>
Re: Global unique request id?
Posted by David Karlsen <da...@gmail.com>.
Inside. I'll be sending Come lokal events during the request which needs
correlation.
Den 29. aug. 2011 10:17 skrev "Aki Yoshida" <el...@googlemail.com>
følgende:
>
> Hi,
> what is your use case for this ID, within a system or across systems
> (e.g., the client sending out a message that has this ID header)?
>
> For the latter, you can consider using ws-addressing. You can simply
> activate the ws-a addressing feature and this will offer you the
> MessageID header with the unique ID value.
>
> regards, aki
>
> 2011/8/27 David Karlsen <da...@gmail.com>:
> > Does CXF assign requests an global unique ID - and how can I obtain it?
> > If not I guess I can create an interceptor an attach an ID to the
> > messagecontext?
> >
> >
> > --
> > David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen
> >
Re: Global unique request id?
Posted by Aki Yoshida <el...@googlemail.com>.
Hi,
what is your use case for this ID, within a system or across systems
(e.g., the client sending out a message that has this ID header)?
For the latter, you can consider using ws-addressing. You can simply
activate the ws-a addressing feature and this will offer you the
MessageID header with the unique ID value.
regards, aki
2011/8/27 David Karlsen <da...@gmail.com>:
> Does CXF assign requests an global unique ID - and how can I obtain it?
> If not I guess I can create an interceptor an attach an ID to the
> messagecontext?
>
>
> --
> David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen
>