3 Replies Latest reply: Sep 28, 2012 10:07 AM by Kalyan Pasupuleti-Oracle RSS

    Weblogic ChangeAwareClassLoader locks in multi-thread environment

    899457
      Hello.

      I've seen couple of threads related to my current question, but they led me to nowhere, so i'll ask again.

      Our application runs on Weblogic 10.3.5.0 in production mode, but still ChangeAwareClassLoader is used and it leads to critical performance degradation - all parallel application threads try to lock on one monitor object - weblogic.utils.classloaders.ChangeAwareClassLoader. I understand that it happens when classes loaded via reflection, but it's very hard to remove this logic, because majority of this locks comes from JSF ELResolver. This is an example stack trace from JRockIT recording:

      Stack Trace     Count     Total
      java.lang.ClassLoader.loadClass(String, boolean)     14 462     3 840 016 005 671
      java.lang.ClassLoader.loadClass(String)     14 430     3 839 661 082 324
      weblogic.utils.classloaders.GenericClassLoader.loadClass(String)     14 430     3 839 661 082 324
      weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(String)     14 322     3 833 134 189 390
      javax.el.FactoryFinder.newInstance(String, ClassLoader, Properties)     9 057     2 419 638 942 328
      javax.el.FactoryFinder.find(String, String, Properties)     9 057     2 419 638 942 328
      javax.el.ExpressionFactory.newInstance(Properties)     9 057     2 419 638 942 328
      javax.el.ExpressionFactory.newInstance()     9 057     2 419 638 942 328
      javax.el.BeanELResolver.invokeMethod(Method, Object, Object[])     9 057     2 419 638 942 328
      javax.el.BeanELResolver.invoke(ELContext, Object, Object, Class[], Object[])     9 057     2 419 638 942 328
      javax.el.CompositeELResolver.invoke(ELContext, Object, Object, Class[], Object[])     9 057     2 419 638 942 328
      com.sun.el.parser.AstValue.getValue(Object, Node, EvaluationContext)     9 057     2 419 638 942 328
      com.sun.el.parser.AstValue.getValue(EvaluationContext)     9 057     2 419 638 942 328
      com.sun.el.ValueExpressionImpl.getValue(ELContext)     8 793     2 352 066 884 060
      com.sun.faces.facelets.el.TagValueExpression.getValue(ELContext)     8 492     2 269 483 090 797
      com.sun.el.parser.AstIdentifier.getValue(EvaluationContext)     8 311     2 221 321 922 604
      com.sun.el.ValueExpressionImpl.getValue(ELContext)     8 038     2 144 394 485 540
      com.sun.faces.facelets.el.TagValueExpression.getValue(ELContext)     7 968     2 125 869 197 909
      com.sun.el.parser.AstIdentifier.getValue(EvaluationContext)     7 965     2 125 061 604 955
      com.sun.el.parser.AstValue.getValue(EvaluationContext)     7 965     2 125 061 604 955
      com.sun.el.ValueExpressionImpl.getValue(ELContext)     7 947     2 120 372 288 855
      com.sun.faces.facelets.el.TagValueExpression.getValue(ELContext)     7 947     2 120 372 288 855
      com.sun.el.parser.AstIdentifier.getValue(EvaluationContext)     7 829     2 085 862 001 341
      com.sun.el.ValueExpressionImpl.getValue(ELContext)     6 397     1 702 905 426 512
      com.sun.faces.facelets.el.TagValueExpression.getValue(ELContext)     6 397     1 702 905 426 512
      com.sun.el.parser.AstIdentifier.getValue(EvaluationContext)     6 397     1 702 905 426 512
      com.sun.el.parser.AstValue.getValue(EvaluationContext)     6 338     1 687 224 480 224
      com.sun.el.ValueExpressionImpl.getValue(ELContext)     5 941     1 581 122 335 568
      com.sun.faces.facelets.el.TagValueExpression.getValue(ELContext)     5 660     1 503 824 994 620
      com.sun.el.parser.AstIdentifier.getValue(EvaluationContext)     5 102     1 354 596 879 004
      com.sun.el.ValueExpressionImpl.getValue(ELContext)     4 056     1 074 341 719 496
      com.sun.faces.facelets.el.TagValueExpression.getValue(ELContext)     4 056     1 074 341 719 496
      com.sun.el.parser.AstIdentifier.getValue(EvaluationContext)     3 711     982 338 980 650
      com.sun.el.parser.AstValue.getValue(EvaluationContext)     3 446     913 442 311 746
      com.sun.el.ValueExpressionImpl.getValue(ELContext)     2 458     650 138 832 528
      com.sun.faces.facelets.el.TagValueExpression.getValue(ELContext)     2 220     585 812 675 869
      com.sun.faces.facelets.tag.jstl.core.IndexedValueExpression.getValue(ELContext)     1 304     347 132 904 927
      com.sun.el.parser.AstIdentifier.getValue(EvaluationContext)     1 304     347 132 904 927
      com.sun.el.parser.AstValue.getValue(EvaluationContext)     917     245 066 762 856
      com.sun.el.ValueExpressionImpl.getValue(ELContext)     555     148 884 634 159
      com.sun.faces.facelets.el.TagValueExpression.getValue(ELContext)     555     148 884 634 159
      javax.faces.component.ComponentStateHelper.eval(Serializable, Object)     447     118 680 278 898
      javax.faces.component.ComponentStateHelper.eval(Serializable)     447     118 680 278 898
      javax.faces.component.UIOutput.getValue()     350     93 907 854 779
      com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(UIComponent)     350     93 907 854 779
      com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(FacesContext, UIComponent)     350     93 907 854 779
      com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(FacesContext, UIComponent)     350     93 907 854 779
      javax.faces.component.UIComponentBase.encodeEnd(FacesContext)     350     93 907 854 779
      org.primefaces.renderkit.CoreRenderer.renderChild(FacesContext, UIComponent)     350     93 907 854 779
      org.primefaces.renderkit.CoreRenderer.renderChildren(FacesContext, UIComponent)     350     93 907 854 779
      org.primefaces.component.commandlink.CommandLinkRenderer.encodeEnd(FacesContext, UIComponent)     255     67 852 464 388
      javax.faces.component.UIComponentBase.encodeEnd(FacesContext)     255     67 852 464 388
      org.primefaces.renderkit.CoreRenderer.renderChild(FacesContext, UIComponent)     255     67 852 464 388
      org.primefaces.renderkit.CoreRenderer.renderChildren(FacesContext, UIComponent)     255     67 852 464 388
      org.primefaces.component.outputpanel.OutputPanelRenderer.encodeEnd(FacesContext, UIComponent)     255     67 852 464 388
      javax.faces.component.UIComponentBase.encodeEnd(FacesContext)     255     67 852 464 388
      javax.faces.component.UIComponent.encodeAll(FacesContext)     255     67 852 464 388
      javax.faces.component.UIComponent.encodeAll(FacesContext)     255     67 852 464 388
      javax.faces.component.UIComponent.encodeAll(FacesContext)     255     67 852 464 388
      javax.faces.render.Renderer.encodeChildren(FacesContext, UIComponent)     255     67 852 464 388
      javax.faces.component.UIComponentBase.encodeChildren(FacesContext)     255     67 852 464 388
      org.primefaces.renderkit.CoreRenderer.renderChild(FacesContext, UIComponent)     255     67 852 464 388
      org.primefaces.renderkit.CoreRenderer.renderChildren(FacesContext, UIComponent)     255     67 852 464 388
      org.primefaces.component.outputpanel.OutputPanelRenderer.encodeEnd(FacesContext, UIComponent)     255     67 852 464 388

      Any ideas how to disable ChangeAwareClassLoader altogether? Or maybe there's some other "standart" solution for problems like that?