Hello everyone! I'm using IBM Websphere with Axis2 1.5.1, and I ran into a performance problem: a request to an JAXWS endpoint took approx 1000 ms to complete. After investigating, I found out that the problem is in the JAXBContext: it did not managed to cache the JAXBContexts successfully.
I used debugging tools and found out that in the map that cached JAXBContexts there was a strange value for the classloader associated with my cached JAXBContext (i.e.: a DeploymentClassLoader). With every request that came, the JAXBUtils had to create another JAXBContext because the "current" classloader of the request was something like "CompoundClassLoader" (i think it was IBM-specific) did not match the "DeploymentClassLoader" there. I must say that I also tried the JAXWS samples in the Axis2 distrib and those worked fine. I started aligning my code to that of the sample, but the error still reproduces after I made the two almost identical. Can you give me some idea of the cause? I managed to work around this problem by registering an axis2 handler that explicitly set Parameter p = new Parameter(Constants.CACHE_CLASSLOADER,this.getClass().getClassLoader()); messageContext.getAxisService().removeParameter(p); messageContext.getAxisService().addParameter(p); Now the time is down to approx 50ms, and the JaxbContext is cached OK. Is my approach corect? Thank you! --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
