private boolean needToConvertMethodContainerTransactions() { if (this.getEjbBundleDescriptor() != null) { for (Enumeration e = this.getMethodContainerTransactions().keys(); e.hasMoreElements();) { MethodDescriptor md = (MethodDescriptor) e.nextElement(); if (!md.isExact()) { return true; } } } return false; }
private boolean needToConvertMethodContainerTransactions() { if (this.getEjbBundleDescriptor() != null) { for (Enumeration e = this.getMethodContainerTransactions().keys(); e.hasMoreElements();) { MethodDescriptor md = (MethodDescriptor) e.nextElement(); if (!md.isExact()) { return true; } } } return false; }
next.setEjbName(ejbDescriptor.getName()); if (!next.isExact()) {
/** * Add a new method permission to a method or a set of methods * * @param mp is the new method permission to assign * @param md describe the method or set of methods this permission apply to */ public void addPermissionedMethod(MethodPermission mp, MethodDescriptor md) { if (getEjbBundleDescriptor() == null) { throw new IllegalArgumentException(localStrings.getLocalString( "enterprise.deployment.exceptioncannotaddrolesdescriptor", "Cannot add roles when the descriptor is not part of a bundle")); } if (mp.isRoleBased()) { if (!getEjbBundleDescriptor().getRoles().contains(mp.getRole())) { throw new IllegalArgumentException(localStrings.getLocalString( "enterprise.deployment.exceptioncannotaddrolesbundle", "Cannot add roles when the bundle does not have them")); } } if (md.isExact()) { updateMethodPermissionForMethod(mp, md); } else { addMethodPermissionForStyledMethodDescriptor(mp, md); } saveMethodPermissionFromDD(mp, md); }
/** * Add a new method permission to a method or a set of methods * * @param mp is the new method permission to assign * @param md describe the method or set of methods this permission apply to */ public void addPermissionedMethod(MethodPermission mp, MethodDescriptor md) { if (getEjbBundleDescriptor() == null) { throw new IllegalArgumentException(localStrings.getLocalString( "enterprise.deployment.exceptioncannotaddrolesdescriptor", "Cannot add roles when the descriptor is not part of a bundle")); } if (mp.isRoleBased()) { if (!getEjbBundleDescriptor().getRoles().contains(mp.getRole())) { // Check for the any authenticated user role '**' as this role // will be implicitly defined when not listed as a security-role if (!"**".equals(mp.getRole().getName())) { throw new IllegalArgumentException(localStrings.getLocalString( "enterprise.deployment.exceptioncannotaddrolesbundle", "Cannot add roles when the bundle does not have them")); } } } if (md.isExact()) { updateMethodPermissionForMethod(mp, md); } else { addMethodPermissionForStyledMethodDescriptor(mp, md); } saveMethodPermissionFromDD(mp, md); }