Skip to content

Instantly share code, notes, and snippets.

@arockwell
Created March 27, 2009 19:33
Show Gist options
  • Select an option

  • Save arockwell/86845 to your computer and use it in GitHub Desktop.

Select an option

Save arockwell/86845 to your computer and use it in GitHub Desktop.
private List<String> findRoles(final String username) {
List<String> roleNames = new ArrayList<String>();
try {
Context context = new InitialContext();
HousingIdentityService identityService =
(HousingIdentityService) context.lookup("java:comp/env/ejb/HousingIdentityServiceImpl/local");
roleNames = identityService.getRoles(username);
} catch (Exception e) {
logger.error("Problem retrieving roles: " + e.getMessage());
throw new RuntimeException(e);
}
return roleNames;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment