1 Reply Latest reply on Jan 23, 2006 9:58 AM by adrian.brock

    contectual registry

    tom.baeyens

      I would like to get a status update on the following cause i have some related requirements.

      "scott" wrote:
      3. Yes, this is an aspect of the metadata repository that I'm currently working on. This does not exist at all implementation wise, but is what I'm currently working on. The metadata repository is a store of pojo metadata with a hierarchical namespace. The hierarchical structure defines the level at which the metadata is introduced/loaded: THREAD, REQUEST, SESSION, DEPLOYMENT, APPLICATION, SERVER, CLUSTER, DOMAIN


      Is there any further description of the current vision or impl ?


      here are my random thoughts about the subject:

      segmented registry: A typical IOC container has only 2 segments (1 for the request-scope objects and one for application scope objects marked with singleton='true'). The above proposed segmentation is a different one: THREAD, REQUEST, SESSION, DEPLOYMENT, APPLICATION, SERVER, CLUSTER, DOMAIN. And in jBPM i need yet another type of segmentation.

      So i think the segments should be made dynamic. Also the event mechanism should be enabled on these segments. E.g. to implement a session per request pattern, in the mc container configuration, you could describe that upon the creation of a request segment, create a persistence segment. Upon descruction of the request segment, the persistence segment could be destroyed as well, committing or rolling back the tx.

      Also segments should be stackable to accomodate a security, transaction or business process context.

      I believe that such a segmented registry could replace almost all usages of thread local.

      In the picture below, i have sketched my idea of a stackable, segmented registry:
      http://docs.jboss.com/jbpm/segmented.registry.gif
      [img]http://docs.jboss.com/jbpm/segmented.registry.gif[/img]

      regards, tom.