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

Multiple instances of the same plugin with isolated classloaders #310

Open
jduo opened this issue Apr 10, 2019 · 4 comments
Open

Multiple instances of the same plugin with isolated classloaders #310

jduo opened this issue Apr 10, 2019 · 4 comments
Labels

Comments

@jduo
Copy link

jduo commented Apr 10, 2019

Is it possible to have multiple instances of the same plugin (and version), loaded in their own classloader?

The need for this comes from third party libraries that have a static variable used for configuration.

@decebals
Copy link
Member

Because this request is a little bit uncommon in my opinion (not many users will be use this feature), please add more details (define clear the use case, the problem encountered and if you are some ideas that could help the implementation).

@jduo
Copy link
Author

jduo commented Apr 10, 2019

The use case for us is related to the Hive Ranger library. We are building an app that should allow for multiple Hive configurations, but the Ranger library has a static variable that's used for configuration, so we need a way to isolate it for each Hive configuration.

I thought about building a plugin manager which when given a plugin Id, modifies the ID and attaches a GUID to try to coerce P4FJ into thinking it's a new plugin and thus creating a new ClassLoader. I haven't tried this out yet though.

@jduo
Copy link
Author

jduo commented Apr 22, 2019

Hi @decebals ,

Just wondering if you needed any more details? Really I'm curious if what I've suggested would work within the current codebase.

@decebals
Copy link
Member

For the moment I do not know how to deal with this case. There is a possibility that what you suggest to work. Try it..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants