[ 
https://issues.apache.org/jira/browse/OPENJPA-2954?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maxim Solodovnik resolved OPENJPA-2954.
---------------------------------------
      Assignee: Richard Zowalla
    Resolution: Fixed

> Unsafe publication of cached AttributeConverter instance
> --------------------------------------------------------
>
>                 Key: OPENJPA-2954
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2954
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: jpa
>    Affects Versions: 4.2.0
>            Reporter: Maxim Solodovnik
>            Assignee: Richard Zowalla
>            Priority: Major
>             Fix For: 4.2.0
>
>
> Discussion thread: 
> https://github.com/apache/openjpa/pull/144#discussion_r3682999838
> **(medium)** The converter instance is now created once and cached in a 
> non-volatile field without synchronization; FieldMetaData is shared across 
> brokers/threads, so this is unsafe publication and a behavior change 
> (previously a new converter instance per conversion, now one shared instance 
> that must be thread-safe). Consider thread-safe caching and documenting that 
> AttributeConverters are treated as shared/stateless.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to