for (Repository r : repositories) {
System.out.println("Found repository: " + r.getName());
}
// create session with the first (and only) repository
Repository repository = repositories.get(0);
parameter.put(SessionParameter.REPOSITORY_ID, repository.getId());
Session session = sessionFactory.createSession(parameter);
System.out.println("Got a connection to repository: " + repository.getName()
+ ", with id: " + repository.getId());
// // An example of creating a session with a known repository id.
// parameter.put(SessionParameter.REPOSITORY_ID, "A1");
// Session session = sessionFactory.createSession(parameter);