Example usage for java.security Policy refresh

List of usage examples for java.security Policy refresh

Introduction

In this page you can find the example usage for java.security Policy refresh.

Prototype

public void refresh() 

Source Link

Document

Refreshes/reloads the policy configuration.

Usage

From source file:org.apache.catalina.loader.WebappClassLoader.java

/**
 * Refresh the system policy file, to pick up eventual changes.
 *///  w ww  .  j a  va2s. com
protected void refreshPolicy() {

    try {
        // The policy file may have been modified to adjust 
        // permissions, so we're reloading it when loading or 
        // reloading a Context
        Policy policy = Policy.getPolicy();
        policy.refresh();
    } catch (AccessControlException e) {
        // Some policy files may restrict this, even for the core,
        // so this exception is ignored
    }

}