0 Replies Latest reply on Dec 23, 2009 8:40 PM by alrubinger

    SHRINKWRAP-110: Community Review on ExtensionLoader and Assignable.as()

    alrubinger

      @see https://jira.jboss.org/jira/browse/SHRINKWRAP-110

       

      Aslak originally took on the difficult task of getting us what appears to the end-user to be multi-inheritance within a fluent API.

       

      archive.as(JavaArchive.class).addClass(MyClass.class).as(ZipExporter.class).exportZip();

       

      Looks beautiful from a client perspective.  Now I think we should get together and review some points regarding the implementation.

       

      From the description:

       

      We should do a community review on the ExtensionLoader API and ServiceExtensionLoader implementation. This is the mechanism used to power Assignable.as();

       

      • Archives API should not expose extension loading configuration (SHRINKWRAP-102)
      • ServiceExtensionLoader needs documentation at class-level and on methods
      • ServiceExtensionLoader is not Thread-safe (or documented that this is the responsibility of the client, ArchiveBase, which does not sync access)
      • OK to always use TCCL at time of instantiation to find extension impls and classes?
      • ServiceExtensionLoader instance needs to be carried in the state of every archive? Should some Assignable types be given access to different service extension loaders? To me this looks like a singular point of configuration possibly warranting use of a Singleton.
      • All extension loading as a feature needs Wiki documentation

       

      We might want to schedule a time to do this on IRC.

       

      S,

      ALR