JBoss Community

Continuing problem with XTS WS-T tests in AS trunk/CXF 2.2.9

reply from Jim Ma in JBoss Web Services CXF - View the full discussion

Hi Andrew,

Sorry for the late response . I was occupied with the TCK stuff last week.

Thanks for your good analysis. After I added the @Addressing annotation in the service implementation class , I successfully reproduced this error . When I enabled WSA for this oneway operation , I  got null value from http request too.  This is another bug in CXF when run with Tomcat/JBossWeb.

 

416                     inMessage.getInterceptorChain().pause();

                        // ... and resume on executor thread
                        getExecutor(inMessage).execute(new Runnable() {
                            public void run() {
421                             inMessage.getInterceptorChain().resume();
                            }

 

 

I debuged the 416 thread for the oneway and WSA enable operation. When  this line executed, this thread(http-127.0.0.1-8080-1) will continue to  do the left thing to set the http status code  and cleanup some thing.  The cleanup thing includes the Request.recycle() :

package org.apache.coyote;
public final class Request{
public void recycle() {
        bytesRead=0;

        contentLength = -1;
        contentTypeMB = null;
        charEncoding = null;
        headers.recycle();
        serverNameMB.recycle();
        serverPort=-1;
        localPort = -1;
        remotePort = -1;
        available = 0;

        cookies.recycle();
        parameters.recycle();

        unparsedURIMB.recycle();
        uriMB.recycle();
        decodedUriMB.recycle();
        queryMB.recycle();
        methodMB.recycle();
        protoMB.recycle();

        schemeMB.recycle();

        instanceId.recycle();
        remoteUser.recycle();
        authType.recycle();
        attributes.clear();
    }
}

After this executed, all the request information will be cleared.  So the interceptors running

in 421 line thread gets the null value from Request.schemeMB.

 

I created a JIRA in CXF https://issues.apache.org/jira/browse/CXF-2911 and looking at a fix.

 

Thanks,

Jim

Reply to this message by going to Community

Start a new discussion in JBoss Web Services CXF at Community