Package javax.naming.ldap

Examples of javax.naming.ldap.LdapContext.createSubcontext()


                    // use "throw" as we handle referrals manually
                    modCtx.addToEnvironment( Context.REFERRAL, REFERRAL_THROW );

                    // create entry
                    modCtx.createSubcontext( getSaveJndiName( dn ), attributes );
                }
                catch ( ReferralException re )
                {
                    logModifycation = false;
                    try
View Full Code Here


            Attributes attrs = e.getValue();
            try
            {
               try
               {
                  ctx.createSubcontext(name, attrs).close();
               }
               catch (CommunicationException e1)
               {
                  // release the previous context
                  release(ctx);
View Full Code Here

                  // release the previous context
                  release(ctx);
                  // create new LDAP context
                  ctx = getLdapContext(true);
                  // try repeat operation where communication error occurs
                  ctx.createSubcontext(name, attrs).close();
               }
               catch (ServiceUnavailableException e2)
               {
                  // release the previous context
                  release(ctx);
View Full Code Here

                  // release the previous context
                  release(ctx);
                  // do the same as for CommunicationException
                  ctx = getLdapContext(true);
                  //
                  ctx.createSubcontext(name, attrs).close();
               }
            }
            catch (Exception e3)
            {
               // Catch all exceptions here.
View Full Code Here

                  if (broadcast)
                  {
                     preSave(mt, true);
                  }

                  ctx.createSubcontext(membershipTypeDN, ldapAttrMapping.membershipTypeToAttributes(mt)).close();

                  if (broadcast)
                  {
                     postSave(mt, true);
                  }
View Full Code Here

               // if not found
               if (attrs == null)
               {
                  if (broadcast)
                     preSave(m, true);
                  ctx.createSubcontext(membershipDN, ldapAttrMapping.membershipToAttributes(m, userDN)).close();
                  if (broadcast)
                     postSave(m, true);
                  cacheHandler.put(cacheHandler.getMembershipKey(m), m, CacheType.MEMBERSHIP);
                  return;
               }
View Full Code Here

            try
            {
               if (broadcast)
                  preSave(user, true);
               // see comments about saving password below
               ctx.createSubcontext(userDN, attrs).close();
               if (broadcast)
                  postSave(user, true);

               cacheHandler.put(user.getUserName(), user, CacheType.USER);
               break;
View Full Code Here

         {
            try
            {
               if (broadcast)
                  preSave(user, true);
               ctx.createSubcontext(userDN, attrs).close();
               if (broadcast)
                  postSave(user, true);

               cacheHandler.put(user.getUserName(), user, CacheType.USER);
               break;
View Full Code Here

               catch (NameNotFoundException e)
               {
                  if (broadcast)
                     preSave(profile, true);

                  ctx.createSubcontext(profileDN, ldapAttrMapping.profileToAttributes(profile)).close();

                  if (broadcast)
                     postSave(profile, true);
                 
                  return;
View Full Code Here

               if (broadcast)
               {
                  preSave(group, true);
               }

               ctx.createSubcontext(groupDN, ldapAttrMapping.groupToAttributes(child)).close();
               cacheHandler.put(child.getId(), group, CacheType.GROUP);

               if (broadcast)
               {
                  postSave(group, true);
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.