If you read the documentation you will see RMI is not the recommended mode of access. Foo whole EJB saga had so much stories about RMI horrors or whatever.
Best is to use Jackrabbit in embeded mode and expose Remoting layer like Rest, etc.
We're running a multi-threaded application which creates/updates nodes in jackrabbit. Here's an outline of the deployment model:-
- The jackrabbit web app is deployed to the same tomcat instance as our main app.
- The jackrabbit repository is accessed from our app using RMI.
- We use Threadlocal to confine/isolate the jackrabbit Session.
- We use jackrabbit node locking to enable concurrency of writes to jackrabbit nodes. We have a multiple level node hierarchy where nodes are added concurrently.
- We use the embedded Derby database for database persistence.
We're getting a bit of a bottleneck when performing the writes, mainly due to the amount of node locking we're having to do. I can't see a way around this, so the only measures I can see to improve the performance is speed up the writes.
We've tested using postgres for the database persistence, so hopefully we should get some performance gains there. Is there anything else that can help improve the write performance? E.g. moving back to using the standalone server, rather than co-hosting jackrabbit in the same tomcat container as the app?