Author: mattmann
Date: Thu Feb 17 22:41:49 2011
New Revision: 1071821

URL: http://svn.apache.org/viewvc?rev=1071821&view=rev
Log:
- fix for OODT-143 addition of fmprod context.xml and maven servlet-api 
dependency scope change to provider

Added:
    oodt/trunk/webapp/fmprod/src/main/webapp/META-INF/
    oodt/trunk/webapp/fmprod/src/main/webapp/META-INF/context.xml
Modified:
    oodt/trunk/CHANGES.txt
    oodt/trunk/webapp/fmprod/pom.xml
    
oodt/trunk/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/data/DataDeliveryServlet.java
    
oodt/trunk/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/data/DatasetDeliveryServlet.java
    
oodt/trunk/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rdf/RDFDatasetServlet.java
    
oodt/trunk/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rdf/RDFProductServlet.java
    
oodt/trunk/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rss/RSSProductServlet.java
    
oodt/trunk/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rss/RSSProductTransferServlet.java

Modified: oodt/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/oodt/trunk/CHANGES.txt?rev=1071821&r1=1071820&r2=1071821&view=diff
==============================================================================
--- oodt/trunk/CHANGES.txt (original)
+++ oodt/trunk/CHANGES.txt Thu Feb 17 22:41:49 2011
@@ -4,6 +4,9 @@ Apache OODT Change Log
 Release 0.3-SNAPSHOT (in progress)
 --------------------------------------------
 
+* OODT-143 addition of fmprod context.xml and maven servlet-api 
+  dependency scope change to provider (Shakeh Khudikyan, mattmann)
+
 * OODT-142 TypeHandler SerDe is backwards incompat with older 
   versions of FM (mattmann)
 

Modified: oodt/trunk/webapp/fmprod/pom.xml
URL: 
http://svn.apache.org/viewvc/oodt/trunk/webapp/fmprod/pom.xml?rev=1071821&r1=1071820&r2=1071821&view=diff
==============================================================================
--- oodt/trunk/webapp/fmprod/pom.xml (original)
+++ oodt/trunk/webapp/fmprod/pom.xml Thu Feb 17 22:41:49 2011
@@ -132,7 +132,7 @@ the License.
       <groupId>javax.servlet</groupId>
       <artifactId>servlet-api</artifactId>
       <version>2.4</version>
-      <scope>compile</scope>
+      <scope>provided</scope>
     </dependency>
   </dependencies>
 </project>

Modified: 
oodt/trunk/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/data/DataDeliveryServlet.java
URL: 
http://svn.apache.org/viewvc/oodt/trunk/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/data/DataDeliveryServlet.java?rev=1071821&r1=1071820&r2=1071821&view=diff
==============================================================================
--- 
oodt/trunk/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/data/DataDeliveryServlet.java
 (original)
+++ 
oodt/trunk/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/data/DataDeliveryServlet.java
 Thu Feb 17 22:41:49 2011
@@ -25,6 +25,7 @@ import org.apache.oodt.cas.filemgr.struc
 import org.apache.oodt.cas.filemgr.structs.Reference;
 import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
 import org.apache.oodt.cas.metadata.Metadata;
+import org.apache.oodt.cas.metadata.util.PathUtils;
 
 //JDK imports
 import java.io.File;
@@ -58,8 +59,13 @@ public class DataDeliveryServlet extends
   public void init(ServletConfig config) throws ServletException {
     super.init(config);
     try {
-      String fileMgrURL = config.getServletContext().getInitParameter(
-          "filemgr.url");
+      String fileMgrURL = null;
+      try {
+        fileMgrURL = 
PathUtils.replaceEnvVariables(config.getServletContext().getInitParameter(
+            "filemgr.url") );
+      } catch (Exception e) {
+        throw new ServletException("Failed to get filemgr url : " + 
e.getMessage(), e);
+      }
       if (fileMgrURL == null)
         fileMgrURL = "http://localhost:9000";;
       client = new XmlRpcFileManagerClient(new URL(fileMgrURL));

Modified: 
oodt/trunk/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/data/DatasetDeliveryServlet.java
URL: 
http://svn.apache.org/viewvc/oodt/trunk/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/data/DatasetDeliveryServlet.java?rev=1071821&r1=1071820&r2=1071821&view=diff
==============================================================================
--- 
oodt/trunk/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/data/DatasetDeliveryServlet.java
 (original)
+++ 
oodt/trunk/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/data/DatasetDeliveryServlet.java
 Thu Feb 17 22:41:49 2011
@@ -25,6 +25,7 @@ import org.apache.oodt.cas.filemgr.struc
 import org.apache.oodt.cas.filemgr.structs.exceptions.ConnectionException;
 import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
 import org.apache.oodt.cas.metadata.Metadata;
+import org.apache.oodt.cas.metadata.util.PathUtils;
 
 //JDK imports
 import java.io.File;
@@ -245,8 +246,13 @@ public class DatasetDeliveryServlet exte
     super.init(config);
 
     try {
-      String fileMgrURL = config.getServletContext().getInitParameter(
-          "filemgr.url");
+      String fileMgrURL = null;
+      try {
+        fileMgrURL = 
PathUtils.replaceEnvVariables(config.getServletContext().getInitParameter(
+            "filemgr.url") );
+      } catch (Exception e) {
+        throw new ServletException("Failed to get filemgr url : " + 
e.getMessage(), e);
+      }      
       if (fileMgrURL == null)
         fileMgrURL = "http://localhost:9000";;
       client = new XmlRpcFileManagerClient(new URL(fileMgrURL));

Modified: 
oodt/trunk/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rdf/RDFDatasetServlet.java
URL: 
http://svn.apache.org/viewvc/oodt/trunk/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rdf/RDFDatasetServlet.java?rev=1071821&r1=1071820&r2=1071821&view=diff
==============================================================================
--- 
oodt/trunk/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rdf/RDFDatasetServlet.java
 (original)
+++ 
oodt/trunk/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rdf/RDFDatasetServlet.java
 Thu Feb 17 22:41:49 2011
@@ -48,6 +48,7 @@ import org.apache.oodt.cas.filemgr.struc
 import org.apache.oodt.cas.filemgr.structs.exceptions.ConnectionException;
 import org.apache.oodt.cas.filemgr.structs.ProductType;
 import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
+import org.apache.oodt.cas.metadata.util.PathUtils;
 import org.apache.oodt.commons.xml.XMLUtils;
 
 /**
@@ -96,8 +97,14 @@ public class RDFDatasetServlet extends H
       throw new ServletException(e.getMessage());
     }
 
-    String fileManagerUrl = config.getServletContext().getInitParameter(
-        "filemgr.url");
+    String fileManagerUrl = null;
+    try {
+      fileManagerUrl = 
PathUtils.replaceEnvVariables(config.getServletContext().getInitParameter(
+          "filemgr.url") );
+    } catch (Exception e) {
+      throw new ServletException("Failed to get filemgr url : " + 
e.getMessage(), e);
+    }    
+    
     if (fileManagerUrl == null) {
       // try the default port
       fileManagerUrl = "http://localhost:9000";;

Modified: 
oodt/trunk/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rdf/RDFProductServlet.java
URL: 
http://svn.apache.org/viewvc/oodt/trunk/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rdf/RDFProductServlet.java?rev=1071821&r1=1071820&r2=1071821&view=diff
==============================================================================
--- 
oodt/trunk/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rdf/RDFProductServlet.java
 (original)
+++ 
oodt/trunk/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rdf/RDFProductServlet.java
 Thu Feb 17 22:41:49 2011
@@ -53,6 +53,7 @@ import org.apache.oodt.cas.filemgr.struc
 import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
 import org.apache.oodt.commons.xml.XMLUtils;
 import org.apache.oodt.cas.metadata.Metadata;
+import org.apache.oodt.cas.metadata.util.PathUtils;
 
 /**
  * 
@@ -101,8 +102,14 @@ public class RDFProductServlet extends H
       throw new ServletException(e.getMessage());
     }
 
-    String fileManagerUrl = config.getServletContext().getInitParameter(
-        "filemgr.url");
+    String fileManagerUrl = null;
+    try {
+      fileManagerUrl = 
PathUtils.replaceEnvVariables(config.getServletContext().getInitParameter(
+          "filemgr.url") );
+    } catch (Exception e) {
+      throw new ServletException("Failed to get filemgr url : " + 
e.getMessage(), e);
+    }
+    
     if (fileManagerUrl == null) {
       // try the default port
       fileManagerUrl = "http://localhost:9000";;

Modified: 
oodt/trunk/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rss/RSSProductServlet.java
URL: 
http://svn.apache.org/viewvc/oodt/trunk/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rss/RSSProductServlet.java?rev=1071821&r1=1071820&r2=1071821&view=diff
==============================================================================
--- 
oodt/trunk/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rss/RSSProductServlet.java
 (original)
+++ 
oodt/trunk/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rss/RSSProductServlet.java
 Thu Feb 17 22:41:49 2011
@@ -56,6 +56,7 @@ import org.apache.oodt.cas.filemgr.struc
 import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
 import org.apache.oodt.commons.xml.XMLUtils;
 import org.apache.oodt.cas.metadata.Metadata;
+import org.apache.oodt.cas.metadata.util.PathUtils;
 import org.apache.oodt.commons.util.DateConvert;
 
 /**
@@ -107,8 +108,13 @@ public class RSSProductServlet extends H
   public void init(ServletConfig config) throws ServletException {
     super.init(config);
 
-    String fileManagerUrl = config.getServletContext().getInitParameter(
-        "filemgr.url");
+    String fileManagerUrl;
+       try {
+               fileManagerUrl = 
PathUtils.replaceEnvVariables(config.getServletContext().getInitParameter(
+                   "filemgr.url") );
+       } catch (Exception e) {
+               throw new ServletException("Failed to get filemgr url : " + 
e.getMessage(), e);
+       }
     if (fileManagerUrl == null) {
       // try the default port
       fileManagerUrl = "http://localhost:9000";;

Modified: 
oodt/trunk/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rss/RSSProductTransferServlet.java
URL: 
http://svn.apache.org/viewvc/oodt/trunk/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rss/RSSProductTransferServlet.java?rev=1071821&r1=1071820&r2=1071821&view=diff
==============================================================================
--- 
oodt/trunk/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rss/RSSProductTransferServlet.java
 (original)
+++ 
oodt/trunk/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rss/RSSProductTransferServlet.java
 Thu Feb 17 22:41:49 2011
@@ -53,6 +53,7 @@ import org.apache.oodt.cas.filemgr.struc
 import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
 import org.apache.oodt.commons.xml.XMLUtils;
 import org.apache.oodt.cas.metadata.Metadata;
+import org.apache.oodt.cas.metadata.util.PathUtils;
 import org.apache.oodt.commons.util.DateConvert;
 
 /**
@@ -105,8 +106,13 @@ public class RSSProductTransferServlet e
     public void init(ServletConfig config) throws ServletException {
         super.init(config);
 
-        String fileManagerUrl = config.getServletContext().getInitParameter(
-                "filemgr.url");
+        String fileManagerUrl = null;
+        try {
+          fileManagerUrl = 
PathUtils.replaceEnvVariables(config.getServletContext().getInitParameter(
+              "filemgr.url") );
+        } catch (Exception e) {
+          throw new ServletException("Failed to get filemgr url : " + 
e.getMessage(), e);
+        }        
         if (fileManagerUrl == null) {
             // try the default port
             fileManagerUrl = "http://localhost:9000";;

Added: oodt/trunk/webapp/fmprod/src/main/webapp/META-INF/context.xml
URL: 
http://svn.apache.org/viewvc/oodt/trunk/webapp/fmprod/src/main/webapp/META-INF/context.xml?rev=1071821&view=auto
==============================================================================
--- oodt/trunk/webapp/fmprod/src/main/webapp/META-INF/context.xml (added)
+++ oodt/trunk/webapp/fmprod/src/main/webapp/META-INF/context.xml Thu Feb 17 
22:41:49 2011
@@ -0,0 +1,29 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more contributor
+license agreements.  See the NOTICE.txt 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.
+-->
+
+<Context path="/fmprod" docBase="/path/to/cas-product.war" debug="5"
+  reloadable="true" crossContext="true">
+
+  <Valve className="org.apache.catalina.valves.AccessLogValve"
+    prefix="fmprod_access_log." suffix=".txt" pattern="common" />
+
+  <Parameter name="filemgr.url" value="[FILEMGR_URL]" override="false" />
+  <Parameter name="filemgr.rdfconf.file" value="[FMPROD_HOME]/rdfconf.xml" 
override="false"/>
+  <Parameter name="filemgr.rssconf.file" value="[FMPROD_HOME]/rssconf.xml" 
override="false"/>
+  <Parameter name="filemgr.working.dir" value="/tmp" override="false" />
+
+</Context>


Reply via email to