Skip to content

Instantly share code, notes, and snippets.

@soapplied
Last active December 19, 2015 01:38
Show Gist options
  • Save soapplied/5876788 to your computer and use it in GitHub Desktop.
Save soapplied/5876788 to your computer and use it in GitHub Desktop.
AdminClient connect
Properties props = new Properties();
props.put(AdminClient.CONNECTOR_TYPE,AdminClient.CONNECTOR_TYPE_SOAP);
props.put(AdminClient.CONNECTOR_HOST, hostname);
props.put(AdminClient.CONNECTOR_PORT, port);
props.put(AdminClient.USERNAME, username);
props.put(AdminClient.PASSWORD, password);
props.put(AdminClient.CONNECTOR_SECURITY_ENABLED, "true");
props.put("javax.net.ssl.trustStore", trustStoreLocation);
props.put("javax.net.ssl.trustStoreType", "JKS");
props.put("javax.net.ssl.keyStore", keyStoreLocation);
props.put("javax.net.ssl.keyStoreType", "JKS");
props.put("javax.net.ssl.keyStorePassword", keyStorePassword);
props.put("javax.net.ssl.trustStorePassword", trustStorePassword);
props.put(AdminClient.CACHE_DISABLED, "false");
AdminClient server = AdminClientFactory.createAdminClient(props);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment