Details

    • Type: New Feature New Feature
    • Status: Open Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Component/s: NewComponents
    • Labels:
      None
    • Number of attachments :
      0

      Description

      We need a toolkit that allows libraries (aka .jar files) to export resources. The resources exported would be things like dtds, schemas, images, components, component profiles etc.

      Each library would have a descriptor (META-INF/spice/resources.xml) which lists the resources it exports. A sample of this may look like

      <resources version="1.0">

      <!-- declare some resource types -->
      <type shortname="dtd" uri="http://www.w3c.org/1995/dtd"/>
      <type shortname="png" uri="http://www.images-r-us.com/2000/png"/>
      <type shortname="component"
      uri="http://jakarta.apache.org/avalon/component/1.0"/>
      <type shortname="service"
      uri="http://jakarta.apache.org/avalon/service/1.0"/>

      <!-- declare some instances of above resource types -->
      <dtd key="assembly"
      resource="/org/apache/avalon/phoenix/tools/assembly.dtd"/>
      <png key="banner"
      resource="/org/apache/avalon/phoenix/tools/phoenix.png"/>
      <png key="built-with"
      resource="/org/apache/avalon/phoenix/tools/built-with-phoenix.png"/>
      <component key="kernel"
      resource="org.apache.avalon.phoenix.components.kernel.DefaultKernel"/>
      <service key="kernel"
      resource="org.apache.avalon.phoenix.interfaces.Kernel"/>

      </resources>

      Each resource entry declares a single resource. Each resource has a particular type (type defined by a URI). The way that a resource is extracted from library is not specified by this toolkit.

      This approach would also allow libraries to "extend" or "cascade" existing libraries. So you could replace the resource of type "component" in above config via something like (Assuming that the above descriptor was in a library named 'phoenix')

      <resources extends="phoenix" version="1.0">
      <type shortname="component"
      uri="http://jakarta.apache.org/avalon/component/1.0"/>
      <component key="kernel"
      resource="org.apache.avalon.phoenix.components.kernel.DefaultKernel"/>

      </resources>

        Activity

        Hide
        Peter Donald added a comment -

        Some older notes...

        We will eventuall need a decent directory system for all of its resources. The directory service may include things like resources from jars and it may also include things like type information, profile information etc.

        To accomodate such a system it is first necessary to classify the possible entrys. Classifications include;

        • Boot-time: Is entry required during boot time or not?
        • Fixed vs Variable: Is the entry fixed at startup time and readonly after that or can it change after initialization.
        • Persistent/Non-Persistent: Will entry persist across a restart
        • Dynamic/Static: Is the entry dynamically created on traversal. Things like Linuxs /dev filesystem are considered dynamic as they have no physical representation but are just windows onto parts of the kernel
        • Scope: I entry scoped per application, per partition or per component?
        • Exported: Is the entry exported to some other system (ie JMX, AltRMI, CORBA etc).
        Show
        Peter Donald added a comment - Some older notes... We will eventuall need a decent directory system for all of its resources. The directory service may include things like resources from jars and it may also include things like type information, profile information etc. To accomodate such a system it is first necessary to classify the possible entrys. Classifications include; Boot-time: Is entry required during boot time or not? Fixed vs Variable: Is the entry fixed at startup time and readonly after that or can it change after initialization. Persistent/Non-Persistent: Will entry persist across a restart Dynamic/Static: Is the entry dynamically created on traversal. Things like Linuxs /dev filesystem are considered dynamic as they have no physical representation but are just windows onto parts of the kernel Scope: I entry scoped per application, per partition or per component? Exported: Is the entry exported to some other system (ie JMX, AltRMI, CORBA etc).

          People

          • Assignee:
            Unassigned
            Reporter:
            Peter Donald
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: