You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bu...@apache.org on 2003/08/19 09:50:24 UTC

DO NOT REPLY [Bug 22537] - AxisProperties has a non-thread safe method, getNameDiscoverer()

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22537>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22537

AxisProperties has a non-thread safe method, getNameDiscoverer()

kimuratsy@nttdata.co.jp changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED



------- Additional Comments From kimuratsy@nttdata.co.jp  2003-08-19 07:50 -------
  It seems that the exception is thrown by org.apache.commons.discovery
package, however the root problem is a parameter from Axis to Discovery
pkg as a ClassLoader.  That is, the value of tha parameter is NULL.
  
  Of particular note is that AxisProperties has a couple of static
fields and methods, but it doesn't have any synchronized blocks ...

<snippet>
org.apache.axis.AxisProperties.java 
 :
    private static NameDiscoverers nameDiscoverer;
    private static ClassLoaders loaders;
 :
    public static ResourceNameDiscover getNameDiscoverer() {
        if (nameDiscoverer == null) {
            nameDiscoverer = new NameDiscoverers();
            nameDiscoverer.addResourceNameDiscover
(getAlternatePropertyNameDiscoverer());
            nameDiscoverer.addResourceNameDiscover(new 
DiscoverNamesInManagedProperties());
            nameDiscoverer.addResourceNameDiscover(new DiscoverServiceNames
(getClassLoaders()));
            nameDiscoverer.addResourceNameDiscover(getMappedNames());
        }
        return nameDiscoverer;
    }
 :
    private static ClassLoaders getClassLoaders() {
        if (loaders == null) {
            loaders = ClassLoaders.getAppLoaders(AxisProperties.class, null, 
true);
        }
        return loaders;
    }
 :
</snippet>

-- 
Toshi <to...@apache.org>