if (getContext().getServerType() == null) {
log("Warning! serverType not specified or unrecognized type. Defaulting to WebLogic.");
getContext().setServerType("weblogic");
}
JMXConnector jmxServer = org.apache.tools.ant.taskdefs.optional.jmx.connector.JMXConnectorFactory.createConnector(getContext().getServerType());
java.util.Hashtable properties = jmxServer.getInitialContextProperties(providerUrl,user,password);
return new javax.naming.InitialContext(properties);
} catch (Exception e) {
e.printStackTrace();