Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-3251

[PATCH] OSGi Tutorials: Compilation issue with BundleContext.registerService()

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • None
    • Documentation
    • Windows XP (32-bit), Java 1.6.0_18

    Description

      I am new user of Felix and new to OSGi. Under Apache Felix 4.0.2, the call to BundleContext.registerService () will not compile when a Properties instance is passed. I am not sure if this is a bug in Felix 4.0.2 or just out-of-date documentation in the following examples:

      • Apache Felix Tutorial Example 2
      • Apache Felix Tutorial Example 2b

      The fix was relatively simple, replace:

      Properties props = new Properties();

      with:

      Dictionary<String, String> props = new Hashtable<String, String>();

      I hope this helps!

      Attachments

        Activity

          People

            rickhall Richard S. Hall
            ggonzalez Gaston Gonzalez
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: