implementation is great to use if you don't want to run a Jackrabbit
server, however one of the difficulties for a first-time user is having to go through the bootstrapping
process and initialising the repository. After a bit of poking around the command line utility
code that comes with Jackalope
I put together this class that detects if the repository hasn't been initialised and does the initialisation automatically for you. It also wraps the session so you're guaranteed a valid repository with an open session when you use this.
You still need to create the database yourself before using this class.
This is the SessionWrapper
...to use it do something like this...
The code for the SessionWrapper
class is quite boiler plate Jackalope
code. The repository initialisation happens on lines 33-39
. There is some error handling thrown in and that's about it. No need to mess around with manual repository initialisation!
Have comments or feedback on what I wrote? Please share them below!
Other posts you may like...