[
https://issues.apache.org/jira/browse/MYFACES-3549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13280999#comment-13280999
]
Leonardo Uribe commented on MYFACES-3549:
-----------------------------------------
Ok, I have checked it and you're right. In the solution you propose when the
application is stopped, the classloader becomes weak/soft reachable, and two
classes loaded by different classloaders has different hashcode, so they are
considered different elements.
But the controversy about the speed is not clear yet. The big question is if
the soft reference used inside _PropertyDescriptorHolder is cleaned up when the
server runs out of memory, which in theory will cause a similar effect, but in
this case, _descriptor.getReadMethod() is a synchronized method and will cause
an additional slowdown, in addition to the fact that _readMethodRef is not
volatile, so an update will not be seen by other threads, and that will cause
another slowdown. Anyway, all this stuff could happen in an exceptional use
case.
Since the solution proposed by you sounds the most simple solution to the
problem, I'll commit it. Thanks for the explanation.
> Alternative solution to bugs MYFACES-3262 and MYFACES-3510
> ----------------------------------------------------------
>
> Key: MYFACES-3549
> URL: https://issues.apache.org/jira/browse/MYFACES-3549
> Project: MyFaces Core
> Issue Type: Improvement
> Affects Versions: 2.1.7
> Reporter: Jesús Pérez Alcaide (ISBAN)
> Attachments: AAA_patch_PropertyDescriptor_MyFaces217.jar,
> MYFACES-3549-fix-hard-reference-map.patch,
> MyFaces3262_PropertyDescriptorHolder.patch,
> MyFaces3510_AbstractFacesInitializer.patch,
> MyFaces3510_ComponentAttributesMap.patch
>
>
> I would like to propose an alternative solution to bugs MYFACES-3262 and
> MYFACES-3510, which consists in rollback the changes made in MYFACES-3510 and
> modify the solution given in MYFACES-3262 by adding a soft reference to the
> methods held in the class _PropertyDescriptorHolder.
> This alternative solution fixes MYFACES-3262 and avoids the performance loss
> caused by MYFACES-3510.
> More information in this email:
> http://markmail.org/message/xh66wlte6luqn63d
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira