Author: ron.sigal(a)jboss.com
Date: 2008-05-13 00:51:44 -0400 (Tue, 13 May 2008)
New Revision: 4175
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java
Log:
JBREM-978: Put protocolHandler init() and start() in an AccessController.doPriviliged()
call.
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java
===================================================================
---
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java 2008-05-13
04:50:37 UTC (rev 4174)
+++
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java 2008-05-13
04:51:44 UTC (rev 4175)
@@ -250,7 +250,7 @@
{
try
{
- ProtocolHandler protocolHandler = (ProtocolHandler)
protocolHandlers.get(i);
+ final ProtocolHandler protocolHandler = (ProtocolHandler)
protocolHandlers.get(i);
Home home = (Home) getHomes().get(i);
setProperty(protocolHandler, "address", home.host);
setProperty(protocolHandler, "port", "" + home.port);
@@ -269,8 +269,22 @@
setProperty(protocolHandler, "SocketFactory",
RemotingServerSocketFactory.class.getName());
}
- protocolHandler.init();
- protocolHandler.start();
+ try
+ {
+ AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ protocolHandler.init();
+ protocolHandler.start();
+ return null;
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (Exception) e.getCause();
+ }
running = true;
Show replies by date