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 2011/09/15 15:32:12 UTC

svn commit: r1171092 - in /incubator/jena/Experimental/TxTDB/trunk: src-dev/tx/ src/main/java/com/hp/hpl/jena/tdb/transaction/ src/test/java/com/hp/hpl/jena/tdb/transaction/

Author: andy
Date: Thu Sep 15 13:32:12 2011
New Revision: 1171092

URL: http://svn.apache.org/viewvc?rev=1171092&view=rev
Log: (empty)

Added:
    incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/TestNGX.java   (with props)
Modified:
    incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/Report_JENA91.java
    incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/Report_JENA91a.java
    incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/Transaction.java
    incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/transaction/TransTestLib.java

Added: incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/TestNGX.java
URL: http://svn.apache.org/viewvc/incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/TestNGX.java?rev=1171092&view=auto
==============================================================================
--- incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/TestNGX.java (added)
+++ incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/TestNGX.java Thu Sep 15 13:32:12 2011
@@ -0,0 +1,64 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package tx;
+
+import org.slf4j.Logger ;
+import org.slf4j.LoggerFactory ;
+
+import com.hp.hpl.jena.graph.Graph ;
+import com.hp.hpl.jena.graph.Node ;
+import com.hp.hpl.jena.sparql.sse.SSE ;
+import com.hp.hpl.jena.tdb.ConfigTest ;
+import com.hp.hpl.jena.tdb.DatasetGraphTxn ;
+import com.hp.hpl.jena.tdb.ReadWrite ;
+import com.hp.hpl.jena.tdb.StoreConnection ;
+import com.hp.hpl.jena.tdb.base.file.Location ;
+
+public class TestNGX
+{
+    static { org.openjena.atlas.logging.Log.setLog4j() ; }
+    private static Logger log = LoggerFactory.getLogger(TestTransSystemJena91.class) ;
+
+    static boolean MEM = false ;
+    
+    static final Location LOC = MEM ? Location.mem() : new Location(ConfigTest.getTestingDirDB()) ;
+    
+    protected static synchronized StoreConnection getStoreConnection()
+    {
+        StoreConnection sConn = StoreConnection.make(LOC) ;
+        //sConn.getTransMgr().recording(true) ;
+        return sConn ;
+    }
+    
+    public static void main(String ...args)
+    {
+        StoreConnection sConn = getStoreConnection() ;
+        DatasetGraphTxn dsg = sConn.begin(ReadWrite.WRITE) ;
+        Node gn = Node.createURI("http://example/") ;
+        Graph g = dsg.getGraph(gn) ;
+        g.add(SSE.parseTriple("(<s> <p> <o>)")) ;
+        dsg.commit() ;
+        
+        DatasetGraphTxn dsg2 = sConn.begin(ReadWrite.READ) ;
+        System.out.println(dsg2) ;
+        dsg2.close() ;
+    }
+    
+}
+

Propchange: incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/TestNGX.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/Transaction.java
URL: http://svn.apache.org/viewvc/incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/Transaction.java?rev=1171092&r1=1171091&r2=1171092&view=diff
==============================================================================
--- incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/Transaction.java (original)
+++ incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/Transaction.java Thu Sep 15 13:32:12 2011
@@ -160,7 +160,7 @@ public class Transaction
     public TxnState getState()                      { return state ; }
     
     public long getTxnId()                          { return id ; }
-    TransactionManager getTxnMgr()                  { return txnMgr ; }
+    public TransactionManager getTxnMgr()                  { return txnMgr ; }
     
     public DatasetGraphTxn getActiveDataset()
     {

Modified: incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/transaction/TransTestLib.java
URL: http://svn.apache.org/viewvc/incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/transaction/TransTestLib.java?rev=1171092&r1=1171091&r2=1171092&view=diff
==============================================================================
--- incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/transaction/TransTestLib.java (original)
+++ incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/transaction/TransTestLib.java Thu Sep 15 13:32:12 2011
@@ -36,7 +36,7 @@ import com.hp.hpl.jena.tdb.DatasetGraphT
 public class TransTestLib
 {
 
-    static int count(String queryStr, DatasetGraph dsg)
+    public static int count(String queryStr, DatasetGraph dsg)
     {
         int counter = 0 ;
         Query query = QueryFactory.create(queryStr, Syntax.syntaxARQ) ;