[ 
https://issues.apache.org/jira/browse/AXIS-2852?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Francis Hitchens updated AXIS-2852:
-----------------------------------


The fix is trivial...

*** ClassCache.java.orig        2011-06-11 11:49:54.643940575 -0500
--- ClassCache.java     2011-06-11 11:51:06.164437871 -0500
***************
*** 83,88 ****
--- 83,89 ----
          if ((jc == null) && (cl != null)) {
              // Try to load the class with the specified classloader
              Class cls = ClassUtils.forName(className, true, cl);
+           registerClass(className, cls);
              jc = new JavaClass(cls);
          }
          return jc;

Results are non-trivial, on a system that was utilizing 70% CPU, after the fix 
CPU utilization was reduced by 30%.

> org.apache.axis.utils.cache.ClassCache not caching classes
> ----------------------------------------------------------
>
>                 Key: AXIS-2852
>                 URL: https://issues.apache.org/jira/browse/AXIS-2852
>             Project: Axis
>          Issue Type: Bug
>          Components: Basic Architecture
>    Affects Versions: 1.2, 1.3, 1.4, 1.5
>         Environment: Any
>            Reporter: Francis Hitchens
>
> org.apache.axis.utils.cache.ClassCache.lookup() is used to locate service 
> classes cached in the classes internal HashMap, classCache. If a class is not 
> found, then lookup() calls ClassUtils.forName() to load the service class. 
> The service class is then returned to lookup() and stored in another cache in 
> the JavaClass object.
> At no point is the service class added to the ClassCache HashMap classCache.
> Consequently every single Web Service request, needs to call the class loader 
> to load and instantiate a service object. Under light load this is not 
> noticeable. Under heavy load on a WebLogic server this behaviour leads to the 
> JEE container filling up with threads stuck on "waiting for monitor entry" on 
> the ClassUtils.forName() call as the class loader thread is synchronized .
> ClassCache.lookup() needs to be modified to add the service class to the 
> classCache HashMap.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to