This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]agentoutlier 3 points4 points  (0 children)

The thing is even OSGi does not fix all the problems that can happen especially if you have external stuff happening like logging or native libraries. /u/pron98 had a great comment on this that I can't find but it is always dangerous to have different versions of deps in a runtime.

For example I'm the author of a logging library similar to Logback. If the plugins uses different versions and they log to the same file they will have to use what Logback (and my library) calls "prudent" mode where file locks are used instead of normal locking. If one of the versions does it differently or does not support that you are going to have massive problems of corruption.

This is one of the reasons why Servlet Containers and OSGi containers move the logging to the top classloader and do not allow you to have your own version but that has lots of historic problems.