Hello,

I work on another component model for OSGi named iPOJO. The project is hosted on the Felix project. iPOJO aims to provide an extensible service component runtime based on the concept of POJO.

An iPOJO component is similar to a DS component.
For iPOJO, we have implemented a Felix shell command (arch) to display all exposed architectures.

The following snippet shows you an example of the arch command :
-> arch
Component : FooCreator1 - VALID from bundle 10
Handler : org.apache.felix.ipojo.handlers.dependency.DependencyHandler : valid
     Dependency on org.apache.felix.ipojo.Factory[(component.class=fr.imag.adele.escoffier.foo.impl.FooImpl5)] is resolved
          Uses : [EMAIL PROTECTED]
Created Instances of the POJO :
    [EMAIL PROTECTED]

Component : FooProvider5 - VALID from bundle 8
Handler : org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceHandler : valid
     Provided Service [fr.imag.adele.escoffier.foo.FooService ] is registered
         Service Property : foo.array = [EMAIL PROTECTED]
         Service Property : foo.int = 5
         Service Property : foo.name = babar
Created Instances of the POJO :
    [EMAIL PROTECTED]

Component : FooProvider5-1 - VALID from bundle 8
Handler : org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceHandler : valid
     Provided Service [fr.imag.adele.escoffier.foo.FooService ] is registered
         Service Property : foo.array = [EMAIL PROTECTED]
         Service Property : foo.int = 6
         Service Property : foo.name = bobar
Created Instances of the POJO :
    [EMAIL PROTECTED]

Component : FooService-Component-1 - VALID from bundle 8
Handler : org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceHandler : valid
     Provided Service [fr.imag.adele.escoffier.foo.FooService ] is registered
         Service Property : foo.array = [EMAIL PROTECTED]
         Service Property : foo.int = 25
         Service Property : foo.name = tralala
Created Instances of the POJO :
    [EMAIL PROTECTED]

Component : FooService-Component-2 - VALID from bundle 8
Handler : org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceHandler : valid
     Provided Service [fr.imag.adele.escoffier.foo.FooService ] is registered
         Service Property : foo.array = [EMAIL PROTECTED]
         Service Property : foo.int = 25
         Service Property : foo.name = titi
Created Instances of the POJO :
    [EMAIL PROTECTED]

Component : FooProvider6 - VALID from bundle 12
Handler : org.apache.felix.ipojo.handlers.architecture.ArchitectureHandler : valid
Handler : fr.imag.adele.escoffier.handler.proxy.ProvidedServiceHandler : valid
Created Instances of the POJO :
    [EMAIL PROTECTED]

Component : FooMultipleOptionalRequester - VALID from bundle 11
Handler : org.apache.felix.ipojo.handlers.dependency.DependencyHandler : valid
     Dependency on fr.imag.adele.escoffier.foo.FooService[] is resolved
          Uses : [EMAIL PROTECTED]
          Uses : [EMAIL PROTECTED]
          Uses : [EMAIL PROTECTED]
          Uses : [EMAIL PROTECTED]
          Uses : [EMAIL PROTECTED]
Created Instances of the POJO :
    [EMAIL PROTECTED]

The displayed information depends on the used "handlers" (extensible mechanisms for managing a non-functional behavior of the component).

Dependencies show you if the component service dependency is resolved or not. Moreover, Provided service informs if a provided service  is registered or not (the service interface is inside brakes) and the exposed properties (if registered only). You have information about instances too (used instance by a dependency or component implementation class (POJO)  instances).

Regards,

Clement Escoffier


Nikunj Mehta a écrit :
Thank you Benjamin and Peter for your comments. I consider development 
time tools important mainly because

With declarative services in R4, we are like a VLSI programming language 
that can burn devices on a chip but not produce a picture to see what 
you have created.

Of course tools should fill this gap, but there should be something in 
the OSGI runtime to show wiring information as well. Right now, all I 
have is information about which bundles are using a particular service 
but not which services are using other services. Moreover, this 
information is only available once the components have been activated 
(i.e., not before the component is actually used).

However, with declarative services all the information for wiring is 
statically available, which makes it even possible to analyze the wiring 
at any time after the component declarations are written, not just when 
the services are running.

Nikunj

Benjamin Schmaus wrote:
  
As Peter points out, this is a known issue.  The current tools (at
least the ones that I'm aware of) operate at the OSGi framework level,
eg, bundles and services, which makes it difficult to inspect the
system with regard to declarative service components.  (DS
notwithstanding these tools work quite well.)

It would be nice to have some tools available at runtime, such as
additional console commands, for troubleshooting issues with DS
components.  For example, the ability to enumerate all DS components
in a given bundle with their status (either activated or not) would be
useful.  Maybe something similar to the "bundle <bundleId>" command
that equinox supports could be implemented, eg, "componentStatus
<bundleId>", or maybe the bundle command could also be expanded to
include DS info in its output.

It would also be nice to have some development-time tools.  For
example, it's not  uncommon (for me anyway) to forget to add the
Service-Component manifest header, which will definitely prevent your
components from being activated at runtime.  It's also relatively
common to forget to add component descriptor files to the build for a
bundle so that the component descriptors aren't included in a bundle's
resulting jar.  I could see a specialized "Declarative Services" tab
included in the manifest editor for Eclipse being useful for these
types of problems.
It seems like something similar to the Extension Point editors could
work for creating DS component descriptors.

- Ben

On 10/26/06, Peter Kriens <[EMAIL PROTECTED]> wrote:
  
    
This is a clear problem, declarative services are new and no tools
have been made so far to debug and help.

However, it should not be that hard to make a tool for the OSGi
command shell (org.osgi.tools.console.jar in membercvs) that parses
the declarations and does some analysis? Felix and Equinox also have
shells that are extendable. (In R5 we will look at creating one
extension model).

Kind regards,

    Peter kriens




NM> Hi folks,

NM> I have started to use declarative services for my project and endured a
NM> fair amount of pain doing so. The main reason is the lack of good tools
NM> to find out the wiring problems in my component declarations.

NM> Most of the time the properties of services and target filters on
NM> references don't match. The end result is that a whole bunch of services
NM> are never activated and its hard to find out why. This is despite the
NM> fact that I am only using static properties and no service factories.

NM> How do you deal with similar problems? Its not hard to imagine
NM> processing all the component declarations in a given set of bundles to
NM> find out the wiring between components and possibly visualize it. I hope
NM> others on this mailing list would also benefit from your suggestions and
NM> tips.

NM> If it helps to know, I am using Eclipse PDE as my IDE and Equinox as my
NM> OSGI runtime.

NM> Thanks,
NM> Nikunj
NM> _______________________________________________
NM> OSGi Developer Mail List
NM> osgi-dev@bundles.osgi.org
NM> http://bundles.osgi.org/mailman/listinfo/osgi-dev

--
Peter Kriens                              Tel +33467542167
9C, Avenue St. Drézéry                    AOL,Yahoo: pkriens
34160 Beaulieu, France                    ICQ 255570717
Skype pkriens                             Fax +1 8153772599


_______________________________________________
OSGi Developer Mail List
osgi-dev@bundles.osgi.org
http://bundles.osgi.org/mailman/listinfo/osgi-dev

    
      
_______________________________________________
OSGi Developer Mail List
osgi-dev@bundles.osgi.org
http://bundles.osgi.org/mailman/listinfo/osgi-dev
  
    
_______________________________________________
OSGi Developer Mail List
osgi-dev@bundles.osgi.org
http://bundles.osgi.org/mailman/listinfo/osgi-dev
  

_______________________________________________
OSGi Developer Mail List
osgi-dev@bundles.osgi.org
http://bundles.osgi.org/mailman/listinfo/osgi-dev

Reply via email to