You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2014/12/13 18:19:15 UTC
[4/8] jena git commit: Partial fix for JENA-737 - don't 500 if
dataset not in system db.
Partial fix for JENA-737 - don't 500 if dataset not in system db.
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/b803113c
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/b803113c
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/b803113c
Branch: refs/heads/master
Commit: b803113ccee8c9976d65a73ff8fc2026f0cec78d
Parents: c864965
Author: Andy Seaborne <an...@apache.org>
Authored: Fri Dec 12 15:48:22 2014 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Fri Dec 12 15:48:22 2014 +0000
----------------------------------------------------------------------
.../org/apache/jena/fuseki/mgt/ActionDatasets.java | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/b803113c/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionDatasets.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionDatasets.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionDatasets.java
index a623c28..7ba0a4f 100644
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionDatasets.java
+++ b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionDatasets.java
@@ -300,16 +300,20 @@ public class ActionDatasets extends ActionContainerItem {
// Redo check inside transaction.
if ( ref == null )
ServletOps.errorNotFound("No such dataset registered: "+name);
-
+
+ // Make it invisible to the outside.
+ DataAccessPointRegistry.get().remove(name) ;
+
// Name to graph
+ // Statically configured databases aren't in the system database.
Quad q = getOne(SystemState.getDatasetGraph(), null, null, pServiceName.asNode(), null) ;
if ( q == null )
ServletOps.errorBadRequest("Failed to find dataset for '"+name+"'");
- Node gn = q.getGraph() ;
-
- action.log.info("SHUTDOWN NEEDED");
- DataAccessPointRegistry.get().remove(name) ;
- systemDSG.deleteAny(gn, null, null, null) ;
+ if ( q != null ) {
+ Node gn = q.getGraph() ;
+ //action.log.info("SHUTDOWN NEEDED"); // To ensure it goes away?
+ systemDSG.deleteAny(gn, null, null, null) ;
+ }
systemDSG.commit() ;
committed = true ;
ServletOps.success(action) ;