| | |
| | | if (isLocal) |
| | | { |
| | | usedHostPort = info.getAdminConnectorHostPort(); |
| | | conn = Utilities.getAdminDirContext(info, bindDn, bindPwd); |
| | | conn = Utilities.getAdminConnection(info, bindDn, bindPwd); |
| | | } |
| | | else |
| | | { |
| | |
| | | closeInfoConnections(); |
| | | info.setIsLocal(isLocal); |
| | | info.setConnection(conn); |
| | | info.setUserDataDirContext(null); |
| | | info.setUserDataConnection(null); |
| | | info.regenerateDescriptor(); |
| | | return conn; |
| | | } catch (Throwable t) |
| | |
| | | private void closeInfoConnections() |
| | | { |
| | | StaticUtils.close(getInfo().getConnection()); |
| | | StaticUtils.close(getInfo().getUserDataDirContext()); |
| | | StaticUtils.close(getInfo().getUserDataConnection()); |
| | | } |
| | | } |