commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rai Singh - PA" <Rai_Si...@GMACM.COM>
Subject RE: [VFS] Some basic questions
Date Mon, 20 Feb 2006 21:51:29 GMT
Nevermind. I can use FileSystemManager's
resolveFile(java.lang.String name, FileSystemOptions fileSystemOptions)

and pass the appropriate URI when needed.


-----Original Message-----
From: Rai Singh - PA [mailto:Rai_Singh@GMACM.COM] 
Sent: Monday, February 20, 2006 3:41 PM
Subject: [VFS] Some basic questions

I am trying to understand the correct usage of VFS such that I can
connect to different servers via SFTP and return a single view across
all servers. 

For instance, given that a directory (/home/foo/bar) exists on several
servers (distinctly different machines) I want to perform the following
against this directory:

1)       search and retrieve attributes on several jar files across
select servers

2)       overwrite and delete jar files across select servers.


Following an example posted on the Commons Wiki, I am able to see how I
might do this for a single filesystem:

                                defFileSysMgr = new

                                try {

defFileSysMgr.addProvider("file", new DefaultLocalFileProvider());

defFileSysMgr.addProvider("zip", new ZipFileProvider());

defFileSysMgr.addProvider("jar", new JarFileProvider());



                                                // Create the virtual
file system

                                                VirtualFileSystem vfs =


                                                searchableVfs = new


                                } catch (FileSystemException e) {

                                                throw new
SearchException("Unable to initialize the FileSystemManager.", e);



Where SearchableVirtualFileSystem simply adds filter and search
capabilities. Is this usage recommended?

 Is there a way to: 

"connect to servers A, B, C, and D via SFTP, retrieve file information
across all servers at one time and return FileObject instances for files
in each SFTP session"?



The reason for wanting to do this is so that I might be able to manage
jar files that are deployed across several servers (not a cluster) in a
given environment (development, staging, production).


I would appreciate your help.





To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message