DatasetGraphTDB dsg = TDBInternal.getBaseDatasetGraphTDB(TDBFactory.createDatasetGraph());
GraphListener listener = new MyListener();
dsg.getDefaultGraph().getEventManager().register(listener);
Iterator<Node> iter = dsg.listGraphNodes();
while ( iter.hasNext() ) {
Graph graph = dsg.getGraph(iter.next());
graph.getEventManager().register(listener);
}