URL furl = new URL("file:" + policyFilename);
if (logger.isLoggable(Level.FINE)){
logger.fine("Loading policy from " + furl);
}
PolicyFile pf = new PolicyFile(furl);
CodeSource cs = new CodeSource(new URL(EJB_TYPE_CODESOURCE), (Certificate[])null );
PermissionCollection pc = pf.getPermissions(cs);
policyMap.put(CommponentType.ejb, pc);
if (logger.isLoggable(Level.FINE)){
logger.fine("Loaded EJB policy = " + pc);
}
cs = new CodeSource(new URL(WEB_TYPE_CODESOURCE), (Certificate[])null );
pc = pf.getPermissions(cs);
policyMap.put(CommponentType.war, pc);
if (logger.isLoggable(Level.FINE)){
logger.fine("Loaded WEB policy =" + pc);
}
cs = new CodeSource(new URL(RAR_TYPE_CODESOURCE), (Certificate[])null );
pc = pf.getPermissions(cs);
policyMap.put(CommponentType.rar, pc);
if (logger.isLoggable(Level.FINE)){
logger.fine("Loaded rar policy =" + pc);
}
cs = new CodeSource(new URL(CLIENT_TYPE_CODESOURCE), (Certificate[])null );
pc = pf.getPermissions(cs);
policyMap.put(CommponentType.car, pc);
if (logger.isLoggable(Level.FINE)){
logger.fine("Loaded car policy =" + pc);
}
cs = new CodeSource(new URL(EAR_TYPE_CODESOURCE), (Certificate[])null );
pc = pf.getPermissions(cs);
policyMap.put(CommponentType.ear, pc);
if (logger.isLoggable(Level.FINE)){
logger.fine("Loaded ear policy =" + pc);
}