String name = host.getName();
String hostName = host.getHost();
// For LOCAL/EMBEDDED Clustered instances and
// standalone server instances, use
// their nodeagent's hostname as the jms host name.
ServerContext serverContext = ApplicationServer.getServerContext();
Server server = serverContext.getConfigBean();
if (overridedHostName != null && !overridedHostName.trim().equals("")) {
hostName = overridedHostName;
}
String port = host.getPort();