diff --git a/src/main/java/net/onrc/onos/graph/GraphDBManager.java b/src/main/java/net/onrc/onos/graph/GraphDBManager.java
index f2ae376..fb5c0d8 100644
--- a/src/main/java/net/onrc/onos/graph/GraphDBManager.java
+++ b/src/main/java/net/onrc/onos/graph/GraphDBManager.java
@@ -15,7 +15,8 @@
  */
 public class GraphDBManager {
     private static ThreadLocal<HashMap<String, DBConnection>> connections = new ThreadLocal<HashMap<String, DBConnection>>();
-
+    private static DBOperation operation = null;
+    
     static Map<String, DBConnection> getConnectionMap() {
         if (connections.get() == null) {
             connections.set(new HashMap<String, DBConnection>());
@@ -24,15 +25,16 @@
     }
 
     public static DBOperation getDBOperation(final String dbStore, final String dbConfigFile) {
-        DBOperation operation = null;
-        if (dbStore.equals("ramcloud")) {
-            operation = new RamCloudDBOperation();
-        } else if (dbStore.equals("titan")) {
-            operation = new TitanDBOperation();
-        }
-        if (operation != null) {
-            operation.conn = GraphDBManager.getConnection(dbStore, dbConfigFile);
-        }
+        if (operation == null){
+	    if (dbStore.equals("ramcloud")) {
+		operation = new RamCloudDBOperation();
+	    } else if (dbStore.equals("titan")) {
+		operation = new TitanDBOperation();
+	    }
+	    if (operation != null) {
+		operation.conn = GraphDBManager.getConnection(dbStore, dbConfigFile);
+	    }
+	}
         return operation;
     }
 
diff --git a/src/main/java/net/onrc/onos/ofcontroller/core/internal/TopoLinkServiceImpl.java b/src/main/java/net/onrc/onos/ofcontroller/core/internal/TopoLinkServiceImpl.java
index b692e8e..5892ef8 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/core/internal/TopoLinkServiceImpl.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/core/internal/TopoLinkServiceImpl.java
@@ -4,7 +4,7 @@
 import java.util.List;
 
 import net.floodlightcontroller.routing.Link;
-import net.onrc.onos.graph.GraphDBOperation;
+import net.onrc.onos.graph.DBOperation;
 import net.onrc.onos.ofcontroller.core.INetMapTopologyObjects.ISwitchObject;
 import net.onrc.onos.ofcontroller.core.INetMapTopologyService.ITopoLinkService;
 import net.onrc.onos.ofcontroller.core.internal.LinkStorageImpl.ExtractLink;
@@ -14,10 +14,11 @@
 
 import com.tinkerpop.blueprints.Vertex;
 import com.tinkerpop.gremlin.java.GremlinPipeline;
+import net.onrc.onos.graph.GraphDBManager;
 
 public class TopoLinkServiceImpl implements ITopoLinkService {
 	
-	protected GraphDBOperation op;
+	protected DBOperation dbop;
 	protected final static Logger log = LoggerFactory.getLogger(TopoLinkServiceImpl.class);
 
 	public void finalize() {
@@ -26,15 +27,15 @@
 	
 	@Override
 	public void close() {
-		op.close();
+		dbop.close();
 	}
  
 	@Override
 	public List<Link> getActiveLinks() {
 		// TODO Auto-generated method stub
-		op = new GraphDBOperation("");
-		op.commit(); //Commit to ensure we see latest data
-		Iterable<ISwitchObject> switches = op.getActiveSwitches();
+		dbop = GraphDBManager.getDBOperation("", "");
+		dbop.commit(); //Commit to ensure we see latest data
+		Iterable<ISwitchObject> switches = dbop.getActiveSwitches();
 		List<Link> links = new ArrayList<Link>(); 
 		for (ISwitchObject sw : switches) {
 			GremlinPipeline<Vertex, Link> pipe = new GremlinPipeline<Vertex, Link>();
@@ -50,7 +51,7 @@
 			}
 						
 		}
-		op.commit();
+		dbop.commit();
 		return links;
 	}
 
@@ -58,7 +59,7 @@
 	public List<Link> getLinksOnSwitch(String dpid) {
 		// TODO Auto-generated method stub
 		List<Link> links = new ArrayList<Link>(); 
-		ISwitchObject sw = op.searchSwitch(dpid);
+		ISwitchObject sw = dbop.searchSwitch(dpid);
 		GremlinPipeline<Vertex, Link> pipe = new GremlinPipeline<Vertex, Link>();
 		ExtractLink extractor = new ExtractLink();
 
