summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/extension-helper
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2008-08-15 09:43:16 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2008-08-15 09:43:16 +0000
commit7c66d5dff2273acf4d32da658d6ac5d59b9f20a7 (patch)
tree2d45e104df0cade3514367a290669fe48526cac2 /java/sca/modules/extension-helper
parente7b0ee0d6edfe9aa70d282f77bd809bba632108e (diff)
TUSCANY-2539 Turn of jar caching for URLconnection and port service discovery over to use URLConnetion to open streams. Prevents Tuscany from holding the stream open for Jar contributions
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@686185 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/extension-helper')
-rw-r--r--java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/extension/helper/utils/ResourceHelper.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/extension/helper/utils/ResourceHelper.java b/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/extension/helper/utils/ResourceHelper.java
index efa84c6816..4e7965ce60 100644
--- a/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/extension/helper/utils/ResourceHelper.java
+++ b/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/extension/helper/utils/ResourceHelper.java
@@ -24,6 +24,7 @@ import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.net.URL;
+import java.net.URLConnection;
/**
* TODO: Shouldn't this be using the contribution service?
@@ -36,7 +37,9 @@ public class ResourceHelper {
InputStream is;
try {
- is = scriptSrcUrl.openStream();
+ URLConnection connection = scriptSrcUrl.openConnection();
+ connection.setUseCaches(false);
+ is = connection.getInputStream();
} catch (IOException e) {
throw new RuntimeException(e);
}