private void addMissingMethodPermissions(BeanMetaData bean, boolean exclude, Class iface, InvocationType type, PolicyConfiguration pc) throws PolicyContextException { String ejbName = bean.getEjbName(); HashSet tmp = new HashSet(); getInterfaces(iface, tmp); Class[] ifaces = new Class[tmp.size()]; tmp.toArray(ifaces); for (int n = 0; n < ifaces.length; n++) { Class c = ifaces[n]; Method[] methods = c.getDeclaredMethods(); for (int m = 0; m < methods.length; m++) { String methodName = methods[m].getName(); Class[] params = methods[m].getParameterTypes(); // See if there is a method-permission if (bean.hasMethodPermission(methodName, params, type)) continue; // Create a permission for the missing method-permission EJBMethodPermission p = new EJBMethodPermission(ejbName, type.toInterfaceString(), methods[m]); if (exclude) pc.addToExcludedPolicy(p); else pc.addToUncheckedPolicy(p); } } }