@@ -0,0 +1,1992 @@
+/*%0A * Copyright 2016-2018 shardingsphere.io.%0A * %3Cp%3E%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A * %3C/p%3E%0A */%0A%0Apackage io.shardingsphere.transaction.manager.base.servicecomb;%0A%0Aimport lombok.Getter;%0Aimport lombok.extern.slf4j.Slf4j;%0Aimport org.apache.servicecomb.saga.transports.SQLTransport;%0A%0Aimport java.util.Iterator;%0Aimport java.util.ServiceLoader;%0A%0A/**%0A * SQLTransport SPI loader.%0A *%0A * @author yangyi%0A */%0A@Slf4j%0Apublic final class SQLTransportSPILoader %7B%0A    %0A    private static final SQLTransportSPILoader INSTANCE = new SQLTransportSPILoader();%0A    %0A    @Getter%0A    private final SQLTransport sqlTransport;%0A    %0A    private SQLTransportSPILoader() %7B%0A        sqlTransport = load();%0A    %7D%0A    %0A    private SQLTransport load() %7B%0A        Iterator%3CSQLTransport%3E sqlTransports = ServiceLoader.load(SQLTransport.class).iterator();%0A        if (!sqlTransports.hasNext()) %7B%0A            log.warn(%22There are no SQLTransport configured. BASE Saga Transaction cannot be used.%22);%0A            return new EmptySQLTransport();%0A        %7D%0A        SQLTransport result = sqlTransports.next();%0A        if (sqlTransports.hasNext()) %7B%0A            log.warn(%22There are more than one SQLTransport implement existing, chosen first one by default.%22);%0A        %7D%0A        return result;%0A    %7D%0A    %0A    /**%0A     * Get instance of SQLTransport SPI loader.%0A     *%0A     * @return instance of SQLTransport SPI loader%0A     */%0A    public static SQLTransportSPILoader getInstance() %7B%0A        return INSTANCE;%0A    %7D%0A%7D%0A

add SQLTransport SPI Loader