3 Replies Latest reply on Nov 22, 2013 12:53 PM by rhauch

    Use of sequencers in combination with external file system source

    lhelander

      Is it possible in modeshape to trigger sequencer processing on nodes in the repository that "comes from" an external source (I am using a file system external store)?

      My setup is modeshape 3.6 and JBoss EAP 6.1.

       

      Is it possible to create a configuration that automatically triggers sequencer processing of the nodes created from the external source?

      If this needs to be done manually (by my application), any hints on how this could/should be done?

       

      /Lars

        • 1. Re: Use of sequencers in combination with external file system source
          rhauch

          Yes, connectors can generate events that are then handled as any other events. See MODE-1710 for details. Basically, the connector would need to call "createChangeSet()" and then use the ConnectorChangeSet interface to record the various changes and publish the set.

           

          Our file system connector does not currently do this because we're still support JDK 6, which doesn't have a way to monitor the file system for changes. If you are using JDK 7, you could extend our FileSystemConnector (or LargeFileSystemConnector if you need that behavior) class, register a FS listener that then creates and populates ConnectorChangeSet instances as required.

           

          In 4.0 we will be switching to JDK 7 as the minimum JDK version, so we will be adding built-in support for events into the FileSystemConnector and LargeFileSystemConnector classes.

          • 2. Re: Use of sequencers in combination with external file system source
            lhelander

            Randall, thank you very much for the feedback, this sounds great. I am using jdk 7 so that is not a problem. If I understand this correctly, publishing the change set will result in that any sequencers that are configured to act upon the changed nodes will be triggered and I do not explicitly have to call the sequencers from my code?

            • 3. Re: Use of sequencers in combination with external file system source
              rhauch

              If I understand this correctly, publishing the change set will result in that any sequencers that are configured to act upon the changed nodes will be triggered and I do not explicitly have to call the sequencers from my code?

               

              Yes. And the same events will be visible to JCR Observation listeners.