Uploaded image for project: 'JBoss Enterprise SOA Platform'
  1. JBoss Enterprise SOA Platform
  2. SOA-3427

Http Gateway coupled with ServiceInvoker = prompt response, but error messages in logs

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Migrated to another ITS
    • 5.0.2
    • None
    • JBossESB
    • None
    • Hide

      Configure an ESB project with the jboss-esb.xml and custom Action code shown above. Run the code (via Http gateway) from a browser. Note the quick response to the browser, but see the delayed error messages in the log.

      Show
      Configure an ESB project with the jboss-esb.xml and custom Action code shown above. Run the code (via Http gateway) from a browser. Note the quick response to the browser, but see the delayed error messages in the log.
    • Workaround Exists
    • Hide

      Two workarounds are known:

      1)

      • Change the first service (the one that is called through the http-gateway) to mep=OneWay to prevent the pipeline from replying immediately.
      • Change the call to use "invoker.deliverAsync(message)" instead of DeliverSync().

      2) Change Svc1's invocation:

      ConfigTree config = new ConfigTree("");
      config.setAttribute("service-category", "FirstServiceESB");
      config.setAttribute("service-name", "SimpleListener2");
      config.setAttribute("serviceInvokerTimeout", "20000");
      config.setAttribute("failOnException", "true");
      config.setAttribute("suspendTransaction", "false");
      org.jboss.soa.esb.actions.SyncServiceInvoker invoker = new org.jboss.soa.esb.actions.SyncServiceInvoker(config);
      Message message = invoker.process(message);

      Show
      Two workarounds are known: 1) Change the first service (the one that is called through the http-gateway) to mep=OneWay to prevent the pipeline from replying immediately. Change the call to use "invoker.deliverAsync(message)" instead of DeliverSync(). 2) Change Svc1's invocation: ConfigTree config = new ConfigTree(""); config.setAttribute("service-category", "FirstServiceESB"); config.setAttribute("service-name", "SimpleListener2"); config.setAttribute("serviceInvokerTimeout", "20000"); config.setAttribute("failOnException", "true"); config.setAttribute("suspendTransaction", "false"); org.jboss.soa.esb.actions.SyncServiceInvoker invoker = new org.jboss.soa.esb.actions.SyncServiceInvoker(config); Message message = invoker.process(message);

    Description

      http-gateway -> Svc1.ServiceInvoker.sync() -> Svc2

      Http Gateway invokes Svc1, which uses ServiceInvoker.DeliverSync() to call Svc2.
      Svc2 returns the proper response to the calling client (a
      browser) immediately. But the log shows a timeout happening in between
      the end of Svc 2 and the return to Svc 1!

      15:52:33,488 INFO [STDOUT] Before call:
      15:52:33,489 INFO [STDOUT] [].
      15:52:33,491 INFO [STDOUT] Calling SimpleListener2
      15:52:33,501 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
      15:52:33,501 INFO [STDOUT] In SimpleListener2
      15:52:33,509 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
      15:52:53,498 INFO [ServiceInvoker] Unresponsive EPR: InVMEpr [
      PortReference < <wsa:Address
      invm://46697273745365727669636545534224242424242424242424242453696d706c654c697374656e657232/false?false#10000/>,
      <wsa:ReferenceProperties jbossesb:passByValue : false/> > ] for message:
      header: [ To: InVMEpr [ PortReference < <wsa:Address
      invm://46697273745365727669636545534224242424242424242424242453696d706c654c697374656e657231/false?false#10000/>,
      <wsa:ReferenceProperties jbossesb:passByValue : false/> > ] ReplyTo:
      InVMEpr [ PortReference < <wsa:Address invm://thread-130-0/>,
      <wsa:ReferenceProperties jbossesb:passByValue : false/>,
      <wsa:ReferenceProperties jbossesb:temporaryEPR : true/> > ] MessageID:
      425416c5-4c48-4986-bda3-e107e0e36c51 ]
      15:52:53,508 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
      15:52:53,508 INFO [STDOUT] In SimpleListener2
      15:52:53,508 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
      15:52:53,509 INFO [STDOUT] Called SimpleListener2
      15:52:53,522 INFO [STDOUT] After call:
      15:52:53,522 INFO [STDOUT] [okay!].

      Based on this code:
      public Message firstProcess(Message message) throws Exception

      { System.out.println("Calling SimpleListener2"); ServiceInvoker invoker = new ServiceInvoker("FirstServiceESB", "SimpleListener2"); message = invoker.deliverSync(message, 20000); System.out.println("Called SimpleListener2"); return message; }

      public Message secondProcess(Message message) throws Exception{

      System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
      System.out.println("In SimpleListener2");

      HttpResponse httpResponse = new HttpResponse(200);
      httpResponse.setContentType("text/plain");
      message.getBody().add("okay");
      httpResponse.setResponse(message);

      System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
      return message;
      }

      The jboss-esb.xml:
      <?xml version = "1.0" encoding = "UTF-8"?>
      <jbossesb
      xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd"
      parameterReloadSecs="5">

      <!-- http://localhost:8080/Quickstart_helloworld/http/test?contract -->
      <!-- http://localhost:9888/ -->

      <services>
      <service
      category="FirstServiceESB"
      name="SimpleListener1"
      description="Hello World"
      invmScope="GLOBAL">
      <property name="maxThreads" value="50" />
      <listeners>
      <http-gateway name="Test-GwListener" urlPattern="/test/*" />

      </listeners>

      <actions mep="RequestResponse">
      <!--
      -->
      <action name="print-before"
      class="org.jboss.soa.esb.actions.SystemPrintln">
      <property name="message"
      value="Before call"/>
      </action>

      <action name="action1"
      class="org.jboss.soa.esb.samples.quickstart.helloworld.MyJMSListenerAction"
      process="firstProcess"
      />

      <action name="print-after" class="org.jboss.soa.esb.actions.SystemPrintln">
      <property name="message"
      value="After call"/>
      </action>

      </actions>
      </service>

      <service
      category="FirstServiceESB"
      name="SimpleListener2"
      description="Hello World 2"
      invmScope="GLOBAL">
      <property name="maxThreads" value="50" />
      <actions mep="RequestResponse">
      <action name="action1"
      class="org.jboss.soa.esb.samples.quickstart.helloworld.MyJMSListenerAction"
      process="secondProcess"
      />
      </actions>
      </service>

      </services>

      </jbossesb>

      Attachments

        Activity

          People

            Unassigned Unassigned
            rhn-support-rick Rick Wagner
            Archiver:
            ranumula@redhat.com Raju Anumula

            Dates

              Created:
              Updated:
              Resolved:
              Archived: