jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1487999 - in /jena/trunk/jena-fuseki/src: main/java/org/apache/jena/fuseki/server/ test/java/org/apache/jena/fuseki/
Date Thu, 30 May 2013 20:40:34 GMT
Author: andy
Date: Thu May 30 20:40:34 2013
New Revision: 1487999

URL: http://svn.apache.org/r1487999
Log:
Initialize server correctly.

Modified:
    jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/server/CounterSet.java
    jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/server/FusekiConfig.java
    jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/server/SPARQLServer.java
    jena/trunk/jena-fuseki/src/test/java/org/apache/jena/fuseki/ServerTest.java

Modified: jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/server/CounterSet.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/server/CounterSet.java?rev=1487999&r1=1487998&r2=1487999&view=diff
==============================================================================
--- jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/server/CounterSet.java (original)
+++ jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/server/CounterSet.java Thu
May 30 20:40:34 2013
@@ -21,11 +21,14 @@ package org.apache.jena.fuseki.server;
 import java.util.HashMap ;
 import java.util.Map ;
 
-import org.apache.jena.fuseki.Fuseki ;
+import org.slf4j.Logger ;
+import org.slf4j.LoggerFactory ;
 
 /** A collection of counters */
 public class CounterSet
 {
+    private static Logger log = LoggerFactory.getLogger(CounterSet.class) ;
+    
     private Map<CounterName, Counter> counters = new HashMap<CounterName, Counter>()
;
     
     public CounterSet()    {}
@@ -36,7 +39,7 @@ public class CounterSet
 
     public void add(CounterName counterName) {
         if ( counters.containsKey(counterName) ) {
-            Fuseki.serverLog.warn("Duplicate counter in counter set: "+counterName) ;
+            log.warn("Duplicate counter in counter set: "+counterName) ;
             return ;
         }
         counters.put(counterName, new Counter()) ;
@@ -45,8 +48,7 @@ public class CounterSet
     private Counter get(CounterName cn) {
         Counter c = counters.get(cn) ; 
         if ( c == null )
-            Fuseki.serverLog.warn("No counter in counter set: "+cn) ;
-            
+            log.warn("No counter in counter set: "+cn) ;
         return c ;
     }
 }

Modified: jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/server/FusekiConfig.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/server/FusekiConfig.java?rev=1487999&r1=1487998&r2=1487999&view=diff
==============================================================================
--- jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/server/FusekiConfig.java (original)
+++ jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/server/FusekiConfig.java Thu
May 30 20:40:34 2013
@@ -109,7 +109,6 @@ public class FusekiConfig
         config.jettyConfigFile = null ;
         config.pages = Fuseki.PagesStatic ;
         config.enableCompression = true ;
-        dbDesc.init() ;
         return config ;
     }
     

Modified: jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/server/SPARQLServer.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/server/SPARQLServer.java?rev=1487999&r1=1487998&r2=1487999&view=diff
==============================================================================
--- jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/server/SPARQLServer.java (original)
+++ jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/server/SPARQLServer.java Thu
May 30 20:40:34 2013
@@ -393,10 +393,13 @@ public class SPARQLServer
         
         addCountersForGSP(sDesc.readGraphStore.counters, true) ;
         addCountersForGSP(sDesc.readWriteGraphStore.counters, false) ;
-        sDesc.init() ;
     }
 
     private static void addCountersForGSP(CounterSet cs, boolean readWrite) {
+        cs.add(CounterName.Requests) ;
+        cs.add(CounterName.RequestsGood) ;
+        cs.add(CounterName.RequestsBad) ;
+        
         cs.add(CounterName.GSPget) ;
         cs.add(CounterName.GSPgetGood) ;
         cs.add(CounterName.GSPgetBad) ;

Modified: jena/trunk/jena-fuseki/src/test/java/org/apache/jena/fuseki/ServerTest.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-fuseki/src/test/java/org/apache/jena/fuseki/ServerTest.java?rev=1487999&r1=1487998&r2=1487999&view=diff
==============================================================================
--- jena/trunk/jena-fuseki/src/test/java/org/apache/jena/fuseki/ServerTest.java (original)
+++ jena/trunk/jena-fuseki/src/test/java/org/apache/jena/fuseki/ServerTest.java Thu May 30
20:40:34 2013
@@ -22,8 +22,6 @@ import org.apache.jena.atlas.logging.Log
 import org.apache.jena.fuseki.server.FusekiConfig ;
 import org.apache.jena.fuseki.server.SPARQLServer ;
 import org.apache.jena.fuseki.server.ServerConfig ;
-import org.junit.AfterClass ;
-import org.junit.BeforeClass ;
 
 import com.hp.hpl.jena.sparql.core.DatasetGraph ;
 import com.hp.hpl.jena.sparql.core.DatasetGraphFactory ;
@@ -49,14 +47,14 @@ public class ServerTest extends BaseServ
     
     // If not inheriting from this class, call:
     
-    @BeforeClass static public void allocServer()
+    static public void allocServer()
     { 
         if ( referenceCount == 0 )
             serverStart() ;
         referenceCount ++ ;
     }
     
-    @AfterClass static public void freeServer() 
+    static public void freeServer() 
     { 
         referenceCount -- ;
         if ( referenceCount == 0 )
@@ -88,6 +86,7 @@ public class ServerTest extends BaseServ
         Log.logLevel(Fuseki.serverLog.getName(), org.apache.log4j.Level.INFO, java.util.logging.Level.INFO)
;
         Log.logLevel(Fuseki.requestLog.getName(), org.apache.log4j.Level.INFO, java.util.logging.Level.INFO)
;
         Log.logLevel("org.eclipse.jetty", org.apache.log4j.Level.INFO, java.util.logging.Level.INFO)
;
+        server = null ;
     }
     
     public static void resetServer()



Mime
View raw message