/**
* Section 3.1.5.1
*/
for (int i = 0; i < methodPermissions.length; i++) {
MethodPermissionType methodPermission = methodPermissions[i];
MethodType[] methods = methodPermission.getMethodArray();
for (int j = 0; j < methods.length; j++) {
MethodType method = methods[j];
EJBMethodPermission permission = new EJBMethodPermission(method.getEjbName().getStringValue(),
method.getMethodName().getStringValue(),
method.getMethodIntf().getStringValue(),
toStringArray(method.getMethodParams().getMethodParamArray()));
try {
if (methodPermission.getUnchecked() != null) {
configuration.addToUncheckedPolicy(permission);
} else {
RoleNameType[] roleNames = methodPermission.getRoleNameArray();
for (int k = 0; k < roleNames.length; k++) {
configuration.addToRole(roleNames[k].getStringValue(), permission);
}
}