Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-1553

Command service references should be AUTO_EXPORT_INTERFACES

    Details

      Description

      When the command NamespaceHandler parses commands, it currently sets the MutableServiceMetadata commandService to have ServiceMetadata.AUTO_EXPORT_ALL_CLASSES. This causes the proxying to use the ASM based subclass proxies.

      Most likely, it should use either:
      commandService.setAutoExport(ServiceMetadata.AUTO_EXPORT_INTERFACES);

      or specifically set the interface names to proxy on the MutableServiceMetadata via addInterface.

      1. patch.txt
        2 kB
        Daniel Kulp

        Issue Links

          Activity

          Hide
          dkulp Daniel Kulp added a comment -

          Simple patch (not fully tested yet) to flip to AUTO_EXPORT_INTERFACES

          Show
          dkulp Daniel Kulp added a comment - Simple patch (not fully tested yet) to flip to AUTO_EXPORT_INTERFACES
          Hide
          dkulp Daniel Kulp added a comment -

          "mvn install" passes with the patch.

          Show
          dkulp Daniel Kulp added a comment - "mvn install" passes with the patch.
          Hide
          gnt Guillaume Nodet added a comment -

          I think that may be valid for trunk, but this simple patch won't work for 2.2.x or 2.3.x as we do expose (and use, though internally) the classes. So maybe we can add an interface so that we do not have to rely on class proxies.

          Show
          gnt Guillaume Nodet added a comment - I think that may be valid for trunk, but this simple patch won't work for 2.2.x or 2.3.x as we do expose (and use, though internally) the classes. So maybe we can add an interface so that we do not have to rely on class proxies.
          Hide
          jbonofre Jean-Baptiste Onofré added a comment -

          Agree, that's why I put the fix version only on 3.0.0. The problem is more about 2.3.x which is affected as well.

          Show
          jbonofre Jean-Baptiste Onofré added a comment - Agree, that's why I put the fix version only on 3.0.0. The problem is more about 2.3.x which is affected as well.
          Hide
          jbonofre Jean-Baptiste Onofré added a comment -

          In the mean time, I'm testing the latest aries SNAPSHOT.

          Show
          jbonofre Jean-Baptiste Onofré added a comment - In the mean time, I'm testing the latest aries SNAPSHOT.
          Hide
          jbonofre Jean-Baptiste Onofré added a comment -

          Switching to the AUTO_EXPORT_INTERFACES break the help command (no problem to execute help, but help doesn't display anything). I gonna take a look or postpone to 3.0.1.

          Show
          jbonofre Jean-Baptiste Onofré added a comment - Switching to the AUTO_EXPORT_INTERFACES break the help command (no problem to execute help, but help doesn't display anything). I gonna take a look or postpone to 3.0.1.
          Hide
          jbonofre Jean-Baptiste Onofré added a comment -

          I reverted the commit.

          As I said, it breaks the help command.

          When you do:

          karaf@root()> help
          COMMANDS
          

          no command is displayed after this change (whereas we have the list of commands).

          Show
          jbonofre Jean-Baptiste Onofré added a comment - I reverted the commit. As I said, it breaks the help command. When you do: karaf@root()> help COMMANDS no command is displayed after this change (whereas we have the list of commands).

            People

            • Assignee:
              gnt Guillaume Nodet
              Reporter:
              dkulp Daniel Kulp
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development