Issue Details (XML | Word | Printable)

Key: JCR-1724
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: Scott
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Jackrabbit Content Repository

Jackrabbit utilities

Created: 25/Aug/08 03:05 PM   Updated: 13/Aug/09 03:13 PM
Return to search
Component/s: sandbox
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
GZip Archive Licensed for inclusion in ASF works jcrutil.tar.gz 2008-08-25 03:07 PM Scott 13 kB
File Licensed for inclusion in ASF works jcrutil.tgz 2008-09-22 03:18 AM Jason Thrasher 14 kB
Issue Links:
Reference
 

Resolution Date: 20/Feb/09 05:46 PM


 Description  « Hide
Attached are two utilities for Jackrabbit:

The first one is a DataStore implementation that uses Amazon S3 for storage.
This is fairly straightforward. It is configured by adding a DataStore
section to the repository.xml file, e.g.:
   <DataStore class="org.jcrutil.S3DataStore">
       <param name="awsAccessKey" value="" />
       <param name="awsSecretKey" value="" />
       <param name="bucketName" value="" />
       <param name="minModifiedDate" value="0" />
       <param name="minRecordLength" value="0" />
   </DataStore>

The second utility is a JCR based Commons VFS filesystem provider. This
allows you to access a JCR repository (nt:file and nt:folder nodes) using
the Commons VFS API. I've also used this with MINA FTP Server and Dctm VFS
(http://dctmvfs.sourceforge.net/) to provide FTP access to a Jackrabbit
repository.


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Scott added a comment - 25/Aug/08 03:07 PM
Attaching source.

Jason Thrasher added a comment - 22/Sep/08 03:18 AM
Scott,
Thanks for sharing this! I tried to get it running and ran into a few minor snags, so dove into it and created a updated version. This should live in the jackrabbit sandbox, but doesn't seem to be there yet. So, here's an updated version that works for the current jackrabbit 1.5-SNAPSHOT (as of today).

cheers,
Jason


Here's what changed:

M src/test/java/org/jcrutil/VfsTest.java
M src/main/java/org/jcrutil/JcrFileSystem.java
M src/main/java/org/jcrutil/JcrFileObject.java
M pom.xml

Updated VfsTest to close the filesystem when the test is in tearDown(). This allows the underlying Jackrabbit JCR to properly close the session. If this isn't done, other VFS or Jackrabbit clients may not be able to use the same repository (as in: other tests using JCR).

Added close() method to the JcrFileSystem that closes the JCR session when the FileSystem is being closed.

Updated JcrFileObject doIsReadable() and doIsWriteable() to use the updated jackrabbit-core-1.5-SNAPSHOT PrivilegeRegistry class. The PrivilegeRegistry had been refactored in the trunk, and caused the compile to fail. Also fixed a IOException constructor that wraps and rethrows any problems from close().

Added <repositories> for jets3t and apache-snapshots to the pom.xml, and changedthe commons-vfs groupId and version to 1.0, so they can be found by others.

Jukka Zitting added a comment - 24/Sep/08 10:13 AM
Committed the component and the modifications in revision 698501. Thanks!

angela added a comment - 20/Feb/09 05:46 PM
as jukka committed the code, this issue can be resolved, can't it?

Jukka Zitting added a comment - 20/Feb/09 06:22 PM
> as jukka committed the code, this issue can be resolved, can't it?

Sure, thanks! I don't know why I didn't resolve the issue already before.