2 Replies Latest reply on Oct 1, 2010 5:41 AM by seb fou

    JCA + ContentBasedRouter + Exception

    seb fou Newbie

      Hello,

       

      I use jms-jca-provider with activation-config on a jms queue to redeliver message on rollback. like in jms_transacted quickstart.

       

      <providers>
              <jms-jca-provider name="JBM" connection-factory="XAConnectionFactory">
                  <jms-bus busid="GwChannel">
                      <jms-message-filter
                          dest-type="QUEUE"
                          dest-name="queue/Request_gw"
                          transacted="true"
                           />
                  </jms-bus>
                     ...
                  <activation-config>
                      <property name="dLQMaxResent" value="3"/>
                  </activation-config>
              </jms-jca-provider>

          </providers>

       

      It works when i through an exception directly in service which listen on this queue

       

           <service
                  category="Business_Services"
                  name="myService"
                  >
                  <listeners>
                      <jms-listener name="JMS-Gateway" busidref="GwChannel" is-gateway="true" />
                      <jms-listener name="JMS-ESBListener" busidref="EsbChannel" />
                  </listeners>
                  <actions mep="OneWay">
                     
                      <action name="MyExceptionAction"
                          class="com.XXX.ThroughExceptionAction"
                          process="throwException">
                      </action>

                </actions>

           <service>

       

      But if i through an exception after an ContentBasedRouter that route to myService, it does'nt work

       

      Have you an idea to combinate JCA configuration and ContentBasedRouter Service ?

       

      Thanks

        • 1. Re: JCA + ContentBasedRouter + Exception
          Kevin Conner Master

          Sorry, what are you expecting and what is not working??

           

          Kev

          • 2. Re: JCA + ContentBasedRouter + Exception
            seb fou Newbie

            The redevilery mechanism doesn't work after content based routing.

             

            Here an example

             

            <providers>

                    <jms-jca-provider name="JBM" connection-factory="XAConnectionFactory">

                        <jms-bus busid="GwChannel">

                            <jms-message-filter

                                dest-type="QUEUE"

                                dest-name="queue/Request_gw"

                                transacted="true"

                                 />

                        </jms-bus>

                        <jms-bus busid="EsbChannel">

                            <jms-message-filter

                                dest-type="QUEUE"

                                dest-name="queue/Request_esb"

                                transacted="true"

                                 />

                        </jms-bus>

                        </jms-bus>

                        <activation-config>

                            <!-- The maximum number of times a message is redelivered before it is sent to the DLQ -->

                            <property name="DLQMaxResent" value="3"/>

                            <property name="reconnectInterval" value="900"/>

                        </activation-config>

                    </jms-jca-provider>

                </providers>



            ...


                 <service category="Proxy_Services" name="myServiceESB" >

                        <listeners>

                            <jms-listener name="JMS-Gateway" busidref="GwChannel" is-gateway="true" />

                            <jms-listener name="JMS-ESBListener" busidref="EsbChannel" />

                        </listeners>

                        <actions mep="OneWay">

                                 <action name="MyExceptionAction"

                                class="com.XXX.ThroughExceptionAction"

                                process="throwException">

                            </action>

                           </action>

                        </actions>

                    </service>

             

             

            The message is well redelivered 3 times. it uses JCA Action configs

            But if i use CBR before throughing an IllegalStateException in my service like this

             


                 <service category="Proxy_Services" name="CBRServiceESB" >


                        <listeners>

                            <jms-listener name="JMS-Gateway" busidref="GwChannel" is-gateway="true" />

                            <jms-listener name="JMS-ESBListener" busidref="EsbChannel" />

                        </listeners>


                        <actions mep="OneWay"> 

                            <action class="org.jboss.soa.esb.actions.ContentBasedRouter" name="ContentBasedRouter"

                                <property name="ruleSet" value="rules/FilterRules.drl"/>

                                <property name="ruleReload" value="true"/>

                                <property name="destinations">

                                    <route-to destination-name="myServiceESB" service-category="Proxy_Services" service-name="myServiceESB" />

                               <property name="object-paths">

                                       <object-path esb="body.'org.jboss.soa.esb.message.defaultEntry'" />

                               </property>

                           </action>

                        </actions>

                   </service>

             

                 <service category="Proxy_Services" name="myServiceESB" invmScope="GLOBAL">

                        <actions mep="OneWay">

                                  <action name="MyExceptionAction"

                                 class="com.XXX.ThroughExceptionAction"

                                 process="throwException">

                             </action>

                            </action>

                         </actions>

                     </service>

             

             

            The message is not redelivered 3 times.

             

             

            Do you know why ?