Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: EAP_EWP 5.1.0
    • Fix Version/s: EAP_EWP 5.1.2 ER1
    • Component/s: EJB
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      1) Deploy the etat.ear

      2) Start up the EAP server

      3) Setup some vars for use by twiddle commands:
      serverUrl='jnp://localhost:1099'
      jmxUser='admin'
      jmxPassword='admin'
      mBeanName='jboss.j2ee:jndiName=TestBean,service=EJB'
      mBeanAttr='DetypedInvocationStatistics'
      mBeanOperation='resetInvocationStats'

      4) Run twiddle to make sure it is working and given a base-line:
      ./twiddle.sh -s "$

      {serverUrl}" -u "${jmxUser}" -p "${jmxPassword}" get "${mBeanName}" "${mBeanAttr}"

      Should see something similar to:
      DetypedInvocationStatistics={#Global={lastResetTime=1304634714452, concurrentCalls=0, maxConcurrentCalls=0}}

      5) Now invoke the EJB using the servlet:
      wget "http://localhost:8080/etatWeb/TestEJBServlet" -a etat.log

      6) Run twiddle again to see that it actually invoked the EJB and we have valid stats:
      ./twiddle.sh -s "${serverUrl}

      " -u "$

      {jmxUser}" -p "${jmxPassword}" get "${mBeanName}" "${mBeanAttr}"

      Should look something like:
      DetypedInvocationStatistics={remove={minTime=1, maxTime=1, count=1, totalTime=1}, create={minTime=121, maxTime=121, count=1, totalTime=121}, sayHello={minTime=3, maxTime=3, count=1, totalTime=3}, #Global={lastResetTime=1304635345747, concurrentCalls=0, maxConcurrentCalls=1}}

      7) And here is how we make things go bad, invoke the resetInvocationStats operation on the EJB using twiddle:
      ./twiddle.sh -s "${serverUrl}" -u "${jmxUser}

      " -p "$

      {jmxPassword}" invoke "${mBeanName}" "${mBeanOperation}"

      8) The resetInvocationStats operation will be successful but look what happens when we get the stats now:
      ./twiddle.sh -s "${serverUrl}" -u "${jmxUser}" -p "${jmxPassword}

      " get "$

      {mBeanName}

      " "$

      {mBeanAttr}

      "

      You should get some wacky results similar to:
      DetypedInvocationStatistics={remove=

      {minTime=9223372036854775807, maxTime=0, count=0, totalTime=0}, create={minTime=9223372036854775807, maxTime=0, count=0, totalTime=0}

      , sayHello=

      {minTime=9223372036854775807, maxTime=0, count=0, totalTime=0}

      , #Global={lastResetTime=1304635363064, concurrentCalls=0, maxConcurrentCalls=0}}

      So, looking at what we get, it is the minTime that is wrong. we should expect it to be 0. This is probably happening because after a reset we should probably expected the stats to look like:
      DetypedInvocationStatistics={#Global=

      {lastResetTime=1304634714452, concurrentCalls=0, maxConcurrentCalls=0}

      }

      Show
      1) Deploy the etat.ear 2) Start up the EAP server 3) Setup some vars for use by twiddle commands: serverUrl='jnp://localhost:1099' jmxUser='admin' jmxPassword='admin' mBeanName='jboss.j2ee:jndiName=TestBean,service=EJB' mBeanAttr='DetypedInvocationStatistics' mBeanOperation='resetInvocationStats' 4) Run twiddle to make sure it is working and given a base-line: ./twiddle.sh -s "$ {serverUrl}" -u "${jmxUser}" -p "${jmxPassword}" get "${mBeanName}" "${mBeanAttr}" Should see something similar to: DetypedInvocationStatistics={#Global={lastResetTime=1304634714452, concurrentCalls=0, maxConcurrentCalls=0}} 5) Now invoke the EJB using the servlet: wget "http://localhost:8080/etatWeb/TestEJBServlet" -a etat.log 6) Run twiddle again to see that it actually invoked the EJB and we have valid stats: ./twiddle.sh -s "${serverUrl} " -u "$ {jmxUser}" -p "${jmxPassword}" get "${mBeanName}" "${mBeanAttr}" Should look something like: DetypedInvocationStatistics={remove={minTime=1, maxTime=1, count=1, totalTime=1}, create={minTime=121, maxTime=121, count=1, totalTime=121}, sayHello={minTime=3, maxTime=3, count=1, totalTime=3}, #Global={lastResetTime=1304635345747, concurrentCalls=0, maxConcurrentCalls=1}} 7) And here is how we make things go bad, invoke the resetInvocationStats operation on the EJB using twiddle: ./twiddle.sh -s "${serverUrl}" -u "${jmxUser} " -p "$ {jmxPassword}" invoke "${mBeanName}" "${mBeanOperation}" 8) The resetInvocationStats operation will be successful but look what happens when we get the stats now: ./twiddle.sh -s "${serverUrl}" -u "${jmxUser}" -p "${jmxPassword} " get "$ {mBeanName} " "$ {mBeanAttr} " You should get some wacky results similar to: DetypedInvocationStatistics={remove= {minTime=9223372036854775807, maxTime=0, count=0, totalTime=0}, create={minTime=9223372036854775807, maxTime=0, count=0, totalTime=0} , sayHello= {minTime=9223372036854775807, maxTime=0, count=0, totalTime=0} , #Global={lastResetTime=1304635363064, concurrentCalls=0, maxConcurrentCalls=0}} So, looking at what we get, it is the minTime that is wrong. we should expect it to be 0. This is probably happening because after a reset we should probably expected the stats to look like: DetypedInvocationStatistics={#Global= {lastResetTime=1304634714452, concurrentCalls=0, maxConcurrentCalls=0} }
    • Release Notes Text:
      Hide
      EJB method invocation statistics returned by the InvocationStatistics MBean would include a value of <Long.MAX_VALUE> for minimum execution time (minTime) after a call to resetStats. The fix is to clear the method invocation statistics list after the resetStats call so that the stats reflect the same state they did when the EJB was first initialized.
      Show
      EJB method invocation statistics returned by the InvocationStatistics MBean would include a value of <Long.MAX_VALUE> for minimum execution time (minTime) after a call to resetStats. The fix is to clear the method invocation statistics list after the resetStats call so that the stats reflect the same state they did when the EJB was first initialized.
    • Release Notes Docs Status:
      Not Required

      Description

      Issue appears to be with the stats returned by the EJB MBean. The following twiddle command reveals the strange statistics:

      serverUrl='http://localhost:8080'
      jmxUser='admin'
      jmxPassword='admin'
      mBeanName='jboss.j2ee:jndiName=TestBean,service=EJB'
      mBeanAttr='DetypedInvocationStatistics'
      ./twiddle.sh -s "$

      {serverUrl}

      " -u "$

      {jmxUser}

      " -p "$

      {jmxPassword}

      " get
      "$

      {mBeanName}

      " "$

      {mBeanAttr}

      "

      Essentially, you need to deploy the EAR attached to this jira to an EAP 5.1 instance and then push some load to it to see the strange return values.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  loleary Larry O'Leary
                  Reporter:
                  bkramer Biljana Kramer
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: