Author: ron.sigal(a)jboss.com
Date: 2008-05-21 23:40:07 -0400 (Wed, 21 May 2008)
New Revision: 4215
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/web/WebServerInvoker.java
Log:
JBREM-978: Moved classloader retrieval to SecurityUtility.
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/web/WebServerInvoker.java
===================================================================
---
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/web/WebServerInvoker.java 2008-05-22
03:39:24 UTC (rev 4214)
+++
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/web/WebServerInvoker.java 2008-05-22
03:40:07 UTC (rev 4215)
@@ -33,6 +33,7 @@
import org.jboss.remoting.InvokerLocator;
import org.jboss.remoting.ServerInvoker;
import org.jboss.remoting.transport.http.HTTPMetadataConstants;
+import org.jboss.remoting.util.SecurityUtility;
import org.jboss.remoting.marshal.MarshalFactory;
import org.jboss.remoting.marshal.Marshaller;
import org.jboss.remoting.marshal.UnMarshaller;
@@ -99,14 +100,7 @@
public UnMarshaller getUnMarshaller()
{
- ClassLoader classLoader = (ClassLoader) AccessController.doPrivileged( new
PrivilegedAction()
- {
- public Object run()
- {
- return WebServerInvoker.class.getClassLoader();
- }
- });
-
+ ClassLoader classLoader = SecurityUtility.getClassLoader(WebServerInvoker.class);
UnMarshaller unmarshaller = MarshalFactory.getUnMarshaller(getLocator(),
classLoader);
if(unmarshaller == null)
{
@@ -117,16 +111,8 @@
public Marshaller getMarshaller()
{
- ClassLoader classLoader = (ClassLoader) AccessController.doPrivileged( new
PrivilegedAction()
- {
- public Object run()
- {
- return WebServerInvoker.class.getClassLoader();
- }
- });
-
+ ClassLoader classLoader = SecurityUtility.getClassLoader(WebServerInvoker.class);
Marshaller marshaller = MarshalFactory.getMarshaller(getLocator(), classLoader);
-
if(marshaller == null)
{
marshaller = MarshalFactory.getMarshaller(getDataType(),
getSerializationType());