]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - sandbox/runtime/org.argeo.sandbox.jackrabbit/src/main/java/FirstHop.java
1 import javax
.jcr
.Repository
;
2 import javax
.jcr
.Session
;
3 import org
.apache
.jackrabbit
.core
.TransientRepository
;
6 * First hop example. Logs in to a content repository and prints a
9 public class FirstHop
{
12 * The main entry point of the example application.
14 * @param args command line arguments (ignored)
15 * @throws Exception if an error occurs
17 public static void main(String
[] args
) throws Exception
{
18 Repository repository
= new TransientRepository();
19 Session session
= repository
.login();
21 String user
= session
.getUserID();
22 String name
= repository
.getDescriptor(Repository
.REP_NAME_DESC
);
24 "Logged in as " + user
+ " to a " + name
+ " repository.");