-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[type:feature] Custome classloader hot load plugins to gateway. #5403
base: master
Are you sure you want to change the base?
Conversation
Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader()); | ||
return doExecute(exchange, chain, selector, rule); | ||
} catch (Throwable e) { | ||
LogUtils.info(LOG, "Plugin class isolation execute failed. plugin: {}, exception: {}", named(), e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error
*/ | ||
default void putExtendDataHandler(List<?> dataSubscribers) { | ||
final Type[] genericInterfaces = this.getClass().getGenericInterfaces(); | ||
if (genericInterfaces.length == 0 || CollectionUtils.isEmpty(dataSubscribers)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ArraysUtils.isEmpty
<!-- <dependency>--> | ||
<!-- <groupId>com.alipay.sofa</groupId>--> | ||
<!-- <artifactId>sofa-rpc-all</artifactId>--> | ||
<!-- <scope>provided</scope>--> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
provided
c = findClass(name); | ||
} | ||
} catch (ClassNotFoundException e) { | ||
// ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add log
} catch (ClassNotFoundException e) { | ||
// ignore | ||
} | ||
if (c == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Objects.nonNull
|
||
private static final Logger LOG = LoggerFactory.getLogger(CommonMetaDataSubscriber.class); | ||
|
||
private final Map<String, MetaDataHandler> handlerMap; | ||
private final Map<String, MetaDataHandler> handlerMap = new HashMap<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
concurrent?
…to class_isolation
The function points are as follows: