[ https://issues.apache.org/jira/browse/JCR-3825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14176705#comment-14176705 ]
Marcel Reutegger commented on JCR-3825: --------------------------------------- Updated examples in trunk: http://svn.apache.org/r1633070 The examples now use JcrUtils.getRepository() from jackrabbit-commons. Internally, this utility method used the RepositoryFactory mechanism to get a repository instance. I also updated dependencies to the most recent Jackrabbit release and added a commented out dependency to Oak 1.1.0. Login is also slightly different now. The first hop was using the login method without credentials, which actually means the subject is supposed to be authenticated already and the login must happen within the security context of the authenticated subject. The example did not do any of this. Now it simply creates a GuestCredentials. I also fixed second and third hop. Authentication failed because the default setup does not allow arbitrary userIds anymore. The examples now use the admin user when they want to write to the repository. > Use RepositoryFactory for first hops > ------------------------------------ > > Key: JCR-3825 > URL: https://issues.apache.org/jira/browse/JCR-3825 > Project: Jackrabbit Content Repository > Issue Type: Improvement > Components: docs > Reporter: Marcel Reutegger > Assignee: Marcel Reutegger > Priority: Minor > > The first hops examples currently use a TransientRepository to create a > repository instance. This introduces a dependency to the Jackrabbit > implementation. I'd like to change the examples to use a RepositoryFactory. > This way, the examples will also work with other implementations like Oak by > simply changing the maven dependency. -- This message was sent by Atlassian JIRA (v6.3.4#6332)