}
org.apache.axis2.clustering.Member member =
new org.apache.axis2.clustering.Member(localMemberHost,
localMemberPort);
Properties memberInfo = new Properties();
AxisConfiguration axisConfig = configurationContext.getAxisConfiguration();
TransportInDescription httpTransport = axisConfig.getTransportIn("http");
int portOffset = 0;
Parameter param = getParameter(ClusteringConstants.Parameters.AVOID_INITIATION);
if (param != null && !JavaUtils.isTrueExplicitly(param.getValue())) {
//AvoidInitialization = false, Hence we set the portOffset
if (System.getProperty("portOffset") != null) {
portOffset = Integer.parseInt(System.getProperty("portOffset"));
}
}
if (httpTransport != null) {
Parameter port = httpTransport.getParameter("port");
if (port != null) {
int httpPort = Integer.valueOf((String) port.getValue()) + portOffset;
member.setHttpPort(httpPort);
}
}
TransportInDescription httpsTransport = axisConfig.getTransportIn("https");
if (httpsTransport != null) {
Parameter port = httpsTransport.getParameter("port");
if (port != null) {
int httpsPort = Integer.valueOf((String) port.getValue()) + portOffset;
member.setHttpsPort(httpsPort);