Package netscape.ldap

Examples of netscape.ldap.LDAPConnection.disconnect()


      for (i = 0; results.hasMoreElements(); i++) {
    shove(hr.request.props, name + i + ".", results.next(), attrs);
    sb.append(i).append(' ');
      }

      ld.disconnect();
  } catch (LDAPException e) {
      hr.request.props.put(name + "error", e.errorCodeToString());
      hr.request.props.put(name + "errorCode", "" +e.getLDAPResultCode());
      System.out.println("LDAP error: " + e);
  } finally {
View Full Code Here


      System.out.println("LDAP error: " + e);
  } finally {
      hr.request.props.put(name + "rows", sb.toString().trim());
      hr.request.props.put(name + "rowcount", "" + i);
      try {
    ld.disconnect();
      } catch (Exception e) {}
  }
    }

    private static void
View Full Code Here

                System.out.println(myEntry);
                ld.add(myEntry);
            }

            ld.disconnect();
        } catch (LDAPException e) {
            hr.request.props.put(name + "error", e.errorCodeToString());

            if (e.getLDAPResultCode() != LDAPException.NO_SUCH_OBJECT) {
                e.printStackTrace();
View Full Code Here

                e.printStackTrace();
            }
        }
        finally {
            try {
                ld.disconnect();
            } catch (Exception e) {}
        }
    }

    /**
 
View Full Code Here

        catch ( LDAPException le )
        {
           
        }
       
        conn.disconnect();
    }
   
   
    public static LdapContext getContext( String principalDn, DirectoryService service, String dn )
    throws Exception
View Full Code Here

        assertEquals( "ldap://foo:10389/ou=UnderReferral,ou=Computers,uid=akarasulu,ou=users,ou=system",
            response.getReferrals()[1] );
        assertEquals( "ldap://bar:10389/ou=UnderReferral,ou=Computers,uid=akarasulu,ou=users,ou=system",
            response.getReferrals()[2] );

        conn.disconnect();
    }

   
    /**
     * Tests add operation on normal and referral entries without the
View Full Code Here

        assertEquals( "ldap://localhost:10389/ou=UnderReferral,uid=akarasulu,ou=users,ou=system", response.getReferrals()[0] );
        assertEquals( "ldap://foo:10389/ou=UnderReferral,uid=akarasulu,ou=users,ou=system", response.getReferrals()[1] );
        assertEquals( "ldap://bar:10389/ou=UnderReferral,uid=akarasulu,ou=users,ou=system", response.getReferrals()[2] );

        conn.disconnect();
    }
   
   
    /**
     * Tests add operation on normal and referral entries without the
View Full Code Here

        }
        catch ( Exception e )
        {
            try
            {
                conn.disconnect();
            }
            catch ( Exception e2 )
            {
            }
View Full Code Here

        }

        // At this point, all tests have passed.  Close the connection and return true.
        try
        {
            conn.disconnect();
        }
        catch ( Exception e )
        {
        }
View Full Code Here

        catch ( LDAPException e )
        {
            assertEquals( ResultCodeEnum.NO_SUCH_OBJECT.getValue(), e.getLDAPResultCode() );
        }
       
        conn.disconnect();
    }
   
   
    /**
     * Tests delete operation on normal and referral entries without the
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.