What does OSGi solve?

前端 未结 15 2468
猫巷女王i
猫巷女王i 2020-11-27 08:41

I\'ve read on Wikipedia and other sites about OSGi, but I don\'t really see the big picture. It says that it\'s a component-based platform, and that you can reload modules a

15条回答
  •  忘掉有多难
    2020-11-27 09:37

    A Few Things that drive me nuts on OSGi:

    1) The implentations and their context loaders have a lot of quirks to them, and can be somewhat async (We use felix inside of confluence). Compared to a pure spring (no DM) where [main] is pretty much running through everything sync.

    2)Classes are not equal after a hot load. Say, for instance you have a tangosol cache layer on hibernate. It is filled with Fork.class, outside of the OSGi scope. You hotload a new jar, and Fork has not changed. Class[Fork] != Class[Fork]. It also appears during serialization, for the same underlying causes.

    3)Clustering.

    You can work around these things, but it is a major major pain, and makes your architecture look flawed.

    And to those of you advertising the hotplugging.. OSGi's #1 Client? Eclipse. What does Eclipse do after loading the bundle?

    It restarts.

提交回复
热议问题