summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.3.1/modules/extensibility
diff options
context:
space:
mode:
Diffstat (limited to 'branches/sca-java-1.3.1/modules/extensibility')
-rw-r--r--branches/sca-java-1.3.1/modules/extensibility/src/main/java/org/apache/tuscany/sca/extensibility/ServiceDiscovery.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/branches/sca-java-1.3.1/modules/extensibility/src/main/java/org/apache/tuscany/sca/extensibility/ServiceDiscovery.java b/branches/sca-java-1.3.1/modules/extensibility/src/main/java/org/apache/tuscany/sca/extensibility/ServiceDiscovery.java
index 45a4494f24..3e702ea5db 100644
--- a/branches/sca-java-1.3.1/modules/extensibility/src/main/java/org/apache/tuscany/sca/extensibility/ServiceDiscovery.java
+++ b/branches/sca-java-1.3.1/modules/extensibility/src/main/java/org/apache/tuscany/sca/extensibility/ServiceDiscovery.java
@@ -24,6 +24,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
+import java.net.URLConnection;
import java.security.AccessController;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
@@ -263,6 +264,13 @@ public class ServiceDiscovery {
try {
is = AccessController.doPrivileged(new PrivilegedExceptionAction<InputStream>() {
public InputStream run() throws IOException {
+ URLConnection connection = url.openConnection();
+ // TUSCANY-2539
+ // Don't cache connections by default to stop Tuscany locking contribution jar files
+ // done here as this is one of the first places we open a stream and the only way to
+ // set the default is to set it on an instance of URLConnection
+ connection.setDefaultUseCaches(false);
+ connection.setUseCaches(false);
return url.openStream();
}
});