tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Gumbrecht (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OPENEJB-2070) Potential deadlock in URLClassLoaderFirst
Date Thu, 06 Feb 2014 16:44:12 GMT

    [ https://issues.apache.org/jira/browse/OPENEJB-2070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13893519#comment-13893519
] 

Andy Gumbrecht commented on OPENEJB-2070:
-----------------------------------------

IMHO ReentrantLock is much better for debugging and is often faster than a synchronized method.

> Potential deadlock in URLClassLoaderFirst
> -----------------------------------------
>
>                 Key: OPENEJB-2070
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-2070
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: container system
>    Affects Versions: 4.6.0
>         Environment: NA
>            Reporter: Andy Gumbrecht
>             Fix For: 4.6.1
>
>
> Calling org.apache.openejb.util.classloader.URLClassLoaderFirst#loadClass from one thread
may cause a deadlock if Class.forName is called from another thread, as this internally calls
ClassLoader.getCallerClassLoader() - Which may be the same URLClassLoaderFirst instance.
> Adding an ReentrantLock should be a viable solution.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message