Uploaded image for project: 'XWork'
  1. XWork
  2. XW-1071

scalability issue in AnnotationActionValidatorManager

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:
      Linux

      Description

      When I run a load test with 10 or more concurrent users I see that a few threads are blocked in AnnotationActionValidatorManager.java,
      getValidators(). I saw an old post which says that ConcurrentHaspMap should be used in this class. I am using struts version 2.0.14. Does anyone has a working fix for this in xwork? This problem is causing scalability issues.

      Below is the stack trace of a blocked thread.

      ------------------------------------------------
      Name: http-8080-1
      State: BLOCKED on
      com.opensymphony.xwork2.validator.AnnotationActionValidatorManager@1cade
      4 owned by: http-8080-16
      Total blocked: 3,957 Total waited: 719

      Stack trace:
      com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.getVa
      lidators(AnnotationActionValidatorManager.java:62)
      com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.valid
      ate(AnnotationActionValidatorManager.java:138)
      com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.valid
      ate(AnnotationActionValidatorManager.java:113)
      com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.valid
      ate(AnnotationActionValidatorManager.java:100)
      com.opensymphony.xwork2.validator.ValidationInterceptor.doBeforeInvocati
      on(ValidationInterceptor.java:142)
      com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(Vali
      dationInterceptor.java:148)
      org.apache.struts2.interceptor.validation.AnnotationValidationIntercepto
      r.doIntercept(AnnotationValidationInterceptor.java:48)
      com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Me
      thodFilterInterceptor.java:86)
      com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
      ionInvocation.java:224)
      com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
      ionInvocation.java:223)
      com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
      tack.java:455)
      com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
      cation.java:221)
      com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept
      (ConversionErrorInterceptor.java:123)
      com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
      ionInvocation.java:224)
      com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
      ionInvocation.java:223)
      com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
      tack.java:455)
      com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
      cation.java:221)
      com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(Pa
      rametersInterceptor.java:184)
      com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Me
      thodFilterInterceptor.java:86)
      com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
      ionInvocation.java:224)
      com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
      ionInvocation.java:223)
      com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
      tack.java:455)
      com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
      cation.java:221)
      com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercep
      t(StaticParametersInterceptor.java:105)
      com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
      ionInvocation.java:224)
      com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
      ionInvocation.java:223)
      com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
      tack.java:455)
      com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
      cation.java:221)
      org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInt
      erceptor.java:83)
      com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
      ionInvocation.java:224)
      com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
      ionInvocation.java:223)
      com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
      tack.java:455)
      com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
      cation.java:221)
      ------------------------------------------------------

        Attachments

        1. Scalibility_Patch.zip
          10 kB
          rahul jain

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rahja rahul jain
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: