You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by sidhama <si...@wipro.com> on 2009/07/08 10:13:33 UTC

How to delete from fileDataStore in jackrabbit.

Hi, 

Our folder repository structure is 
---
MediaGroupNode/mediaAssetNode/FileNode(*.mp3 etc) -- Clicking on this one it
will open the file.

for uploading the file logic is 
-------------------------------------
mediaAssetNode = mediaAssetNode.addNode(fileNode, "nt:file");
mediaAssetNode = mediaAssetNode.addNode("jcr:content", "nt:resource");
InputStream is = mediaAsset.getUploadItem().getInputStream();
mediaAssetNode.setProperty("jcr:data", is);
is.close();
session.save();
---------------------------------
 
For Deleting the flow is 
Get the MediaAssetNode --> Get the <jcr:content> node and <fileNode> from
assetNode and try to remove these two and save the session, then remove the
AssetNode.
But file is not being deleted as per the expectation from the local disk,
Which have been uploaded by the Datastore logic implemented in the
repository.xml,but the jackrabbit rmi UI is displaying the node is being
deleted.
------------------------------------------------------------------------------------------------------
<DataStore class="org.apache.jackrabbit.core.data.FileDataStore">
        
        
    </DataStore>
-----------------------------------------------------------------------------------

Please let me know the resolution.

Thanks
Sidharth
-- 
View this message in context: http://www.nabble.com/How-to-delete-from-fileDataStore-in-jackrabbit.-tp24387295p24387295.html
Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.


Re: How to delete from fileDataStore in jackrabbit.

Posted by Thomas Müller <th...@day.com>.
Hi,

Garbage collection is used to purge unused objects in the data store.
See also http://wiki.apache.org/jackrabbit/DataStore

Regards,
Thomas

By the way, please use the 'user' mailing list for questions that are
not related to the development of Jackrabbit.