myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Dietrich (Commented) (JIRA)" <>
Subject [jira] [Commented] (MYFACES-3442) Infinite loop when calling ApplicationImpl._handleListenerForAnnotations under heavy load
Date Wed, 11 Jan 2012 06:42:39 GMT


Michael Dietrich commented on MYFACES-3442:

Hi Leonardo,

at first let me thank you for you fast response and support.

We also saw that the Unit Tests were failing, when we changed the HashMap to a ConcurrentHashMap,
due to the null values you try to store, to indiciate, that no annotations were found. Synchronizing
the complete block is surely a solution to the issue, but if this method is called quite often,
it might get a bottleneck, because many session might be ligned up waiting to enter the method.
Do you have an idea how often the method is normally called? To get around this synchronisation
issue, we were thinking to use a Singleton object and put this into the Map, to indicate not
annotations have been found. This surely means more changes, because every check for the null
retun value nust be changed to check for this Singleton, but in regards to performance it
might be the better solution.

Kind regards,

> Infinite loop when calling ApplicationImpl._handleListenerForAnnotations under heavy
> -----------------------------------------------------------------------------------------
>                 Key: MYFACES-3442
>                 URL:
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.1.3
>            Reporter: Michael Dietrich
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.12, 2.1.6
> Hi,
> when doing Load Tests, we  recognize that we sometimes got stuck in an infinite loop,
when calling the _handleListenerForAnnotations method of the ApplicationImpl class. According
to our analysis, this is related to the _classToListenerForMap attribute that is is defined
as plain HashMap, so no synchronisation takes place when it is accessed from several threads.
Our suggestion would be, to define it as a ConcurrentHashMap instead, because according to
our experience, such kind of infinite loops due to concurrency don't occur with ConcurrentHashMaps.
> Kind regards,
> Michael

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message