java - Using JTA does not roll back data in datastore in Jackrabbit -


when exception thrown data added datastore not rolled back. correct behaviour since uses filesystem? or should roll data in datastore. using spring 3.2. have deployed jackrabbit jboss 7.1.1. using jtatransactionmanager since using database. edit:

after reading jta , spring added line spring config file. seems registers necessary things. in "test" have set store file in jackrabbit, throw runtimeexception (and after persisted database since exception aborts it never run far, normal case). happens inside 1 method in service layer annotated @transactional. after exception thrown still see file in datastore, tried empty datastore , expect file gone after exception thrown, still there. correct? meta data (which don't know stored) rolled back?

<tx:jta-transaction-manager/> 

when files added datastore

binaries stored in datastore early, after setting binary property node (even if node not saved, , change still in called "transient space"). means file added datastore before transaction committed.

files in datastore stay there until garbage collection run. means, if transaction rolled back, files kept.

to rid of unreferenced files, need run datastore garbage collection.

how run garbage collection

as documented in jackrabbit wiki page datastore, "garbage collection used purge unused objects". management task need add application. general rule, recommended run garbage collection in evening or @ weekend, when system not busy.

garbage collection traverse repository , mark files still in use, , @ end remove files not marked (mark & sweep).


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -