]
Kabir Khan updated JBAOP-629:
-----------------------------
Fix Version/s: 2.0.0.GA
(was: 2.0.0.CR17)
Synchronize addBinding and removeBinding to avoid duplicate
operations
----------------------------------------------------------------------
Key: JBAOP-629
URL:
https://jira.jboss.org/jira/browse/JBAOP-629
Project: JBoss AOP
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 2.0.0.CR16
Reporter: Flavia Rainone
Assignee: Flavia Rainone
Fix For: 2.0.0.GA
As the addBinding method is synchronized, it is possible that a binding is added to the
binding list and the thread performing this operation is preempted by another thread that
is performing a removal operation.
In this case, the removal operation performed by this second thread could use the newly
added binding in the chains it is rebuilding. When the first thread resumes, it will
rebuild the chains for the added binding, adding interceptors to all affected chains,
ignoring the fact that those chains may already contain those interceptors, because of the
chain rebuild process performed by the second thread.
In this scenario, we will end up with chains containing duplicate interceptors.
Notice that synchronizing the add and remove methods is not an option, as those methods
being synchronized causes a deadlock (see JBAOP-501).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: