How do you deserialize an object from bytes in osgi

后端 未结 3 647
说谎
说谎 2021-01-11 22:58

In my osgi application I have three bundles, travel.api, table.api and utils. travel.api depends on table.api

3条回答
  •  [愿得一人]
    2021-01-11 23:36

    Yes, this is a tricky one. In many cases the problem is even worse, it might not even be known which bundles will be required to deserialize a stream. For these, the compile time dependencies are just not the same as runtime dependencies.

    To tackle these situations, I've used either DynamicImports-Package or use the BundleWiring API. Both worked out pretty well, Dynamic imports are easier though.

    I'd say isolate the part that needs this class loading as much as you can in a separate bundle, and have that bundle use a DynamicImport.

    Good luck, Frank

提交回复
热议问题