-
Notifications
You must be signed in to change notification settings - Fork 3k
[type:feature] Custome classloader hot load plugins to gateway.#5403
[type:feature] Custome classloader hot load plugins to gateway.#5403lahmXu wants to merge 134 commits intoapache:masterfrom
Conversation
The function points are as follows:
- Package the sofa and motan plugins independently, placed in the plugins directory through a separate classloader to load the jar package.
- Enable motan, sofa plugins e2e test.
- Solve the problem of hession conflict when sofa and motan plugins are enabled together.
| 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
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 |
||
|
private final Map |
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?