final Account ldapAccount = sm.getAccount(accountName);
if(ldapAccount == null)
throw new XPathException("The Account '" + accountName + "' does not exist!");
try {
ldapRealm.refreshAccountFromLdap(ldapAccount);
} catch(PermissionDeniedException pde) {
throw new XPathException(this, pde);
} catch(AuthenticationException ae) {
throw new XPathException(this, ae);
}