Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[type:feature] Custome classloader hot load plugins to gateway.#5403

Open
lahmXu wants to merge 134 commits intoapache:masterfrom
lahmXu:class_isolation
Open

[type:feature] Custome classloader hot load plugins to gateway.#5403
lahmXu wants to merge 134 commits intoapache:masterfrom
lahmXu:class_isolation

Conversation

Copy link
Member

lahmXu commented Jan 17, 2024 *
edited
Loading

The function points are as follows:

  1. Package the sofa and motan plugins independently, placed in the plugins directory through a separate classloader to load the jar package.
  2. Enable motan, sofa plugins e2e test.
  3. Solve the problem of hession conflict when sofa and motan plugins are enabled together.

lahmXu and others added 30 commits September 13, 2023 11:02
moremind requested changes Feb 2, 2024
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);
Copy link
Member

moremind Feb 2, 2024

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)) {
Copy link
Member

moremind Feb 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ArraysUtils.isEmpty

Copy link
Member

moremind Feb 2, 2024

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
Copy link
Member

moremind Feb 2, 2024

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) {
Copy link
Member

moremind Feb 2, 2024

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 handlerMap;
private final Map handlerMap = new HashMap<>();
Copy link
Member

moremind Feb 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

concurrent?

moremind added the plugin: motan label Feb 2, 2024
moremind added this to the 2.7.0 milestone Feb 2, 2024
moremind added the plugin: sofa label Feb 2, 2024
lahmXu added 24 commits February 28, 2024 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

moremind moremind requested changes

Requested changes must be addressed to merge this pull request.

Assignees

No one assigned

Projects

None yet

Milestone

2.7.0

Development

Successfully merging this pull request may close these issues.

4 participants