8 Replies Latest reply on Jan 21, 2010 4:27 PM by Andrew Rubinger

    RELOADED-10: Consuming fine-grained bootstrap definitions

    Andrew Rubinger Master



      Here we bring up VDF by very simply starting jboss-bootstrap and pointing it to a set of bootstrap XML files which together compose the necessary components. The end-user view is just another configuration of the Bootstrap API:


      MCServer server = MCServerFactory.createServer();
      URL home; // Points to a bootstrap home containing the proper XML for VDF only
      MainDeployer deployer = server.getKernel().getControlelr().getInstalledContext("MainDeployer");


      What we're aiming to do is deliver a component which easily provides the profile definition only.  From there a consuming project may pick and choose the set of bootstrap XMLs it'd like to define the server.


      The current API allows you to point to one entry "bootstrapUrl" which in turn references other relative URLs (which, in the MC case, are "urn:jboss:bean-deployer:2.0" descriptors).  Let's take the case of Embedded EJB3:


      * I want to reuse the same lifecycle APIs available elsewhere (currently jboss-bootstrap)

      * I want to define my own bootstrap profile

      * In that profile, I want to reuse finer-grained bootstrap elements so I'm not re-inventing the wheel


      So I'm considering some changes to jboss-bootstrap.


      We should no longer accept "bootstrapHome" and "bootstrapUrl" parameters, but instead allow the user to pass in a Set of bootstraps either to come from:


      1) A URL

      2) Raw Bytes / String

      3) File

      4) ClassLoader Resource


      Giving the user control over the Set allows him/her to switch order and add fine-grained stuff (coming from components like the prototype in RELOADED-10) easily.


      From here these simply get passed along to the BasicXMLDeployer/KernelDeployer.


      To keep things backwards-compatible (and hidden) from AS, we can move the existing "jboss-bootstrap-api" mechanism of defining bootstraps into the "jboss-bootstrap-api-as" layer, and switch out the impl such that the user won't know anything's changed.