Karaf
  1. Karaf
  2. KARAF-657

kar deployer should start the feature

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.1
    • Fix Version/s: 2.2.4, 3.0.0
    • Component/s: karaf-kar
    • Labels:
      None

      Description

      When a bundle is dropped at deploy directory, it starts automatically. Would that be same par to get a kar file to behave the same?

      detailed discussion is at http://karaf.922171.n3.nabble.com/auto-install-feature-using-kar-deployer-td2969728.html

        Issue Links

          Activity

          Christian Schneider made changes -
          Link This issue is related to KARAF-1552 [ KARAF-1552 ]
          Jamie goodyear made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Hide
          Jean-Baptiste Onofré added a comment -

          Currently, the KAR deployer will try to deploy the two KAR (it only looks on the file suffix). As a kar is not really versioned (or only if the version is in the kar file name), it could be tricky. I'm OK to extend the kar deployer with an "advanced" behavior.

          Show
          Jean-Baptiste Onofré added a comment - Currently, the KAR deployer will try to deploy the two KAR (it only looks on the file suffix). As a kar is not really versioned (or only if the version is in the kar file name), it could be tricky. I'm OK to extend the kar deployer with an "advanced" behavior.
          Hide
          Dan Tran added a comment -

          what is the behavior to karaf when I have 2 versions of the same kar file show up in the deploy directory ? the logical behavior is karaf would ignore the lower version?

          Thanks for clarifying this.

          -Dan

          Show
          Dan Tran added a comment - what is the behavior to karaf when I have 2 versions of the same kar file show up in the deploy directory ? the logical behavior is karaf would ignore the lower version? Thanks for clarifying this. -Dan
          Jean-Baptiste Onofré made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          Jean-Baptiste Onofré added a comment -

          THe KAR deployer now automatically starts the features contained in the KAR.

          Show
          Jean-Baptiste Onofré added a comment - THe KAR deployer now automatically starts the features contained in the KAR.
          Hide
          Jean-Baptiste Onofré added a comment -

          Fixed on trunk: revision 1179062.

          Show
          Jean-Baptiste Onofré added a comment - Fixed on trunk: revision 1179062.
          Hide
          Jean-Baptiste Onofré added a comment -

          Fixed on karaf-2.2.x: revision 1179059.

          Show
          Jean-Baptiste Onofré added a comment - Fixed on karaf-2.2.x: revision 1179059.
          Jean-Baptiste Onofré made changes -
          Fix Version/s 2.2.4 [ 12317342 ]
          Fix Version/s 3.0.0 [ 12316040 ]
          Fix Version/s 3.1.0 [ 12316946 ]
          Jean-Baptiste Onofré made changes -
          Component/s karaf-kar [ 12315011 ]
          Component/s karaf-core [ 12313724 ]
          Jean-Baptiste Onofré made changes -
          Fix Version/s 3.1.0 [ 12316946 ]
          Component/s runtime [ 12313724 ]
          Hide
          Jean-Baptiste Onofré added a comment -

          Kar artifact and bundle is not the same.

          A Kar artifact should be seen as a features:descriptor.

          When you drop a features descriptor into the deploy folder, or register a features descriptor using features:addurl command, no feature is started automatically. You have to start feature by hand.

          It could make sense to be able to define a set of auto-start features in the etc/org.apache.karaf.features.cfg file.

          For instance, we could have a property like:

          features.auto.start = myfeature1, myfeature2, myfeature3/version

          When a features descriptor is registered (using features:addurl), Karaf could check if the features descriptor contain features defined in features.auto.start, and try to start it automatically.

          Another way, could be to add autostart attribute in the features descriptor:

          <feature name="myfeature" version="1.0" autostart="true"/>

          Let discuss of that on the mailing list.

          Show
          Jean-Baptiste Onofré added a comment - Kar artifact and bundle is not the same. A Kar artifact should be seen as a features:descriptor. When you drop a features descriptor into the deploy folder, or register a features descriptor using features:addurl command, no feature is started automatically. You have to start feature by hand. It could make sense to be able to define a set of auto-start features in the etc/org.apache.karaf.features.cfg file. For instance, we could have a property like: features.auto.start = myfeature1, myfeature2, myfeature3/version When a features descriptor is registered (using features:addurl), Karaf could check if the features descriptor contain features defined in features.auto.start, and try to start it automatically. Another way, could be to add autostart attribute in the features descriptor: <feature name="myfeature" version="1.0" autostart="true"/> Let discuss of that on the mailing list.
          Hide
          Jean-Baptiste Onofré added a comment -

          It makes sense to have the same behavior or at least to be able to define the behavior by property (maybe introducing a org.apache.karaf.kar.cfg configuration).

          Show
          Jean-Baptiste Onofré added a comment - It makes sense to have the same behavior or at least to be able to define the behavior by property (maybe introducing a org.apache.karaf.kar.cfg configuration).
          Jean-Baptiste Onofré made changes -
          Field Original Value New Value
          Assignee Jean-Baptiste Onofré [ jbonofre ]
          Dan Tran created issue -

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development