0 Replies Latest reply on Feb 15, 2013 10:53 AM by Ivan Vasyliev

    Mounting repositories into federation

    Ivan Vasyliev Newbie

      The current approach on how external repositories plugged into modeshape assumes that there will be no everlapping between existing content and federation entry point.

      Lets say I have following setup:

      • Existing content in repository: /fs/node1/node2
      • Some folder on filesystem e.g.: /tmp/somefolder
      • Federation configuration:


          "externalSources" : {

              "file-source" : {

               "classname" : "org.modeshape.connector.filesystem.FileSystemConnector",

                  "directoryPath" : "/tmp",

                  "extraPropertiesStorage" : "json",

                  "projections" : [

                       "default:/fs => /",







      Then, I will not see /fs/somefolder, but will get /fs/node1/node2 as an result. This must generate warnings I assume, but if you take a look on how unix filesystem handles mounting external devieces, they went another waym which is makes sence:




      This tells the kernel to attach the file system found on device (which is of type type) at the directory dir. The previous contents (if any) and owner and mode of dir

      become invisible, and as long as this file system remains mounted, the pathname dir refers to the root of the file system ondevice.




      So the idea is when FederationManager.createProjection("/","sourcename","/tmp", "fs") invoked the "fs" node must overlay existing content. FederationManager.removeProjection invoked - overlay must be removed.


      If this deserves feature request, let me know.