protected PeerTransportChannel(WireFormat wireFormat, String serviceName) throws JMSException {
this.wireFormat = wireFormat;
this.serviceName = serviceName;
this.discoveryURI = MulticastDiscoveryAgent.DEFAULT_DISCOVERY_URI;
IdGenerator idGen = new IdGenerator();
this.brokerName = idGen.generateId();
this.brokerConnectorURI = DEFAULT_BROKER_CONNECTOR_URI;
this.doDiscovery = true;
if (serviceName == null || serviceName.length() == 0) {
throw new IllegalStateException("No service name specified for peer:// protocol");
}