コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

この会話は、活動がないためロックされています。新しい投稿を作成してください。

解決済み

CQ5_5 - Finding a unique id for each requested page ?

Avatar

Level 1

Is there a way to get a unique id  from  the httpRequest or somewhere for each page request ?

I noticed the request_id is the same for the same page run from different browsers. I did see this cb (call back) id that seems unique for each page request.

1 受け入れられたソリューション

Avatar

正解者
Employee

In a request filter, you can then set a random number and use it all the way through..? Your filter can haev service ranking as Integer.maximum to come first i think.

元の投稿で解決策を見る

5 返信

Avatar

Employee

May be the current thread id would be unique for each request? Can you try that and let me know if this is not going to meet your req. The reason i feel current thread id would work is, each req is assigned a thread.

Avatar

Level 3

AEM uses thread pooling for handling of requests. So the same thread could handle multiple requests, one after another, before being closed.

Avatar

正解者
Employee

In a request filter, you can then set a random number and use it all the way through..? Your filter can haev service ranking as Integer.maximum to come first i think.

Avatar

Level 1

Hi thanks

I did see the same thread id being used again later, I'll try the filter.

Avatar

Level 1

thanks - a double random number set in the request bean seems to be working well