TransportChannel transportChannel = null;
boolean embedServer = isUseEmbeddedBroker() || factory.requiresEmbeddedBroker();
if (embedServer) {
synchronized (this) {
if (factory.requiresEmbeddedBroker()) {
transportChannel = factory.create(getWireFormat(), uri);
brokerConnector = transportChannel.getEmbeddedBrokerConnector();
}
if (brokerConnector == null) {
brokerConnector = brokerContext.getConnectorByURL(theURLString);
if (brokerConnector == null) {