Author: richard.opalka(a)jboss.com
Date: 2011-06-30 06:19:05 -0400 (Thu, 30 Jun 2011)
New Revision: 14643
Modified:
common/trunk/src/main/java/org/jboss/ws/common/utils/JBossWSEntityResolver.java
Log:
allow for schemas/dtds lookup in custom classloader
Modified: common/trunk/src/main/java/org/jboss/ws/common/utils/JBossWSEntityResolver.java
===================================================================
---
common/trunk/src/main/java/org/jboss/ws/common/utils/JBossWSEntityResolver.java 2011-06-29
14:38:53 UTC (rev 14642)
+++
common/trunk/src/main/java/org/jboss/ws/common/utils/JBossWSEntityResolver.java 2011-06-30
10:19:05 UTC (rev 14643)
@@ -151,6 +151,26 @@
return inputSource;
}
+
+ protected InputStream loadClasspathResource(String resource, boolean trace)
+ {
+ InputStream is = super.loadClasspathResource(resource, trace);
+ if (is == null)
+ {
+ final ClassLoader origLoader = SecurityActions.getContextClassLoader();
+ try
+ {
+
SecurityActions.setContextClassLoader(ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader());
+ is = super.loadClasspathResource(resource, trace);
+ }
+ finally
+ {
+ SecurityActions.setContextClassLoader(origLoader);
+ }
+ }
+
+ return is;
+ }
/** Use a ResourceURL to access the resource.
* This method should be protected in the super class. */