Hi, in JCR you have a Repository, of which you have a single instance running and which is an interface you can get either if you created the repository yourself (using TransientRepository) or if you acquire it via JNDI or RMI. To work with the API, you always need a Session (can be loosely compared to a JDBC connection). You retrieve a session by logging in to the repository (Repository.login), specifying some credentials and the workspace you want to use (typcially null for the default workspace).
Some of the jackrabbit webapp servlets log in to the repository themselves to get a Session and do something with it. But each application should acquire its own session. If you implement webapplications, it is recommended to map a single request to one session. Getting a session has almost no overhead (<1-2 ms typically). How the login authentication work is defined by the LoginModule configured in the repository.xml of Jackrabbit (note that this is Jackrabbit-specific). The standard SimpleLoginModule you mentioned accepts anyone (more complete authentication and authorization implemenations are currently being implemented as part of the JCR 2.0, see recent threads on this and ther [EMAIL PROTECTED] mailing lists for more information). Have a look at the javadocs [1] or the jcr spec [2], for example section 4.1 "API Basics". Regards, Alex [1] http://day.com/maven/jsr170/javadocs/jcr-1.0/ [2] http://jcp.org/en/jsr/detail?id=170 On Fri, Oct 3, 2008 at 6:12 PM, pkrishna <[EMAIL PROTECTED]> wrote: > > I am new to JackRabbit and trying to findout about authenticaton in Web > application. Some examples I have looked at the code specifically logs into > the repository. In other cases, for example, the web application that is > wrapped in JackRabbit source code, I don't see any specific login taking > place. On the other hand, I see SimpleLoginModule being configured in the > repository.xml. > > > Does this imply the login takes place automatically and we can access the > repository once lookup is completed? > -- > View this message in context: > http://www.nabble.com/Logging-into-the-repository-tp19800964p19800964.html > Sent from the Jackrabbit - Dev mailing list archive at Nabble.com. > > -- Alexander Klimetschek [EMAIL PROTECTED]
