Skip to content

Commit

Permalink
refactor: class loader for dubbo invoker
Browse files Browse the repository at this point in the history
  • Loading branch information
QizhengMo committed Oct 21, 2024
1 parent 09645c6 commit b40c5fe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 118 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/docker-image-tomcat.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.arextest.schedule.beans;

import com.arextest.schedule.common.ClassLoaderUtils;
import com.arextest.common.model.classloader.RemoteJarClassLoader;
import com.arextest.common.utils.RemoteJarLoaderUtils;
import com.arextest.schedule.extension.invoker.ReplayExtensionInvoker;
import com.arextest.schedule.sender.ReplaySender;
import com.arextest.schedule.sender.ReplaySenderFactory;
Expand All @@ -13,7 +14,6 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.ServiceLoader;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
Expand Down Expand Up @@ -52,8 +52,8 @@ public List<ReplayExtensionInvoker> invokers() {
} else {
classPathResource = loadLocalInvokerJar();
}
ClassLoaderUtils.loadJar(classPathResource);
ServiceLoader.load(ReplayExtensionInvoker.class).forEach(invokers::add);
RemoteJarClassLoader loader = RemoteJarLoaderUtils.loadJar(classPathResource.getPath());
invokers.addAll(RemoteJarLoaderUtils.loadService(ReplayExtensionInvoker.class, loader));
} catch (Throwable t) {
LOGGER.error("Load invoker jar failed, application startup blocked", t);
}
Expand Down

This file was deleted.

0 comments on commit b40c5fe

Please sign in to comment.