Dne 2.10.2016 v 11:36 Benjamin Confino napsal(a):
We have a problem from a race condition in
The condition is as follows:
Thread one calls nestedInvocationGuard.set(*new*Counter());
Thread two calls Counter counter = nestedInvocationGuard.get(); Object
marker = request.getAttribute(GUARD_PARAMETER_NAME);
Thread one has not yet called request.setAttribute(GUARD_PARAMETER_NAME,
I don't understand how this could be a race condition? Are you saying
that both these threads are processing a single request at the same time?
This will result in thread two having a counter but no marker, leading
I believe this issue is known because of the following comment.
* This request has not been processed yet but the guard is set already.
That indicates, that the guard leaked from a previous request
* processing - most likely the Servlet container did not invoke listener
methods symmetrically. Log a warning and recover by
* re-initializing the guard
I am assuming that "symmetrically" is supposed to say "synchronised".
No it's not. It is really supposed to say symmetrically, it means that
ServletRequestListener.requestInitialized(ServletRequestEvent) should be
always followed by
I have checked with the relevant team and there is no way we can call
that method from inside a synchronised block. So I was hoping that you
might have some alternatives?
I noticed that the file at
been updated and no longer has that race condition? Do you think
including that update resolve this issue? And if so which release will
include that update.
What version of Weld are you using?
What "update" do you have in mind?
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
weld-dev mailing list
Red Hat, Czech Republic