6 Replies Latest reply on Jan 16, 2013 11:19 PM by isakovarseniy

    karaf jmx api  bundle search

    isakovarseniy

      Hello

      Is it possible  using  jmx api find bundle installed on karaf container using following parameters :  maven group , maven artifact name  and version

       

      Thanks

      Arseniy Isakov

        • 1. Re: karaf jmx api  bundle search
          ffang

          Hi,

           

          Not sure I understand your question here? Could you please elaborate it?

          Do you want to install some specific bundle or something else?

           

          Freeman

          • 2. Re: karaf jmx api  bundle search
            isakovarseniy

            Starting bunble

             

                    long bundleNumber = osgiFrameworkProxy.installBundle("mvn:" + featureGroup + "/" + featureName + "/"

                                          + featureVersion);

                    osgiFrameworkProxy.startBundle(bundleNumber);

             

             

            Now assume I lost variable bundleNumber. How to check if the bundle installed? So I am looking for function:

                osgiFrameworkProxy.isInstalled("mvn:" + featureGroup + "/" + featureName + "/"

                                          + featureVersion))

             

            Thanks

            Arseniy Isakov

             

            Edited by: isakovarseniy on Jan 17, 2013 2:24 AM

            • 3. Re: karaf jmx api  bundle search
              ffang

              Hi,

               

              Use "list -s" you can list all installed bundles with Symbolic name & version, where you can figure out if a certain bundle get installed.

               

              You can run a script which is a ssh client to connect to the container, run "list -s" and parse the result.

               

              Freeman

              • 4. Re: karaf jmx api  bundle search
                isakovarseniy

                Is it possible to run command from jmx api without ssh?

                Thanks

                • 5. Re: karaf jmx api  bundle search
                  ffang

                  Hi,

                   

                  Ah, yes,

                  org.apache.karaf.management.mbeans.bundles.BundlesMBean.list(), it will return TabularData which container all bundles, from each bundle you can get info like Name/Version.

                   

                  You can start a jconsole and connect to FUSE ESB and go through those MBeans to get more ideas.

                   

                  Freeman

                  • 6. Re: karaf jmx api  bundle search
                    isakovarseniy

                    Thanks