1 Reply Latest reply on Apr 6, 2013 3:17 PM by tcunning

    What kind of error can action in piple throw all the way to fs-message-filter to move files to error folder?

    adit

      Hello,

       

      When the process(Message) method throws an ActionProcessingException, i was expecting the JMS Listener to throw the Exception all the up so that fs- provider, to move the input file to error dir, but instead, it just names it as .sendEsb and moves it to the processed folder

       

      what do i have to implement further to make the jms and fs listeners stop listening and make ESB act dead it a critical error is thrown ?

       

      what kind of Error Class can make fs-message-filter move the files to error folder, or stop it to listen?

       

      below is my jboss-esb.xml

       

       <providers>
        <fs-provider name="FSprovider" >
         <fs-bus busid="FileChannel" > 
           <fs-message-filter
              directory="${SOURCE.DIRECTORY}"
              input-suffix=".TR"
              work-suffix=".esbWorking"
              post-delete="false"
              post-directory="${SOURCE.PROCESSED.DIRECTORY}"
              post-suffix=".sentToEsb"
              error-delete="false"
              error-directory="${SOURCE.ERROR.DIRECTORY}"
              error-suffix=".inError"
          /> 
         </fs-bus>
        </fs-provider>
        <jms-provider connection-factory="ConnectionFactory" name="ftp_GW" >
         <jms-bus busid="ftp_JMS" >
          <jms-message-filter dest-name="/queue/GW" dest-type="QUEUE" />
         </jms-bus>  
        </jms-provider> 
       </providers>
      
      <services>
        <service category="Stealt" description="blabla" name="Service" invmScope="GLOBAL">
         <property name="maxThreads" value="1" />
         <listeners >      
           <fs-listener name="FileGateway" busidref="FileChannel" 
           is-gateway="true" maxThreads="1" schedule-frequency="1" >
           </fs-listener>     
         <jms-listener busidref="ftp_JMS" name="JMSListener" 
          maxThreads="1"/> 
         </listeners>
         <actions mep="OneWay">
          <action
           class="com.actions.Action" name="Transformer"  >
           <property name="springContextXml" value="applicationcontext.xml"/>
          </action>
         </actions>
        </service>  
        </services>
      

       

      Action Implementation

       

      import org.jboss.soa.esb.actions.AbstractActionLifecycle;
      import org.jboss.soa.esb.helpers.ConfigTree;
      import org.jboss.soa.esb.message.Message;
       
      public class ProcessNThrow extends AbstractActionLifecycle {
       
       protected ConfigTree config;
       
       protected TestError(ConfigTree config) {
       this.config = config;
       }
       
       public Message process(Message message) throws ActionProcessingException{
       throw new ActionProcessingException();
       }
      }
      
      

       

       

      Have anyone an idea how to configure the esb correctly, so that the file is put into the configured error directory when an exception is thrown.

       

      Thanks.

        • 1. Re: What kind of error can action in piple throw all the way to fs-message-filter to move files to error folder?
          tcunning

          You're confusing action processing exceptions with gateway processing.      The error-delete/error-directory/error-suffix settings in the fs-listener are there in case an error occurs during the gateway processing of the files and the file can't be moved to the service as a message.      Once the gateway processes the file successfully and moves it to the service as a message, the gateway is done.

           

          If an error is thrown in the pipeline, it'll generate a fault message and you can handle that with fault-to.