axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jarek Gawor (JIRA)" <j...@apache.org>
Subject [jira] Created: (AXIS2-3728) Context class loader not restored correctly
Date Thu, 10 Apr 2008 18:02:08 GMT
Context class loader not restored correctly
-------------------------------------------

                 Key: AXIS2-3728
                 URL: https://issues.apache.org/jira/browse/AXIS2-3728
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
            Reporter: Jarek Gawor
             Fix For: 1.4, nightly


has the following code:
AsyncResponse.java does not restore the context classloader correctly. For example:

    protected void onError(Throwable flt, MessageContext mc, ClassLoader cl) {
        setThreadClassLoader(cl);
        onError(flt, mc);
        ClassLoader origClassLoader = (ClassLoader)AccessController.doPrivileged(new PrivilegedAction()
{
            public Object run() {
                return Thread.currentThread().getContextClassLoader();
            }
        });
        setThreadClassLoader(origClassLoader);
    }

The origClassLoader is retrieved after new class loader is already set on the thread so really
origClassLoader  == cl. The origClassLoader should be obtained before the first setThreadClassLoader(cl)
call. Same problem applies to onCompleted() call.




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message