Wednesday, August 19, 2020

Understanding OSGI Bundle states

Eclipse runs on top of the OSGi runtime, which manages the bundles (components) that make up an application. At any time, each bundle has one of these lifecycle states:

Bundle States:

  • Not in the list - If your bundle isn't in the list, then OSGi doesn't know anything about it. See the next section for debugging this problem.
  • INSTALLED - This means that OSGi knows about your bundle but there is something wrong and it couldn't resolve. Problems may include thing from missing dependencies to requiring a higher Java VM version than you are running with. To get more information on why your bundle is not resolved try running the diag <bundle id> command, where <bundle id> is your bundle id or bundle symbolic name.
  • RESOLVED - If your bundle is resolved but you expected it to be started, then try starting your bundle from the command-line with the start 123 command. If it won't start, then you should get some feedback as to what the problem is.
  • <<lazy>> - This means your bundle is resolved and is marked to be lazy started. Everything should be ok.
  • ACTIVE - your bundle is resolved and has been started, everything should be working as planned.


(source: OSGi Service Platform – Core Specification)


For example: I want to check the bundle states for my company plugins so I will use the below command.

osgi> ss com.espressif

"Framework is launched."

id State       Bundle

6 RESOLVED    com.espressif.idf.branding_1.2.0.qualifier

7 ACTIVE      com.espressif.idf.core_1.0.0.qualifier

8 STARTING    com.espressif.idf.help_1.0.0.qualifier

9 ACTIVE      com.espressif.idf.launch.serial.core_1.0.0.qualifier

10 ACTIVE      com.espressif.idf.launch.serial.ui_1.0.0.qualifier

11 STARTING    com.espressif.idf.sdk.config.core_1.0.1.qualifier

12 STARTING    com.espressif.idf.sdk.config.ui_1.0.0.qualifier

13 STARTING    com.espressif.idf.terminal.connector_1.0.0.qualifier

14 STARTING    com.espressif.idf.terminal.connector.serial_1.0.0.qualifier

15 ACTIVE      com.espressif.idf.ui_1.0.0.qualifier

721 ACTIVE      com.espressif.idf.debug.gdbjtag.openocd_1.0.0.qualifier


References:

https://wiki.eclipse.org/Where_Is_My_Bundle

1 comment:

  1. Experience working with various features of Visual Studio is essential for any freelance net full stack developer. It is a powerful IDE for net full stack developer teams and knowing how to use this robust toolset saves time, speeding up the development process. If you are a freelance net full stack developer, you can get more relevant projects on Eiliana.com, where top clients regularly post IT development projects.

    ReplyDelete