final String policyProvider = SystemInstance.get().getOptions().get("javax.security.jacc.policy.provider", JaccProvider.Policy.class.getName());
try {
final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
final Class policyClass = Class.forName(policyProvider, true, classLoader);
final Policy policy = (Policy) policyClass.newInstance();
policy.refresh();
Policy.setPolicy(policy);
} catch (final Exception e) {
throw new IllegalStateException("Could not install JACC Policy Provider: " + policyProvider, e);
}
}