4 Replies Latest reply on Jun 23, 2008 3:07 PM by Scott Ryan

    Need to handle directory recursion on the FileGatewayListene

    Scott Ryan Newbie

      I have a need to implement directory recursion on the FileGatewayListner. For Example I would like to have a hierarchical structure to my directories and have the file reader pick up all files in all directories and place them into a JMS queue. Then I can process them based on the full file path. This keeps me from having to define an individual directory location for each one and makes the system more dynamic. Most of the other ESB's I have checked provide a flag for this capability but I was not able to find one in the JBoss ESB.

      1. Is this capability available today in the FileGatewayListener?
      2. I extended the current FileGatewayListener to provide this capability but cannot figure out how to get the ESB to use my class rather than the JBoss supplied one? Is there a file that matches the jboss-esb.xml parameters with their corresponding class files like other ESB implementations?

      For Example how do i get the FileGatewayListener defined below to use my class rather than the default from JBoss?

      <?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>
       <fs-provider name="FSproviderOpens">
       <fs-bus busid="TrackingFileChannel">
       <fs-message-filter directory="${TRACKING_INPUT_DIRECTORY}" input-suffix=".done"
       work-suffix=".esbWorking" post-delete="false"
       post-directory="${TRACKING_OUTPUT_DIRECTORY}" post-suffix=".sentToEsb"
       error-delete="false" error-directory="${TRACKING_ERROR_DIRECTORY}"
       error-suffix=".IN_ERROR" />
       </fs-bus>
       </fs-provider>
       <jms-provider name="JBossMessaging" connection-factory="ConnectionFactory">
       <jms-bus busid="TrackingEsbChannel">
       <jms-message-filter dest-type="QUEUE" dest-name="queue/EDS_TRACKING_QUEUE"
       selector="type='fromTrackingFileAction'" />
       </jms-bus>
       </jms-provider>
       </providers>
       <services>
       <service category="trackingCategory" name="trackingFileListener"
       description="Tracking File Action (esb listener)">
       <listeners>
       <fs-listener name="FileGateway" busidref="TrackingFileChannel" maxThreads="1"
       is-gateway="true" schedule-frequency="10" />
       <jms-listener name="TrackingFileAction" busidref="TrackingEsbChannel" maxThreads="1" />
       </listeners>
       <actions mep="OneWay">
       <action name="detailAction"
       class="com.demo.trackreporting.processor.MessageProcessor"
       process="processMessage" />
       <!--
       <action name="dump" class="org.jboss.soa.esb.actions.SystemPrintln">
       <property name="printfull" value="true" />
       -->
       </actions>
       </service>
       </services>
      </jbossesb>