You could look also at Silverpeas code. It's using Jackrabbit with some simple code to create nodes, browse them etc. For example take a look into https://github.com/Silverpeas/Silverpeas-Core/blob/master/lib-core/src/main/java/org/silverpeas/attachment/repository/DocumentRepository.java The tests are using in memory repository but the final stuff is using a 'real' repository.
Also you might take a look at JBoss Modeshape which is another implementation of the JCR API. Some of the docs are cross implementation. There is also Crash which enables you to add a shell to your running repository.