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

Mark Struberg resolved OWB-1154.
--------------------------------
       Resolution: Fixed
         Assignee: Mark Struberg
    Fix Version/s: 1.7.1

We now lock on the Session.

txs for reporting!

> Synchronization on a string literal
> -----------------------------------
>
>                 Key: OWB-1154
>                 URL: https://issues.apache.org/jira/browse/OWB-1154
>             Project: OpenWebBeans
>          Issue Type: Bug
>    Affects Versions: 1.7.0, 1.7.1
>            Reporter: Svetlin Zarev
>            Assignee: Mark Struberg
>            Priority: Minor
>             Fix For: 1.7.1
>
>
> String literals are constant and are automatically interned, and hence act as 
> global variables in the JVM. If someone tries to synchronize on the same 
> string literal, a deadlock might occur. More information on the issue of 
> synchronizing on strings: 
> https://www.securecoding.cert.org/confluence/display/java/LCK01-J.+Do+not+synchronize+on+objects+that+may+be+reused
> The affected method is initSessionContext(Object startupObject): 
> https://github.com/apache/openwebbeans/blob/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java
> The issue has been discovered as a result of static code analysis



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to