Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-7790

ResourceAdapter#endpointActivation called twice because of SuspendController activation

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Done
    • None
    • 11.0.0.Alpha1
    • EJB
    • None
    • Hide

      I can see the problematic error message in the log in my crash recovery testcase

      git clone http://git.app.eng.bos.redhat.com/git/jbossqe-eap-tests-transactions.git
      export JBOSS_HOME=... (downloadable at http://download.eng.brq.redhat.com/devel/candidates/JBEAP/)
      ( -- test jvmCrashAfterPrepareJTS needs to be unignored -- )
      mvn clean verify -am -pl jbossts -DfailIfNoTests=false -fn -Djbossts.noJTA -Dtest=JcaInflowTransactionTestCase#jvmCrashAfterPrepareJTS
      
      Show
      I can see the problematic error message in the log in my crash recovery testcase git clone http: //git.app.eng.bos.redhat.com/git/jbossqe-eap-tests-transactions.git export JBOSS_HOME=... (downloadable at http: //download.eng.brq.redhat.com/devel/candidates/JBEAP/) ( -- test jvmCrashAfterPrepareJTS needs to be unignored -- ) mvn clean verify -am -pl jbossts -DfailIfNoTests= false -fn -Djbossts.noJTA -Dtest=JcaInflowTransactionTestCase#jvmCrashAfterPrepareJTS

    Description

      I do experience that call of my implementation ResourceAdapter#endpointActivation is called twice. Which is difference against behavior before (<=7.1.0.DR8) and I think that that method should be called just once. My RAR implementation uses the method endpointActivation for opening a socket and second call then causes a ResourceException being thrown and ERROR log message appears in server log

      ERROR [org.jboss.as.server] (ServerService Thread Pool -- 66) WFLYSRV0215: Failed to resume activity org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent$1@43ab957d. To resume normal operation it is recommended that you restart the server.
      

      By my investigation it's caused by the fact that SuspendController launches resume method of ServerActivity serverActivity at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent.

      I think it's caused because method SuspendController#setStartSuspended sets state to SUSPENDED regardless of boolean parameter value.
      https://github.com/wildfly/wildfly-core/blob/master/server/src/main/java/org/jboss/as/server/suspend/SuspendController.java#L68

      I tried to do a small fix (I'm not sure if it's correct one) and that way the endpoint activation is launched just once as I expect.
      https://github.com/ochaloup/wildfly-core/commit/4d6ac5777414088c9f39605e9b049c10527e5f77

      Attachments

        Issue Links

          Activity

            People

              sdouglas1@redhat.com Stuart Douglas
              ochaloup@redhat.com Ondrej Chaloupka (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: