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(properties, serviceName,
serviceClassName);
this.serviceData.put(serviceName, data);
log.info("Advertised: " + serviceName);
} catch (Throwable t) {
throw new ConnectionException(Connection.TPESYSTEM,