Index: pom.xml
===================================================================
--- pom.xml	(revision 19)
+++ pom.xml	(revision 66)
@@ -4,9 +4,10 @@
 	<groupId>de.mpiwg.itgroup.annotations</groupId>
 	<artifactId>AnnotationManagerN4J</artifactId>
-	<version>0.2.1-SNAPSHOT</version>
+	<version>0.3-SNAPSHOT</version>
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<neo4j-version>1.7.1</neo4j-version>
-		<restlet-version>2.0.14</restlet-version>
+		<neo4j-version>2.0.1</neo4j-version>
+        <restlet-version>2.0.15</restlet-version>
+        <!-- <restlet-version>2.1.7</restlet-version> -->
 	</properties>
 	<repositories>
@@ -95,6 +96,6 @@
 					<artifactId>maven-compiler-plugin</artifactId>
 					<configuration>
-						<source>1.6</source>
-						<target>1.6</target>
+						<source>1.7</source>
+						<target>1.7</target>
 					</configuration>
 				</plugin>
Index: src/main/java/de/mpiwg/itgroup/annotations/neo4j/AnnotationStore.java
===================================================================
--- src/main/java/de/mpiwg/itgroup/annotations/neo4j/AnnotationStore.java	(revision 63)
+++ src/main/java/de/mpiwg/itgroup/annotations/neo4j/AnnotationStore.java	(revision 66)
@@ -63,10 +63,14 @@
         nodeIndexes = new ArrayList<Index<Node>>(5);
         // List.set(enum.ordinal(), val) seems not to work.
-        nodeIndexes.add(NodeTypes.ANNOTATION.ordinal(), graphDb.index().forNodes("annotations"));
-        nodeIndexes.add(NodeTypes.PERSON.ordinal(), graphDb.index().forNodes("persons"));
-        nodeIndexes.add(NodeTypes.TARGET.ordinal(), graphDb.index().forNodes("targets"));
-        nodeIndexes.add(NodeTypes.GROUP.ordinal(), graphDb.index().forNodes("groups"));
-        nodeIndexes.add(NodeTypes.TAG.ordinal(), graphDb.index().forNodes("tags"));
-        nodeIndexes.add(NodeTypes.RESOURCE.ordinal(), graphDb.index().forNodes("resources"));
+        try ( Transaction tx = graphDb.beginTx() )
+        {
+            nodeIndexes.add(NodeTypes.ANNOTATION.ordinal(), graphDb.index().forNodes("annotations"));
+            nodeIndexes.add(NodeTypes.PERSON.ordinal(), graphDb.index().forNodes("persons"));
+            nodeIndexes.add(NodeTypes.TARGET.ordinal(), graphDb.index().forNodes("targets"));
+            nodeIndexes.add(NodeTypes.GROUP.ordinal(), graphDb.index().forNodes("groups"));
+            nodeIndexes.add(NodeTypes.TAG.ordinal(), graphDb.index().forNodes("tags"));
+            nodeIndexes.add(NodeTypes.RESOURCE.ordinal(), graphDb.index().forNodes("resources"));
+            tx.success();
+        }
     }
 
@@ -138,8 +142,11 @@
             query = "*";
         }
-        IndexHits<Node> actorNodes = idx.query(key, query);
-        for (Node actorNode : actorNodes) {
-            Actor actor = createActorFromNode(actorNode);
-            actors.add((T) actor);
+        try (Transaction tx = graphDb.beginTx()) {
+            IndexHits<Node> actorNodes = idx.query(key, query);
+            for (Node actorNode : actorNodes) {
+                Actor actor = createActorFromNode(actorNode);
+                actors.add((T) actor);
+            }
+            tx.success();
         }
         return actors;
@@ -187,8 +194,11 @@
             query = "*";
         }
-        IndexHits<Node> actorNodes = idx.query(key, query);
-        for (Node actorNode : actorNodes) {
-            Uri uri = createUriFromNode(actorNode);
-            uris.add((T) uri);
+        try (Transaction tx = graphDb.beginTx()) {
+            IndexHits<Node> actorNodes = idx.query(key, query);
+            for (Node actorNode : actorNodes) {
+                Uri uri = createUriFromNode(actorNode);
+                uris.add((T) uri);
+            }
+            tx.success();
         }
         return uris;
@@ -233,8 +243,11 @@
             query = "*";
         }
-        IndexHits<Node> annotNodes = idx.query(key, query);
-        for (Node annotNode : annotNodes) {
-            Annotation annotation = createAnnotationFromNode(annotNode);
-            annotations.add(annotation);
+        try (Transaction tx = graphDb.beginTx()) {
+            IndexHits<Node> annotNodes = idx.query(key, query);
+            for (Node annotNode : annotNodes) {
+                Annotation annotation = createAnnotationFromNode(annotNode);
+                annotations.add(annotation);
+            }
+            tx.success();
         }
         return annotations;
@@ -255,8 +268,11 @@
             query = "*";
         }
-        IndexHits<Node> groupNodes = idx.query(key, query);
-        for (Node groupNode : groupNodes) {
-            Tag tag = createTagFromNode(groupNode);
-            tags.add(tag);
+        try (Transaction tx = graphDb.beginTx()) {
+            IndexHits<Node> groupNodes = idx.query(key, query);
+            for (Node groupNode : groupNodes) {
+                Tag tag = createTagFromNode(groupNode);
+                tags.add(tag);
+            }
+            tx.success();
         }
         return tags;
Index: src/main/java/de/mpiwg/itgroup/annotations/restlet/BaseRestlet.java
===================================================================
--- src/main/java/de/mpiwg/itgroup/annotations/restlet/BaseRestlet.java	(revision 60)
+++ src/main/java/de/mpiwg/itgroup/annotations/restlet/BaseRestlet.java	(revision 66)
@@ -21,6 +21,9 @@
 import org.apache.log4j.Logger;
 import org.neo4j.graphdb.GraphDatabaseService;
+import org.neo4j.graphdb.factory.GraphDatabaseBuilder;
 import org.neo4j.graphdb.factory.GraphDatabaseFactory;
+import org.neo4j.graphdb.factory.GraphDatabaseSettings;
 import org.neo4j.kernel.AbstractGraphDatabase;
+import org.neo4j.kernel.GraphDatabaseAPI;
 import org.neo4j.server.WrappingNeoServerBootstrapper;
 import org.restlet.Application;
@@ -178,5 +181,7 @@
                 if (dbFn != null) {
                     logger.debug("opening DB " + dbFn);
-                    graphDb = new GraphDatabaseFactory().newEmbeddedDatabase(dbFn);
+                    GraphDatabaseBuilder graphDbBuilder = new GraphDatabaseFactory().newEmbeddedDatabaseBuilder(dbFn);
+                    graphDbBuilder.setConfig(GraphDatabaseSettings.allow_store_upgrade, "true");
+                    graphDb = graphDbBuilder.newGraphDatabase();
                     registerShutdownHook(graphDb);
                     // store in context
@@ -186,5 +191,5 @@
                     sc.setAttribute(ANNSTORE_KEY, store);
                     // admin server
-                    srv = new WrappingNeoServerBootstrapper((AbstractGraphDatabase) graphDb);
+                    srv = new WrappingNeoServerBootstrapper((GraphDatabaseAPI) graphDb);
                     logger.debug("Starting DB admin server...");
                     // store in context
