Karaf
  1. Karaf
  2. KARAF-1176

Support for OSGi event distribution in Karaf Cellar

    Details

      Description

      I was missing the functionality to publish and listen to OSGi events over separate Cellar nodes.

      Our application heavily uses OSGi events and up to now we used R-OSGi (http://r-osgi.sourceforge.net/) for that.
      Now I've changed the whole framework to Karaf and I wanted to use Cellar's DOSGi implementation to get the same functionality.

      1. event.patch
        21 kB
        Lukas Roedl
      2. LocalEventListener.java.patch
        1.0 kB
        Lukas Roedl

        Activity

        Hide
        Lukas Roedl added a comment - - edited

        I've created a patch which adds the desired functionality. Looking forward to your comments...

        Show
        Lukas Roedl added a comment - - edited I've created a patch which adds the desired functionality. Looking forward to your comments...
        Hide
        Ioannis Canellos added a comment -

        Hi Lucas. Thanks for the contribution.

        From a quick glimpse I gave to the patch I noticed that it deletes some stuff from the bundle module, which I think that is not intentional right?
        Other than that It looks good to me (as I said from a first glance). I'll need to have a detailed look at it during the week.

        Show
        Ioannis Canellos added a comment - Hi Lucas. Thanks for the contribution. From a quick glimpse I gave to the patch I noticed that it deletes some stuff from the bundle module, which I think that is not intentional right? Other than that It looks good to me (as I said from a first glance). I'll need to have a detailed look at it during the week.
        Hide
        Jean-Baptiste Onofré added a comment -

        Yeah, I disagree with the current path. Especially the bundle cluster group support is more or less disable, and the commands also.

        I think that we can install events as optional feature (like eventadmin in Karaf), without changing directly the bundle feature.

        I will propose a new patch asap.

        Show
        Jean-Baptiste Onofré added a comment - Yeah, I disagree with the current path. Especially the bundle cluster group support is more or less disable, and the commands also. I think that we can install events as optional feature (like eventadmin in Karaf), without changing directly the bundle feature. I will propose a new patch asap.
        Hide
        Lukas Roedl added a comment -

        The deletion in the "bundle" module was NOT intended and is not necessary.
        I'll provide a clean patch asap. Seems Eclipse got something wrong here...

        Show
        Lukas Roedl added a comment - The deletion in the "bundle" module was NOT intended and is not necessary. I'll provide a clean patch asap. Seems Eclipse got something wrong here...
        Hide
        Lukas Roedl added a comment -

        Now the patch should work as expected...

        Show
        Lukas Roedl added a comment - Now the patch should work as expected...
        Hide
        Jean-Baptiste Onofré added a comment -

        The new patch looks good to me. I will just add a Cellar feature to install the event support.

        Thanks Lukas !

        Show
        Jean-Baptiste Onofré added a comment - The new patch looks good to me. I will just add a Cellar feature to install the event support. Thanks Lukas !
        Hide
        Jean-Baptiste Onofré added a comment -

        The LocalEventListener doesn't look correct to me as it manipulate OSGi event, whereas it should manipulate Cellar event. I fix that.

        Show
        Jean-Baptiste Onofré added a comment - The LocalEventListener doesn't look correct to me as it manipulate OSGi event, whereas it should manipulate Cellar event. I fix that.
        Hide
        Jean-Baptiste Onofré added a comment -

        Nevermind, my fault

        Show
        Jean-Baptiste Onofré added a comment - Nevermind, my fault
        Hide
        Jean-Baptiste Onofré added a comment -

        I added:

        • a cellar-event feature
        • a quick documentation

        Added on cellar trunk: revision 1239154

        Show
        Jean-Baptiste Onofré added a comment - I added: a cellar-event feature a quick documentation Added on cellar trunk: revision 1239154
        Hide
        Jean-Baptiste Onofré added a comment -

        Added on cellar-2.2.x: revision 1239176

        Show
        Jean-Baptiste Onofré added a comment - Added on cellar-2.2.x: revision 1239176
        Hide
        Lukas Roedl added a comment -

        I added a restriction to the logging of outbound events so that the log isn't spamed with warnings.

        Show
        Lukas Roedl added a comment - I added a restriction to the logging of outbound events so that the log isn't spamed with warnings.
        Hide
        Jean-Baptiste Onofré added a comment -

        Thanks Lukasz, I review that.

        Show
        Jean-Baptiste Onofré added a comment - Thanks Lukasz, I review that.

          People

          • Assignee:
            Jean-Baptiste Onofré
            Reporter:
            Lukas Roedl
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development