jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kisu San <Kishore....@gmail.com>
Subject Changing CacheManager settings - Example in wiki is not working
Date Wed, 19 Dec 2007 10:47:18 GMT

I have a problem with Jackrabbit Cache.  I am trying to create around 10K
nodes of type "nt:file". Each of these nodes are attached with a binary file
of around 10 KB each.  I am getting out of memory errors.
Below is the code

        InputStream fileInputStream = new FileInputStream(f);
        Node fileNode = currentNode.addNode(f.getName(), "nt:file");
        Node fileNodeContent = fileNode.addNode("jcr:content",
        fileNodeContent.setProperty("jcr:mimeType", "text");

I have the following questions

1)How does cache mechanism work in Jackrabbit for inserts work. I try to
change the cache manager setting using example given at 

It is not working because,  2nd line in this code attempt cast parent to
child.  Because TransientRepository is child of Repository.

repository = new TransientRepository();
"CacheManager manager = ((RepositoryImpl) repository).getCacheManager();"

Anyone have any idea how to make this work or change the cacheManager

2) I am calling Jackrabbit from tomcat.  I am thinking of increasing tomcat
jvm memory setting to increase the heap size. Is it a good idea to do that. 

3) I am using one session for many of these operations. Would there be one
cache created per session?
if I have to evit the cache how can I do it? May be I evit or clean the
cache once I complete one set of operations or before going for another set
of operations.

4) Most importantly in a transient repository for creating of nodes does
cache be used? Instead of clearing cache can I clear the transient
repository? I don't know if this is possible.

Help pls?

View this message in context: http://www.nabble.com/Changing-CacheManager-settings---Example-in-wiki-is-not-working-tp14414844p14414844.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

View raw message