Hello Team,
I’m facing an issue with the HttpSessionBindingListener implementation in Jenkins. The valueBound() and valueUnbound() methods are not being triggered during Jenkins login and logout as expected.
Issue Details
- Jenkins Version 2.440.3: Works as expected. Both valueBound() and valueUnbound() are called at the right moments.
- Jenkins Version 2.479.2: The methods are not called during login and logout.
What I’m Trying to Achieve
- valueBound() should be called when the object is added to the session.
- valueUnbound() should be called when session.invalidate() is executed or when the object is explicitly removed via session.removeAttribute().
Questions
- Has there been any change in the session management logic between Jenkins 2.440.3 and 2.479.2?
- Does Jenkins now use a custom session management mechanism that bypasses HttpSessionBindingListener?
- Is there any alternative way to achieve the same behavior — to detect when an object is added or removed from the session?
Any guidance or suggestions on how to resolve this issue would be greatly appreciated.