Closed nhanth87 closed 8 years ago
True about confusing pieces of code, there're a lot of references to USSD, for example in GmlcManagement.java:
protected static final String USSD_PERSIST_DIR_KEY = "gmlc.persist.dir";
public void start() throws Exception {
this.gmlcPropertiesManagement = GmlcPropertiesManagement.getInstance(this.name);
this.gmlcPropertiesManagement.setPersistDir(this.persistDir);
this.gmlcPropertiesManagement.start();
// Register the MBeans
this.mbeanServer = MBeanServerLocator.locateJBoss();
ObjectName ussdPropObjNname = new ObjectName(GmlcManagement.JMX_DOMAIN + ":name=GmlcPropertiesManagement");
StandardMBean ussdPropMxBean = new StandardMBean(this.gmlcPropertiesManagement,
GmlcPropertiesManagementMBean.class, true);
this.mbeanServer.registerMBean(ussdPropMxBean, ussdPropObjNname);
logger.info("Started GMLC Management");
}
public void stop() throws Exception {
this.gmlcPropertiesManagement.stop();
if (this.mbeanServer != null) {
ObjectName ussdPropObjNname = new ObjectName(GmlcManagement.JMX_DOMAIN + ":name=GmlcPropertiesManagement");
this.mbeanServer.unregisterMBean(ussdPropObjNname);
}
}
Resolved by PR #68
In GMLC code, there're many place that hard coded and confuse function name, we must refactory to easy read.
Example: convertAddressFieldToSCCPAddress() and getServiceCenterSccpAddress() --> getMSCAddress, getGMLCAddress()
RequestedInfo requestedInfo = new RequestedInfoImpl(true, true, null, false, null, false, false, false); --> should clarify which's true, true and false..
BR, TN