URI uri = createURI(theURLString);
TransportChannelFactory factory = TransportChannelProvider.getFactory(uri);
BrokerConnector brokerConnector = null;
boolean created = false;
TransportChannel transportChannel = null;
boolean embedServer = isUseEmbeddedBroker() || factory.requiresEmbeddedBroker();
if (embedServer) {
synchronized (this) {
if (factory.requiresEmbeddedBroker()) {
transportChannel = factory.create(getWireFormat(), uri);
brokerConnector = transportChannel.getEmbeddedBrokerConnector();