Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The architecture feature allows obtaining an architectural / component view of your systems. It exposes a snapshot of the present componentsinstances & factories, the state of these components, the state fo the dependencies instances ...
To use the arch command, you Moreover, iPOJO defines an 'arch' command displaying this architecture in Felix. You need to install the arch command bundle available herein the Felix trunk.

Reflection on the component

The architecture feature does some "reflection" on the iPOJO containers. It gathers information about the component (state, class name ...), dependencies requirement (state, multiple, optional ...), provided services (state, properties) ... Each handler can participate to the architecutre. This information allows you to know why a component instance does not start, or why the component does not publish / provide a service.

Metadata

To allow the architecture to introspect the container, you need to add a attribute "architecture=true" to the component element:

...

A Felix command comes with the architecture handler. This command looks for all component exposing the architecture and print the information:.

Panel

arch => arch
Component : fr.imag.adele.escoffier.hello.impl.HelloServiceImpl - VALID
Dependency : org.osgi.service.log.LogService - RESOLVED - Optional : true - Multiple : false
Provides : fr.imag.adele.escoffier.hello.HelloService - REGISTERED
Service Property : floor_ = 2
Service Property : coucou = coucou
Service Property : empty = true
Service Property : language = fr
Component : fr.imag.adele.escoffier.hello.impl.HelloServiceImpl2 - VALID
Dependency : org.osgi.service.log.LogService - RESOLVED - Optional : true - Multiple : false
Provides : fr.imag.adele.escoffier.hello.HelloService - REGISTEREDdisplays instances name & state (equivalent to arch -instances)
arch -instance $instance_name => displays complete information about the instance $instance_name
arch -factories => display the list of available factories
arch -factory $factory_name => display complete information about the factory $factory_name

Technical information

In fact, when a component enables the architecture introspection, its container exposes an Architecture service. Any architecture requester can obtain information about the component. For example, the arch command request all the architecture service and print the information.

Limitation and perspectives

The architecture feature use some implementation details of the different other features (Dependency, Provided service ...). Therefore, if you change the implementation of this feature, the architecture does not more work. Moreover, we are working one a graphical view of the architecture.