protected function addRole($groupName, $name)
    {

        // load the application
        $application = RequestHandler::getApplicationContext();

        // query whether or not, the group already exists
        if ($this->setsMap->exists($groupName) === false) {
            $group = new SimpleGroup(new String($groupName));
            $this->setsMap->add($groupName, $group);
        } else {
            $group = $this->setsMap->get($groupName);
        }

        try {
            // finally add the identity to the group
            $group->addMember($this->createIdentity(new String($name)));

        } catch (\Exception $e) {
            $application->getNamingDirectory()
                        ->search(NamingDirectoryKeys::SYSTEM_LOGGER)
                        ->error($e->__toString());
        }
    }