| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin; |
| | | |
| | |
| | | } |
| | | |
| | | // Get the IP address of the local host. |
| | | String hostName = ""; |
| | | String hostName; |
| | | try |
| | | { |
| | | hostName = java.net.InetAddress.getLocalHost().getCanonicalHostName(); |
| | |
| | | } |
| | | |
| | | // Look for a local server with the Ldap Port. |
| | | InternalSearchOperation op = null; |
| | | String attrName = "hostname"; |
| | | AttributeType hostnameType = DirectoryServer.getAttributeType(attrName); |
| | | if (hostnameType == null) |
| | |
| | | } |
| | | try |
| | | { |
| | | op = internalConnection.processSearch("cn=Servers,cn=admin data", |
| | | InternalSearchOperation op = internalConnection.processSearch( |
| | | "cn=Servers,cn=admin data", |
| | | SearchScope.SINGLE_LEVEL, "objectclass=*"); |
| | | if (op.getResultCode() == ResultCode.SUCCESS) |
| | | { |