Set possibleUsers = subject.getPrincipals(RealmRole.class);
Iterator itr = possibleUsers.iterator();
while (itr.hasNext())
{
RealmRole role = (RealmRole) itr.next();
Realm realm = role.getRealm();
String realmFullName = realm.getFullName();
String roleSimpleName = role.getName();
if ((realmFullName.length() > 0) &&
roleSimpleName.startsWith(realmFullName))
{
// Format is "<realm full name>\<role name>"