Hi Kaspar,

just to save you some pain: in case of Jackrabbit don't use TransientRepository but RepositoryImpl instead and make it launch in the init() of you app and go down on the onDestroy() (in case you want to bundle it with your app).

Transient has some bad behaviour and currently makes problem (1.5.2) when shutting it down using the repo.shutdown() as not all resources are 100% released in case you have still some connections (e.g. over RMI).

Also make sure you safely de-register any exports first, then shutdown the repo using repo.shutdown() to prevent any locks. Also don't share Session over longer runs or threads as Session is not thread-safe.

To "see" whats in your jackrabbit repo its best to connect via RMI, so you only depend on your real config, not any fancy (especially this also saves you from pain by having tools depending on different JR version than you are on!). A good way to dig in is using the JCRBRowser (either eclipse plugin or standalone) from http://sourceforge.net/projects/jcrbrowser .

Also a good tool pool is under: http://dev.day.com/microsling/content/blogs/main/jcrtools.html - a JCR Tools roundup, bit older (2007) but still worth looking at; Under http://wiki.apache.org/jackrabbit/FrontPage you'll also find good info (the Jackrabbit page itself and its doc can be best described as "useless nightmare").

Also a side-start-point might be the DAY CRX Developer edition from http://www.day.com/content/day/en/products/crx/download/registration.html as this is practically a jackrabbit + tools thing. Its good to start and understand the idea and behaviour behind JCR, even the prices are "Enterprise only" you are free to use them for developement purposes only.

Hope this one helps you get started.

Best,

Korbinian

PS: you also might want to have a look at Brix-CMS http://code.google.com/p/brix-cms/ and checkout the latest src to see how they implemented and used it (latest is on JR 1.5.2 IMHO)!

Kaspar Fischer schrieb:
Thank you all very much for your advice. I will take a look at JackRabitt and Alfresco.

Kaspar

On 16.02.2009, at 01:45, Fabrizio Giudici wrote:

Kaspar Fischer wrote:
User's of my application will upload, edit, and delete files. For this, I'd like to have a simple "file repository" with the following features:

- Files are stored on the file system.
- Files are distributed over several folders (to avoid a single folder with 10,000 files, say).
- Support for transactions

Does anybody know of a simple Java library that satisfies these requirements?

For example: a Hibernate database with a relation "Files" holding tuples (DocId, FilePath), and a service with:

- id store(stream): creates from the stream a new file on the file system and inserts a new tuple into the relation, returns id - stream edit(id): returns a stream to a temporary copy of the file with the given id; updates the corresponding tuple to point to the temp file
- void remove(id): removes the corresponding tuple form the relation

... and a background job which deletes dangling files.
I suggest you something implemented on the top of JackRabbit (Java Content Repository). You might have a look at Brix, which is a CMS based on Wicket and JackRabbit.

--
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
weblogs.java.net/blog/fabriziogiudici - www.tidalwave.it/blog
fabrizio.giud...@tidalwave.it - mobile: +39 348.150.6941


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to