Examples of DirectoryServerManagerException


Examples of org.wso2.carbon.directory.server.manager.DirectoryServerManagerException

        DirContext dirContext;
        try {
            dirContext = this.connectionSource.getContext();
        } catch (UserStoreException e) {
            throw new DirectoryServerManagerException("Unable to retrieve directory connection.", e);
        }

        String searchBase = this.realmConfiguration.getUserStoreProperty(LDAPConstants.USER_SEARCH_BASE);

        String userId = lookupUserId(serverName);

        if (userId == null) {
            throw new DirectoryServerManagerException("Could not find user id for given server principle " +
                    serverName);
        }

        try {
            dirContext = (DirContext) dirContext.lookup(searchBase);
            dirContext.unbind("uid=" + userId);

        } catch (NamingException e) {
            log.error("Could not remove service principle " + serverName, e);
            throw new DirectoryServerManagerException("Could not remove service principle " + serverName, e);
        } finally {
            try {
                JNDIUtil.closeContext(dirContext);
            } catch (UserStoreException e) {
                log.error("Unable to close directory context.", e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.