2 Replies Latest reply on May 2, 2007 1:26 PM by ldimaggio

    Strange behavior in caused by definition of static router

    ldimaggio

      'm seeing this problem with 4.2.MR1 - in creating a static router, I'm the behavior of other services affected by the presence of the static router.

      This is a bug or a user error. I can't see anything out of place - can anyone comment before I open a JIRA?

      Briefly, the operation of the category="wiretapCategory" name="wiretapService" service is broken if the static router that follows it is uncommented. The service is unable to locate the queues it references.

      Many thanks!

      jboss-esb.xml follows

      
      <?xml version = "1.0" encoding = "UTF-8"?>
      <jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
      
       <providers>
       <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
      
       <jms-bus busid="quickstartGwChannel">
       <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_helloworld_Request" />
       </jms-bus>
      
       <jms-bus busid="quickstartEsbChannel">
       <jms-message-filter dest-type="QUEUE" dest-name="queue/B" />
       </jms-bus>
      
       <jms-bus busid="quickstartWireTapChannel">
       <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_wiretapEsb_Request" />
       </jms-bus>
      
       <jms-bus busid="wiretapGwChannel">
       <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_wiretap_GWRequest" />
       </jms-bus>
      
       <jms-bus busid="wiretapOutChannel">
       <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_wiretap_OutRequest" />
       </jms-bus>
      
       <jms-bus busid="testChannel">
       <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_test_Request" />
       </jms-bus>
      
       </jms-provider>
       </providers>
      
       <services>
      
       <service category="regularCategory" name="regularService" description="From Hello World">
       <listeners>
       <jms-listener name="JMS-Gateway" busidref="quickstartGwChannel" maxThreads="1" is-gateway="true" />
       <jms-listener name="helloWorld" busidref="quickstartEsbChannel" maxThreads="1" />
       </listeners>
       <actions>
       <action name="action1" class="quickstart.helloworld.MyJMSListenerAction" process="displayMessage" />
       </actions>
       </service>
      
      <!-- Service to perform the actions of a wiretap -->
       <service category="wiretapCategory" name="wiretapService" description="Static Wiretap">
       <listeners>
       <jms-listener name="JMS-wiretapGateway" busidref="wiretapGwChannel" maxThreads="1" is-gateway="true" />
       <jms-listener name="wiretapESB" busidref="quickstartWireTapChannel" maxThreads="1" />
       </listeners>
       <actions>
       <action name="action1" class="quickstart.helloworld.MyJMSWiretapListenerAction" process="displayMessageReceived" />
       <action name="action2" class="quickstart.helloworld.MyJMSWiretapListenerAction" process="insertMessageToDestination" />
       <action name="action3" class="quickstart.helloworld.MyJMSWiretapListenerAction" process="insertMessageToWireTapOutput" />
       <action name="action4" class="quickstart.helloworld.MyJMSWiretapListenerAction" process="displayMessageWiretapOutput" />
       </actions>
       </service>
      
      <!-- Service using a static router - note that uncommenting this service
       affects the operation of the above wiretap service - why? -->
      <!-- <service category="StaticRouterCategory" name="WiretapStaticListener" description="Static Router">
       <listeners>
       <jms-listener name="test-Gateway" busidref="testChannel" maxThreads="1" is-gateway="true" />
       <jms-listener name="helloWorld" busidref="quickstartEsbChannel" maxThreads="1" />
       </listeners>
       <actions>
       <action name="routeAction" class="org.jboss.soa.esb.actions.StaticRouter">
       <property name="destinations">
       <route-to service-category="wiretapCategory" service-name="wiretapService" />
       <route-to service-category="regularCategory" service-name="regularService" />
       </property>
       </action>
       </actions>
       </service>
      -->
       </services>
      
      </jbossesb>
      
      





        • 1. Re: Strange behavior in caused by definition of static route
          kurtstam

          Did you create an endless loop?

          --Kurt

          • 2. Re: Strange behavior in caused by definition of static route
            ldimaggio

            YES - that was part of the problem - the other part was that I was not aware of having to define a native/backend listener in each service that makes use of a gateway listener.

            Thanks - all set now...

            
            [ldimaggi@ldimaggi helloworld]$ cat 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.0.1.xsd" parameterReloadSecs="5">
            
             <providers>
             <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
            
             <jms-bus busid="quickstartGwChannel">
             <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_helloworld_Request" />
             </jms-bus>
            
             <jms-bus busid="quickstartEsbChannel">
             <jms-message-filter dest-type="QUEUE" dest-name="queue/B" />
             </jms-bus>
            
             <jms-bus busid="ignoreChannel1">
             <jms-message-filter dest-type="QUEUE" dest-name="queue/C" />
             </jms-bus>
            
             <jms-bus busid="ignoreChannel2">
             <jms-message-filter dest-type="QUEUE" dest-name="queue/D" />
             </jms-bus>
            
             <jms-bus busid="quickstartWireTapChannel">
             <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_wiretapEsb_Request" />
             </jms-bus>
            
             <jms-bus busid="wiretapGwChannel">
             <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_wiretap_GWRequest" />
             </jms-bus>
            
             <jms-bus busid="wiretapOutChannel">
             <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_wiretap_OutRequest" />
             </jms-bus>
            
             <jms-bus busid="testChannel">
             <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_test_Request" />
             </jms-bus>
            
             </jms-provider>
             </providers>
            
             <services>
            
             <service category="staticCategory1" name="regularService" description="From Hello World">
             <listeners>
             <jms-listener name="JMS-Gateway" busidref="quickstartGwChannel" maxThreads="1" is-gateway="true" />
             <jms-listener name="helloWorld" busidref="quickstartEsbChannel" maxThreads="1" />
             </listeners>
             <actions>
             <action name="action1" class="quickstart.helloworld.MyJMSListenerAction" process="displayMessage" />
             </actions>
             </service>
            
             <service category="staticCategory2" name="wiretapService" description="Static Wiretap">
             <listeners>
             <jms-listener name="wiretapJMS-Gateway" busidref="wiretapGwChannel" maxThreads="1" is-gateway="true" />
             <jms-listener name="ignore1" busidref="ignoreChannel1" maxThreads="1" />
             </listeners>
             <actions>
             <action name="action1_wire" class="quickstart.helloworld.MyJMSWiretapListenerAction" process="displayMessageReceived" />
             <action name="action2_wire" class="quickstart.helloworld.MyJMSWiretapListenerAction" process="insertMessageToWireTapOutput" />
             <action name="action3_wire" class="quickstart.helloworld.MyJMSWiretapListenerAction" process="displayMessageWiretapOutput" />
             </actions>
             </service>
            
             <service category="staticCategory3" name="WiretapStaticListener" description="Static Router">
             <listeners>
             <jms-listener name="test-Gateway" busidref="testChannel" maxThreads="1" is-gateway="true" />
             <jms-listener name="ignore2" busidref="ignoreChannel2" maxThreads="1" />
             </listeners>
             <actions>
             <action name="routeAction" class="org.jboss.soa.esb.actions.StaticRouter">
             <property name="destinations">
             <route-to service-category="staticCategory2" service-name="wiretapService" />
             <route-to service-category="staticCategory1" service-name="regularService" />
             </property>
             </action>
             </actions>
             </service>
            
             </services>
            
            </jbossesb>