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"?>
       <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" />
       <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'" />
       <service category="trackingCategory" name="trackingFileListener"
       description="Tracking File Action (esb listener)">
       <fs-listener name="FileGateway" busidref="TrackingFileChannel" maxThreads="1"
       is-gateway="true" schedule-frequency="10" />
       <jms-listener name="TrackingFileAction" busidref="TrackingEsbChannel" maxThreads="1" />
       <actions mep="OneWay">
       <action name="detailAction"
       process="processMessage" />
       <action name="dump" class="org.jboss.soa.esb.actions.SystemPrintln">
       <property name="printfull" value="true" />