Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 3rd, 2012  |  syntax: None  |  size: 0.37 KB  |  hits: 20  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. public void createNode() throws Exception {
  2.                 Repository repo = getRepository();
  3.                 Session session = null;
  4.                 try {
  5.                         session = repo.login("default");
  6.                         Node rootNode = session.getRootNode();
  7.                         Node node = rootNode.addNode("hello");
  8.                         node.setProperty("message", "msg");
  9.                         session.save();
  10.                 } finally {
  11.                         session.logout();
  12.                 }
  13.                 System.out.println(repo);
  14.         }