camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r921409 - /camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultPackageScanClassResolver.java
Date Wed, 10 Mar 2010 15:46:53 GMT
Author: davsclaus
Date: Wed Mar 10 15:46:53 2010
New Revision: 921409

URL: http://svn.apache.org/viewvc?rev=921409&view=rev
Log:
CAMEL-2530: Restored WebLogic support for Camel which was broken due CAMEL-1917 from Camel
2.1 onwards. Added special check for Sonic ESB to package scan resolver.

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultPackageScanClassResolver.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultPackageScanClassResolver.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultPackageScanClassResolver.java?rev=921409&r1=921408&r2=921409&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultPackageScanClassResolver.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultPackageScanClassResolver.java
Wed Mar 10 15:46:53 2010
@@ -212,8 +212,6 @@ public class DefaultPackageScanClassReso
                     log.trace("Decoded urlPath: " + urlPath + " with protocol: " + url.getProtocol());
                 }
 
-                boolean isLocalFileSystem = "file".equals(url.getProtocol());
-
                 // If it's a file in a directory, trim the stupid file: spec
                 if (urlPath.startsWith("file:")) {
                     // file path can be temporary folder which uses characters that the URLDecoder
decodes wrong
@@ -229,7 +227,6 @@ public class DefaultPackageScanClassReso
                     if (urlPath.startsWith("file:")) {
                         urlPath = urlPath.substring(5);
                     }
-                    isLocalFileSystem = true;
                 }
 
                 // osgi bundles should be skipped
@@ -244,7 +241,6 @@ public class DefaultPackageScanClassReso
                 }
 
                 if (log.isTraceEnabled()) {
-                    log.trace("isLocalFileSystem: " + isLocalFileSystem);
                     log.trace("Scanning for classes in [" + urlPath + "] matching criteria:
" + test);
                 }
 
@@ -256,8 +252,10 @@ public class DefaultPackageScanClassReso
                     loadImplementationsInDirectory(test, packageName, file, classes);
                 } else {
                     InputStream stream;
-                    if (!isLocalFileSystem) {
-                        // load resources using http (and other protocols) such as java webstart
+                    if (urlPath.startsWith("http:") || urlPath.startsWith("https:")
+                            || urlPath.startsWith("sonicfs:")) {
+                        // load resources using http/https
+                        // sonic ESB requires to be loaded using a regular URLConnection
                         if (log.isTraceEnabled()) {
                             log.trace("Loading from jar using http/https: " + urlPath);
                         }



Mime
View raw message