Skip to content
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

Redesign the LibClassLoader to load connector and its dependencies #2317

Merged
merged 6 commits into from
Jan 31, 2025

Conversation

arunans23
Copy link
Member

@arunans23 arunans23 commented Jan 30, 2025

Purpose

Describe the problems, issues, or needs driving this feature/fix and include links to related issues in the following format: Resolves issue1, issue2, etc.

This PR reverts the following PRs and add a new implementation for the LibClassLoader.

Improvement commits

Earlier design
Screenshot 2025-01-30 at 22 33 35

As per the above design, one class loader is used per capp to load the class mediators, connectors and its dependencies. But this raises an issue where two connectors or its dependencies can have the same class name and package name which can cause a confusion when loading a specific class.

Hence the following design is proposed.

New design
Screenshot 2025-01-30 at 22 34 01

Here a classloader is used for each connector. All the connector specific dependencies will be loaded to that particular class loader. This will prevent two connectors having similar classes getting added to the same classloader. The class mediators will be loaded to individual class loaders as before.

Here a classloader is used for each connector. All the connector specific dependencies will be loaded to that particular class loader. This will prevent two connectors having similar classes getting added to the same classloader. The class mediators will be loaded to individual class loaders as before.
@arunans23 arunans23 requested a review from chanikag as a code owner January 30, 2025 17:10
@arunans23 arunans23 merged commit 6eadd11 into wso2:master Jan 31, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants