jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1518367 - in /jena/trunk/jena-fuseki: run_cp src/main/java/org/apache/jena/fuseki/servlets/HttpAction.java src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Update.java
Date Wed, 28 Aug 2013 20:28:01 GMT
Author: andy
Date: Wed Aug 28 20:28:00 2013
New Revision: 1518367

URL: http://svn.apache.org/r1518367
Log:
JENA-523 : Don't use transactional mode on transaction-by-lock.

Modified:
    jena/trunk/jena-fuseki/run_cp
    jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/servlets/HttpAction.java
    jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Update.java

Modified: jena/trunk/jena-fuseki/run_cp
URL: http://svn.apache.org/viewvc/jena/trunk/jena-fuseki/run_cp?rev=1518367&r1=1518366&r2=1518367&view=diff
==============================================================================
--- jena/trunk/jena-fuseki/run_cp (original)
+++ jena/trunk/jena-fuseki/run_cp Wed Aug 28 20:28:00 2013
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-XCP="/home/afs/.m2/repo/org/apache/jena/jena-arq/2.10.2-SNAPSHOT/jena-arq-2.10.2-SNAPSHOT.jar:/home/afs/.m2/repo/org/apache/jena/jena-arq/2.10.2-SNAPSHOT/jena-arq-2.10.2-SNAPSHOT-tests.jar:/home/afs/.m2/repo/org/apache/jena/jena-core/2.10.2-SNAPSHOT/jena-core-2.10.2-SNAPSHOT.jar:/home/afs/.m2/repo/org/apache/jena/jena-iri/0.9.7-SNAPSHOT/jena-iri-0.9.7-SNAPSHOT.jar:/home/afs/.m2/repo/xerces/xercesImpl/2.11.0/xercesImpl-2.11.0.jar:/home/afs/.m2/repo/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar:/home/afs/.m2/repo/org/apache/jena/jena-tdb/0.10.2-SNAPSHOT/jena-tdb-0.10.2-SNAPSHOT.jar:/home/afs/.m2/repo/org/apache/jena/jena-text/1.0.0-SNAPSHOT/jena-text-1.0.0-SNAPSHOT.jar:/home/afs/.m2/repo/org/apache/jena/apache-jena-libs/2.10.2-SNAPSHOT/apache-jena-libs-2.10.2-SNAPSHOT.pom:/home/afs/.m2/repo/org/apache/lucene/lucene-core/4.2.1/lucene-core-4.2.1.jar:/home/afs/.m2/repo/org/apache/lucene/lucene-analyzers-common/4.2.1/lucene-analyzers-common-4.2.1.jar:/home/afs/.m2/repo/org/apache/lucene/lu
 cene-queryparser/4.2.1/lucene-queryparser-4.2.1.jar:/home/afs/.m2/repo/org/apache/lucene/lucene-queries/4.2.1/lucene-queries-4.2.1.jar:/home/afs/.m2/repo/org/apache/lucene/lucene-sandbox/4.2.1/lucene-sandbox-4.2.1.jar:/home/afs/.m2/repo/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.jar:/home/afs/.m2/repo/org/apache/solr/solr-solrj/4.2.1/solr-solrj-4.2.1.jar:/home/afs/.m2/repo/org/apache/zookeeper/zookeeper/3.4.5/zookeeper-3.4.5.jar:/home/afs/.m2/repo/commons-io/commons-io/2.1/commons-io-2.1.jar:/home/afs/.m2/repo/org/apache/httpcomponents/httpmime/4.2.3/httpmime-4.2.3.jar:/home/afs/.m2/repo/org/codehaus/woodstox/wstx-asl/3.2.7/wstx-asl-3.2.7.jar:/home/afs/.m2/repo/org/apache/jena/jena-text/1.0.0-SNAPSHOT/jena-text-1.0.0-SNAPSHOT-sources.jar:/home/afs/.m2/repo/junit/junit/4.11/junit-4.11.jar:/home/afs/.m2/repo/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/home/afs/.m2/repo/org/apache/httpcomponents/httpclient/4.2.3/httpclient-4.2.3.jar:/home/afs/.m2/repo/org/apache/htt
 pcomponents/httpcore/4.2.2/httpcore-4.2.2.jar:/home/afs/.m2/repo/commons-codec/commons-codec/1.6/commons-codec-1.6.jar:/home/afs/.m2/repo/commons-fileupload/commons-fileupload/1.2.2/commons-fileupload-1.2.2.jar:/home/afs/.m2/repo/org/eclipse/jetty/jetty-server/8.1.8.v20121106/jetty-server-8.1.8.v20121106.jar:/home/afs/.m2/repo/org/eclipse/jetty/orbit/javax.servlet/3.0.0.v201112011016/javax.servlet-3.0.0.v201112011016.jar:/home/afs/.m2/repo/org/eclipse/jetty/jetty-continuation/8.1.8.v20121106/jetty-continuation-8.1.8.v20121106.jar:/home/afs/.m2/repo/org/eclipse/jetty/jetty-http/8.1.8.v20121106/jetty-http-8.1.8.v20121106.jar:/home/afs/.m2/repo/org/eclipse/jetty/jetty-io/8.1.8.v20121106/jetty-io-8.1.8.v20121106.jar:/home/afs/.m2/repo/org/eclipse/jetty/jetty-servlet/8.1.8.v20121106/jetty-servlet-8.1.8.v20121106.jar:/home/afs/.m2/repo/org/eclipse/jetty/jetty-security/8.1.8.v20121106/jetty-security-8.1.8.v20121106.jar:/home/afs/.m2/repo/org/eclipse/jetty/jetty-servlets/8.1.8.v20121106/jet
 ty-servlets-8.1.8.v20121106.jar:/home/afs/.m2/repo/org/eclipse/jetty/jetty-client/8.1.8.v20121106/jetty-client-8.1.8.v20121106.jar:/home/afs/.m2/repo/org/eclipse/jetty/jetty-util/8.1.8.v20121106/jetty-util-8.1.8.v20121106.jar:/home/afs/.m2/repo/org/eclipse/jetty/jetty-xml/8.1.8.v20121106/jetty-xml-8.1.8.v20121106.jar:/home/afs/.m2/repo/org/apache/velocity/velocity/1.7/velocity-1.7.jar:/home/afs/.m2/repo/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar:/home/afs/.m2/repo/commons-lang/commons-lang/2.4/commons-lang-2.4.jar:/home/afs/.m2/repo/org/slf4j/slf4j-api/1.6.4/slf4j-api-1.6.4.jar:/home/afs/.m2/repo/org/slf4j/slf4j-log4j12/1.6.4/slf4j-log4j12-1.6.4.jar:/home/afs/.m2/repo/org/slf4j/jcl-over-slf4j/1.6.4/jcl-over-slf4j-1.6.4.jar:/home/afs/.m2/repo/log4j/log4j/1.2.16/log4j-1.2.16.jar"
+XCP="/home/afs/.m2/repo/org/apache/jena/jena-arq/2.11.0-SNAPSHOT/jena-arq-2.11.0-SNAPSHOT.jar:/home/afs/.m2/repo/org/apache/jena/jena-arq/2.11.0-SNAPSHOT/jena-arq-2.11.0-SNAPSHOT-tests.jar:/home/afs/.m2/repo/org/apache/jena/jena-core/2.11.0-SNAPSHOT/jena-core-2.11.0-SNAPSHOT.jar:/home/afs/.m2/repo/org/apache/jena/jena-iri/1.0.0-SNAPSHOT/jena-iri-1.0.0-SNAPSHOT.jar:/home/afs/.m2/repo/xerces/xercesImpl/2.11.0/xercesImpl-2.11.0.jar:/home/afs/.m2/repo/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar:/home/afs/.m2/repo/org/apache/jena/jena-tdb/1.0.0-SNAPSHOT/jena-tdb-1.0.0-SNAPSHOT.jar:/home/afs/.m2/repo/org/apache/jena/jena-text/1.0.0-SNAPSHOT/jena-text-1.0.0-SNAPSHOT.jar:/home/afs/.m2/repo/org/apache/jena/apache-jena-libs/2.10.2-SNAPSHOT/apache-jena-libs-2.10.2-SNAPSHOT.pom:/home/afs/.m2/repo/org/apache/lucene/lucene-core/4.3.1/lucene-core-4.3.1.jar:/home/afs/.m2/repo/org/apache/lucene/lucene-analyzers-common/4.3.1/lucene-analyzers-common-4.3.1.jar:/home/afs/.m2/repo/org/apache/lucene/luce
 ne-queryparser/4.3.1/lucene-queryparser-4.3.1.jar:/home/afs/.m2/repo/org/apache/lucene/lucene-queries/4.3.1/lucene-queries-4.3.1.jar:/home/afs/.m2/repo/org/apache/lucene/lucene-sandbox/4.3.1/lucene-sandbox-4.3.1.jar:/home/afs/.m2/repo/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.jar:/home/afs/.m2/repo/org/apache/solr/solr-solrj/4.3.1/solr-solrj-4.3.1.jar:/home/afs/.m2/repo/org/apache/zookeeper/zookeeper/3.4.5/zookeeper-3.4.5.jar:/home/afs/.m2/repo/commons-io/commons-io/2.1/commons-io-2.1.jar:/home/afs/.m2/repo/org/noggit/noggit/0.5/noggit-0.5.jar:/home/afs/.m2/repo/org/apache/httpcomponents/httpmime/4.2.3/httpmime-4.2.3.jar:/home/afs/.m2/repo/org/codehaus/woodstox/wstx-asl/3.2.7/wstx-asl-3.2.7.jar:/home/afs/.m2/repo/junit/junit/4.11/junit-4.11.jar:/home/afs/.m2/repo/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/home/afs/.m2/repo/org/apache/httpcomponents/httpclient/4.2.3/httpclient-4.2.3.jar:/home/afs/.m2/repo/org/apache/httpcomponents/httpcore/4.2.2/httpcore-4.2.2.j
 ar:/home/afs/.m2/repo/commons-codec/commons-codec/1.6/commons-codec-1.6.jar:/home/afs/.m2/repo/commons-fileupload/commons-fileupload/1.2.2/commons-fileupload-1.2.2.jar:/home/afs/.m2/repo/org/eclipse/jetty/jetty-server/8.1.11.v20130520/jetty-server-8.1.11.v20130520.jar:/home/afs/.m2/repo/org/eclipse/jetty/orbit/javax.servlet/3.0.0.v201112011016/javax.servlet-3.0.0.v201112011016.jar:/home/afs/.m2/repo/org/eclipse/jetty/jetty-continuation/8.1.11.v20130520/jetty-continuation-8.1.11.v20130520.jar:/home/afs/.m2/repo/org/eclipse/jetty/jetty-http/8.1.11.v20130520/jetty-http-8.1.11.v20130520.jar:/home/afs/.m2/repo/org/eclipse/jetty/jetty-io/8.1.11.v20130520/jetty-io-8.1.11.v20130520.jar:/home/afs/.m2/repo/org/eclipse/jetty/jetty-servlet/8.1.11.v20130520/jetty-servlet-8.1.11.v20130520.jar:/home/afs/.m2/repo/org/eclipse/jetty/jetty-servlets/8.1.11.v20130520/jetty-servlets-8.1.11.v20130520.jar:/home/afs/.m2/repo/org/eclipse/jetty/jetty-client/8.1.11.v20130520/jetty-client-8.1.11.v20130520.jar:/
 home/afs/.m2/repo/org/eclipse/jetty/jetty-xml/8.1.11.v20130520/jetty-xml-8.1.11.v20130520.jar:/home/afs/.m2/repo/org/eclipse/jetty/jetty-security/8.1.11.v20130520/jetty-security-8.1.11.v20130520.jar:/home/afs/.m2/repo/org/eclipse/jetty/jetty-util/8.1.11.v20130520/jetty-util-8.1.11.v20130520.jar:/home/afs/.m2/repo/org/apache/velocity/velocity/1.7/velocity-1.7.jar:/home/afs/.m2/repo/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar:/home/afs/.m2/repo/commons-lang/commons-lang/2.4/commons-lang-2.4.jar:/home/afs/.m2/repo/org/slf4j/slf4j-api/1.6.4/slf4j-api-1.6.4.jar:/home/afs/.m2/repo/org/slf4j/slf4j-log4j12/1.6.4/slf4j-log4j12-1.6.4.jar:/home/afs/.m2/repo/org/slf4j/jcl-over-slf4j/1.6.4/jcl-over-slf4j-1.6.4.jar:/home/afs/.m2/repo/log4j/log4j/1.2.16/log4j-1.2.16.jar"
 
 if [ "$CP" != '' ]
 then

Modified: jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/servlets/HttpAction.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/servlets/HttpAction.java?rev=1518367&r1=1518366&r2=1518367&view=diff
==============================================================================
--- jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/servlets/HttpAction.java (original)
+++ jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/servlets/HttpAction.java Wed
Aug 28 20:28:00 2013
@@ -88,7 +88,10 @@ public class HttpAction
         this.dsRef = desc ;
         this.dsg = desc.dataset ;
 
-        if ( dsg instanceof Transactional ) {
+        if ( dsg instanceof DatasetGraphWithLock ) {
+            transactional = (Transactional)dsg ;
+            isTransactional = false ;       // No real abort.
+        } else if ( dsg instanceof Transactional ) {
             transactional = (Transactional)dsg ;
             isTransactional = true ;
         } else {

Modified: jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Update.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Update.java?rev=1518367&r1=1518366&r2=1518367&view=diff
==============================================================================
--- jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Update.java
(original)
+++ jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Update.java
Wed Aug 28 20:28:00 2013
@@ -39,6 +39,7 @@ import javax.servlet.http.HttpServletReq
 import javax.servlet.http.HttpServletResponse ;
 
 import org.apache.jena.atlas.io.IO ;
+import org.apache.jena.atlas.lib.StrUtils ;
 import org.apache.jena.atlas.web.ContentType ;
 import org.apache.jena.fuseki.FusekiLib ;
 import org.apache.jena.fuseki.HttpNames ;
@@ -203,12 +204,11 @@ public class SPARQL_Update extends SPARQ
         if ( action.verbose )
             //requestLog.info(format("[%d] Form update = %s", action.id, formatForLog(requestStr)))
;
             requestLog.info(format("[%d] Form update = \n%s", action.id, requestStr)) ;
-
         // A little ugly because we are taking a copy of the string, but hopefully shouldn't
be too big if we are in this code-path
         // If we didn't want this additional copy, we could make the parser take a Reader
in addition to an InputStream
-        ByteArrayInputStream input = new ByteArrayInputStream(requestStr.getBytes());
+        byte[] b = StrUtils.asUTF8bytes(requestStr) ;
+        ByteArrayInputStream input = new ByteArrayInputStream(b);
         requestStr = null;  // free it early at least
-
         execute(action, input);
         successPage(action,"Update succeeded") ;
     }
@@ -221,10 +221,9 @@ public class SPARQL_Update extends SPARQ
         // If it isn't, we need to read the entire update request before performing any updates,
because
         // we have to attempt to make the request atomic in the face of malformed queries
         UpdateRequest req = null ;
-        if (!action.isTransactional())
+        if (!action.isTransactional()) 
         {
-            try
-            {
+            try {
                 // TODO implement a spill-to-disk version of this
                 req = UpdateFactory.read(usingList, input, UpdateParseBase, Syntax.syntaxARQ);
             }
@@ -233,8 +232,7 @@ public class SPARQL_Update extends SPARQ
         }
         
         action.beginWrite() ;
-        try
-        {
+        try {
             if (action.isTransactional())
                 UpdateAction.parseExecute(usingList, action.getActiveDSG(), input, UpdateParseBase,
Syntax.syntaxARQ);
             else



Mime
View raw message