5 Replies Latest reply on Jun 4, 2008 11:59 AM by beve

    ReadOnlyRemoteFileSystemStrategy issues

    mathieu.fortin

      Hi, i have 2 issues regarding an ftp listener configured with read-only=true.

      1) Since only the filename is stored in the cache, new files on ftp gateway overwriting existing ones but with the same file name wont trigger the listener. The file timestamp on the ftp server should be used when querying the cache. But this requires quite a few changes (from RemoteFileSystem.getFileListFromRemoteDir which returns an array of String to the ftp client which should use listFiles instead of listNames)

      2) We should be able to configure the ftp listeners to use a global cache. right now, a new TreeCache is instanciated for every listener. Maybe an option would be to have a JndiReadOnlyRemoteFileSystemStrategy class which would use a jndi name property defined at the listener level. This would require changes in the ReadOnlyRemotegatewayListener which expects a config file attribute. Maybe the whole config tree could be sent to the strategy implementation in the init method so that the strategy uses what it needs.

      What do you think?

      Thanks.