axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r811000 - /webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/catalog/impl/OASISCatalogManager.java
Date Thu, 03 Sep 2009 15:42:24 GMT
Author: rott
Date: Thu Sep  3 15:42:24 2009
New Revision: 811000

URL: http://svn.apache.org/viewvc?rev=811000&view=rev
Log:
getResource call should be wrapped in doPriv to support java2security

Modified:
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/catalog/impl/OASISCatalogManager.java

Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/catalog/impl/OASISCatalogManager.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/catalog/impl/OASISCatalogManager.java?rev=811000&r1=810999&r2=811000&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/catalog/impl/OASISCatalogManager.java
(original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/catalog/impl/OASISCatalogManager.java
Thu Sep  3 15:42:24 2009
@@ -159,7 +159,15 @@
             return url.toString();
         }
         // have not returned -- perhaps we're in an EJB?
-        url = classLoader.getResource(DEFAULT_CATALOG_EJB);
+        try {
+            final ClassLoader privClassLoader = classLoader;
+            url = (URL)AccessController.doPrivileged(new PrivilegedExceptionAction() {
+                public Object run() throws Exception {
+                    return privClassLoader.getResource(DEFAULT_CATALOG_EJB);
+                }});
+        } catch (PrivilegedActionException pae) {
+            throw ExceptionFactory.makeWebServiceException(pae.getException());
+        }
         return url == null? null: url.toString();
 
     }



Mime
View raw message