There's sometime I must be missing about neo4j 3.0 embedded. After creating a node, setting some properties, and marking the transaction as success. I then re-open the DB, but there are no nodes in it! What am I missing here? The neo4j documentation is pretty poor.
      val graph1 = {
        val graphDb = new GraphDatabaseFactory()
          .newEmbeddedDatabase(new File("/opt/neo4j/deviceGraphTest" ))
        val tx = graphDb.beginTx()
        val node = graphDb.createNode()
        node.setProperty("name", "kitchen island")
        node.setProperty("bulbType", "incandescent")
        tx.success()
        graphDb.shutdown()
      }
      val graph2 = {
        val graphDb2 = new GraphDatabaseFactory()
          .newEmbeddedDatabase(new File("/opt/neo4j/deviceGraphTest" ))
        val tx2 = graphDb2.beginTx()
        val allNodes = graphDb2.getAllNodes.iterator().toList
        allNodes.foreach(node => {
          printNode(node)
        })
      }