int min = Math.min(Connection.XATMI_SERVICE_NAME_LENGTH,
serviceName.length());
serviceName = serviceName.substring(0, min);
log.debug("Advertising: " + serviceName);
ServiceData serviceData = this.serviceData.get(serviceName);
if (serviceData == null) {
try {
ServiceData data = new ServiceData(transportFactory,
properties, serviceName, serviceClassName);
this.serviceData.put(serviceName, data);
log.info("Advertised: " + serviceName);
} catch (ConnectionException e) {
throw e;