3 Replies Latest reply on Jun 28, 2012 3:37 AM by thomas.diesler

    PackageAdmin doesn't list [Resolved] bundle packages.

    ebelanger070

      Using JBoss 7.1.2.Final (built from source)

       

      Greetings,

       

      I am still in the progress of evaluating JBoss AS 7.1 in replacement of Eclipse Equinox.  I had an unexpected behavior with a fragment bundle and after some testing, may have found a bug.  Using PackageAdmin, I tried to lookup a provided package from a bundle.  The package was not available.  I then queried the bundle state, which was RESOLVED.  Just for test, I activated the bundle and the package was then available.

       

      I get a different behavior when using Equinox PackageAdmin implementation.  PackageAdmin.getExportedPackage() will actually retrieve exported packages in RESOLVED bundles.  This behavior is even more important with fragments.  Fragments cannot be ACTIVE and will stay in a RESOLVED state.  This means the fragments can provide packages in Equinox.  This doesn't seem to be the case with JBoss.

       

      In summary,  Equinox PackageAdmin will detect packages in bundles with RESOLVED state, JBoss PackageAdmin doesn't seem to.  Also, fragments are RESOLVED at most, which means that fragments packages cannot be resolved in JBoss.

       

      As always, thank you for your answers and if you need more information or collaboration on my part, do not hesitate to ask.