use of com.sun.messaging.jmq.jmsserver.service.PortMapper in project openmq by eclipse-ee4j.
the class Globals method getPortMapper.
public static PortMapper getPortMapper() {
if (portMapper == null) {
synchronized (lock) {
if (portMapper == null) {
portMapper = new PortMapper(getConfigName());
try {
portMapper.configure(getConfig());
// Force portmapper to attempt to bind to port
portMapper.bind();
} catch (Exception e) {
portMapper = null;
Logger logger = getLogger();
if (e instanceof PropertyUpdateException) {
logger.log(Logger.ERROR, e.getMessage());
} else {
logger.logStack(Logger.ERROR, e.getMessage(), e);
}
}
}
}
}
return portMapper;
}
Aggregations