sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattm...@apache.org
Subject svn commit: r1032837 - in /incubator/sis/trunk: CHANGES.txt sis-webapp/src/main/java/org/apache/sis/services/LocationServlet.java sis-webapp/src/main/webapp/META-INF/context.xml sis-webapp/src/main/webapp/WEB-INF/web.xml
Date Tue, 09 Nov 2010 04:28:01 GMT
Author: mattmann
Date: Tue Nov  9 04:28:00 2010
New Revision: 1032837

URL: http://svn.apache.org/viewvc?rev=1032837&view=rev
Log:
- fix for SIS-16 SIS location service is configured incorrectly

Modified:
    incubator/sis/trunk/CHANGES.txt
    incubator/sis/trunk/sis-webapp/src/main/java/org/apache/sis/services/LocationServlet.java
    incubator/sis/trunk/sis-webapp/src/main/webapp/META-INF/context.xml
    incubator/sis/trunk/sis-webapp/src/main/webapp/WEB-INF/web.xml

Modified: incubator/sis/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/sis/trunk/CHANGES.txt?rev=1032837&r1=1032836&r2=1032837&view=diff
==============================================================================
--- incubator/sis/trunk/CHANGES.txt (original)
+++ incubator/sis/trunk/CHANGES.txt Tue Nov  9 04:28:00 2010
@@ -2,6 +2,8 @@ Apache SIS Change Log
 ======================
 Release 0.1-incubating (Current Development)
 
+* SIS-16 SIS location service is configured incorrectly (mattmann)
+
 * SIS-12 Write basic SIS documentation for CLI and for WS layer (mattmann)
 
 * SIS-14 Use LatLon class instead of plain double points in QuadTreeData interface (greddin,
mattmann)

Modified: incubator/sis/trunk/sis-webapp/src/main/java/org/apache/sis/services/LocationServlet.java
URL: http://svn.apache.org/viewvc/incubator/sis/trunk/sis-webapp/src/main/java/org/apache/sis/services/LocationServlet.java?rev=1032837&r1=1032836&r2=1032837&view=diff
==============================================================================
--- incubator/sis/trunk/sis-webapp/src/main/java/org/apache/sis/services/LocationServlet.java
(original)
+++ incubator/sis/trunk/sis-webapp/src/main/java/org/apache/sis/services/LocationServlet.java
Tue Nov  9 04:28:00 2010
@@ -84,12 +84,11 @@ public class LocationServlet extends Htt
   private String timeToLoad;
 
   @SuppressWarnings("unchecked")
-  public void init(ServletConfig config) {
-    int capacity = Integer.valueOf(config.getInitParameter("org.apache.sis.services.qtree.capacity"));
-    int depth = Integer.valueOf(config.getInitParameter("org.apache.sis.services.qtree.depth"));
+  public void init(ServletConfig config) throws ServletException {
     this.context = config.getServletContext();
     long startTime = 0;
     long endTime = 0;
+    int capacity=-1, depth=-1;
     InputStream indexStream = config.getServletContext().getResourceAsStream(
         File.separator + "index" + File.separator + "node_0.txt");
     if (indexStream != null) {
@@ -113,14 +112,13 @@ public class LocationServlet extends Htt
       // read quad tree properties set in config xml file
       InputStream configStream = null;
       try{
-        configStream = new FileInputStream(config.getInitParameter("org.apache.sis.services.config.filePath"));
+        configStream = new FileInputStream(this.context.getInitParameter("org.apache.sis.services.config.filePath"));
       }
       catch(Exception e){
         e.printStackTrace();
       }
       
       if (configStream != null) {
-
         DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance();
         try {
           DocumentBuilder docBuilder = dbfac.newDocumentBuilder();
@@ -204,7 +202,7 @@ public class LocationServlet extends Htt
           e.printStackTrace();
         }
       } else {
-        this.tree = new QuadTree(capacity, depth);
+        throw new ServletException("Unable to read location service XML config: null!");
       }
     }
   }

Modified: incubator/sis/trunk/sis-webapp/src/main/webapp/META-INF/context.xml
URL: http://svn.apache.org/viewvc/incubator/sis/trunk/sis-webapp/src/main/webapp/META-INF/context.xml?rev=1032837&r1=1032836&r2=1032837&view=diff
==============================================================================
--- incubator/sis/trunk/sis-webapp/src/main/webapp/META-INF/context.xml (original)
+++ incubator/sis/trunk/sis-webapp/src/main/webapp/META-INF/context.xml Tue Nov  9 04:28:00
2010
@@ -16,12 +16,6 @@ License for the specific language govern
 the License.
 -->
 <Context path="/sis" docBase="/path/to/sis-webapp-x.y.war">
-
-    <Parameter name="org.apache.sis.services.qtree.capacity"
-        value="4"/>
-
-    <Parameter name="org.apache.sis.services.qtree.depth"
-        value="10"/>
         
     <Parameter name="org.apache.sis.services.config.filePath" 
         value="/path/to/sis-location-config.xml"/>

Modified: incubator/sis/trunk/sis-webapp/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/incubator/sis/trunk/sis-webapp/src/main/webapp/WEB-INF/web.xml?rev=1032837&r1=1032836&r2=1032837&view=diff
==============================================================================
--- incubator/sis/trunk/sis-webapp/src/main/webapp/WEB-INF/web.xml (original)
+++ incubator/sis/trunk/sis-webapp/src/main/webapp/WEB-INF/web.xml Tue Nov  9 04:28:00 2010
@@ -18,14 +18,6 @@ the License.
 <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
   <display-name>Apache SIS</display-name>
   <context-param>
-    <param-name>org.apache.sis.services.qtree.capacity</param-name>
-    <param-value>4</param-value>
-  </context-param>
-  <context-param>
-    <param-name>org.apache.sis.services.qtree.depth</param-name>
-    <param-value>10</param-value>
-  </context-param>
-  <context-param>
     <param-name>org.apache.sis.services.config.filePath</param-name>
     <param-value>/path/to/sis-location-config.xml</param-value>
   </context-param>



Mime
View raw message