CQ5_5 - Finding a unique id for each requested page ? | Community
Skip to main content
October 16, 2015
Solved

CQ5_5 - Finding a unique id for each requested page ?

  • October 16, 2015
  • 5 replies
  • 1451 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by gopalKa

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 replies

Adobe Employee
October 16, 2015

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.

Level 3
October 16, 2015

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

gopalKaAdobe EmployeeAccepted solution
Adobe Employee
October 16, 2015

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.

October 16, 2015

Hi thanks

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

October 16, 2015

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