What is the typical OSGi lifecycle?

I would like to get some insight into the lifecycle used by industry to develop and deploy OSGi based systems.
The focus is on the deployment phases, after the development phase has created the version and packaged the package. In particular, the testing procedures that can be performed and the method of integration.
Very useful information with a very low level of detail. Thank.

0


source to share


3 answers


OSGi packages can be compiled together in a running OSGi engine (be it Equinox, Felix, dmServer, etc.). As with other code, there may be platform dependencies (for example, only code that runs on Windows that uses c: \ style file references), code that works in conjunction with JNI and is only valid for x86 platforms, and etc. OSGi does not help or discourage software testing in these cases.

Where this can add complexity is in the explicit combinatorial explosion of the launched beams. Unlike a Java application, which may well run on a single monolithic CLASSPATH, you generally don't encounter errors until later (like a ClassNotFoundException when trying to load a JDBC driver, for example). OSGi helps somewhat in this regard in ensuring that you at least have the required batch exports for packages; but even then, some packages may be optional and hence end up with the same problem.

As an OSGi provider, you really need to check:



  • Are all these beams really triggered, i.e. after installing into your favorite OSGi engine, does n really work correctly? If you have all your dependencies then it should go from INSTALLED to RESOLVED to ACTIVE; if it is in INSTALLED it means that it does not have some dependencies
  • Will your application run specific packages (like declarative services or remote services) when the OSGi VM starts?
  • Are there any problems with launching between beams? They should all just work, but you can test what happens if Bundle A starts before Bundle B

These are the additional things you need to check when testing a set of certificates to work with each other. Ideally, you could run VM-VM tests that you could run - how to run Eclipse JUnit plugin tests.

+1


source


You can learn Eclipse as it is one of the largest OSGi-based systems I know of. And they have a lot of docs that talk about version control and how they use testing on the eclipse platform.



0


source


I recommend reading the dmServer Getting Started Guide or looking at other information from the SpringSource.org dmServer site .

The Getting Started Guide tells you about a small GreenPages web application that is built step by step from the skeleton project structure. The final implementation is a modular multi-user application. Along the way, unit and integration testing is demonstrated in Eclipse as well as in a standalone (Maven) build.

While Eclipse is a great and useful example to look at, I would not expect it to be typical of modular OSGi systems, and I am not aware of an explanation of the development lifecycle used.

0


source







All Articles