-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: provide multitenancy runtime #477
Conversation
f6c2a9c
to
d398b5b
Compare
try (var classLoader = URLClassLoader.newInstance(entries, getSystemClassLoader())) { | ||
var runtimeThread = | ||
new Thread( | ||
() -> { | ||
try { | ||
Thread.currentThread().setContextClassLoader(classLoader); | ||
super.boot(); | ||
} catch (Exception e) { | ||
throw new EdcException(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.
Just curious: If the Classloader instance is closed, once the thread has been instantiated, is it still capable to use it? For my understanding once the resource has been closed it shouldn't be able to be used anymore and all associated refs going to be gc'ed...
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.
woa, you're right, I didn't closed it at first, but then SonarCloud said like "hey, you have to close it", it was afternoon and I listened too it without asking a lot :D
Will fix it
Actually I tested it, load up the sample connector with 3 tenants with "in memory" stores, start pushing data, after GC intervention everything is still working correctly.
This is a concept and we need to test it further, but for the moment it seems to work
c4355df
to
8d57a79
Compare
8d57a79
to
f532402
Compare
SonarCloud Quality Gate failed. |
Closed as not really necessary |
what
Provides
multi-tenancy
extension with aMultiTenantRuntime
class, that can be used to run a multi-tenant EDCwhy
This is a requirement for PI6
notes
samples
folder containing a sample that shows how the multi-tenancy could be used