Author: clebert.suconic(a)jboss.com
Date: 2011-11-21 09:15:17 -0500 (Mon, 21 Nov 2011)
New Revision: 11724
Modified:
branches/Branch_2_2_AS7/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
Log:
We still need AccessController
Modified:
branches/Branch_2_2_AS7/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
===================================================================
---
branches/Branch_2_2_AS7/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java 2011-11-19
09:16:22 UTC (rev 11723)
+++
branches/Branch_2_2_AS7/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java 2011-11-21
14:15:17 UTC (rev 11724)
@@ -318,8 +318,14 @@
{
throw new IllegalStateException("Please specify a load balancing policy
class name on the session factory");
}
-
- loadBalancingPolicy = (ConnectionLoadBalancingPolicy)
ClassloadingUtil.newInstanceFromClassLoader(connectionLoadBalancingPolicyClassName);
+ AccessController.doPrivileged(new PrivilegedAction<Object>()
+ {
+ public Object run()
+ {
+ loadBalancingPolicy =
(ConnectionLoadBalancingPolicy)ClassloadingUtil.newInstanceFromClassLoader(connectionLoadBalancingPolicyClassName);
+ return null;
+ }
+ });
}
private synchronized void initialise() throws HornetQException