abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r629146 - in /incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/managed: CollectionAdapterConfiguration.java Configuration.java
Date Tue, 19 Feb 2008 16:28:02 GMT
Author: jmsnell
Date: Tue Feb 19 08:27:59 2008
New Revision: 629146

URL: http://svn.apache.org/viewvc?rev=629146&view=rev
Log:
per https://issues.apache.org/jira/browse/ABDERA-126

load the feed config file using the context class loader 

Modified:
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/managed/CollectionAdapterConfiguration.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/managed/Configuration.java

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/managed/CollectionAdapterConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/managed/CollectionAdapterConfiguration.java?rev=629146&r1=629145&r2=629146&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/managed/CollectionAdapterConfiguration.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/managed/CollectionAdapterConfiguration.java
Tue Feb 19 08:27:59 2008
@@ -17,8 +17,8 @@
 */
 package org.apache.abdera.protocol.server.provider.managed;
 
-import java.io.FileInputStream;
 import java.io.IOException;
+import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.Reader;
 
@@ -34,7 +34,7 @@
       this.serverConfiguration = serverConfiguration;
   }
 
-  public FileInputStream getConfigAsFileInputStream() 
+  public InputStream getConfigAsFileInputStream() 
     throws IOException {
       String filePath
         = serverConfiguration.getAdapterConfigLocation() + fileLocation;

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/managed/Configuration.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/managed/Configuration.java?rev=629146&r1=629145&r2=629146&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/managed/Configuration.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/managed/Configuration.java
Tue Feb 19 08:27:59 2008
@@ -19,6 +19,7 @@
 
 import java.io.FileInputStream;
 import java.io.IOException;
+import java.io.InputStream;
 import java.util.Properties;
 
 public abstract class Configuration {
@@ -31,10 +32,12 @@
     return props;
   }
 
-  static FileInputStream loadFileAsInputStream(
+  static InputStream loadFileAsInputStream(
     String fileLocation)
       throws IOException {
-    return new FileInputStream(fileLocation);
+    return Thread.currentThread()
+    	.getContextClassLoader()
+    	.getResourceAsStream(fileLocation);
   }
 
   static String getProperty(



Mime
View raw message