https://issues.apache.org/bugzilla/show_bug.cgi?id=48177

           Summary: org.apache.naming.java.javaURLContextFactory.getInitia
                    lContext not thread-safe
           Product: Tomcat 7
           Version: trunk
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: s...@apache.org


org.apache.naming.java.javaURLContextFactory.getInitialContext() is not
thread-safe.

It attempts to share the initialContext between threads, but does not use
synch. to prevent multiple instances, so if two different threads call the
method in sequence, then they can be returned different objects, but at least
it will be the object that the thread created.

If two different threads access the method concurrently, then a thread can
return a different object from the one it created.

However, even if the cache was synch. correctly, there seems to be a problem
with the method, as the environment parameter is ignored once the context has
been created.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to