Registering Resource Classes (bootstrap)

From: Dhanji R. Prasanna <>
Date: Fri, 18 May 2007 15:18:20 -0700


This may not sound like an immediate concern, but a lot of discussion around
the ordering/overriding of resources and sub-resources have started so I
thought it useful to start a thread on how the runtime recognizes resource
classes and bootstraps itself.

Common wisdom suggests an xml descriptor with properties and a list of
resource classes in order. I suggest we abstract that with the optional use
of a builder:

      .addConfiguration(XmlConfigurer.class, "atomservices.xml") //via a
user-provided builder

      .addResource(Account.class) //override
      .addResource(Client.class) //extend, etc.

An xml parser layer (or any other configuration mechanism) could be added
easily. Thoughts, comments?