3 Replies Latest reply on Aug 29, 2007 10:48 AM by Ales Justin

    Scoping changes

    Adrian Brock Master

      I've refactored the scoping/metadata.

      The main reason was so I can setup the scopes/contexts in the deployer layer
      and not have it replaced by the MC.
      i.e. I need to introduce application and deployment scopes which the MC
      doesn't know about.

      This also puts the framework in place for other contexts like MBeans
      to have annotations, overrides and the related processing.
      e.g. binding an MBean into JNDI using the "decorators"

      <mbean ...>
       <annotation>@JNDIBinding(jndiName="whatever")</annotation>
      </mbean>
      


        • 1. Re: Scoping changes
          Adrian Brock Master

          I also removed the immutable MetaData and cloning of the ScopeKey
          from the container injection.

          These are completely unnecessary. MetaData is already immutable
          (its a wrapper to the mutable context) and the ScopeKey becomes immutable (frozen)
          once its used by the repository to register a context.

          • 2. Re: Scoping changes
            Ales Justin Master

             

            "adrian@jboss.org" wrote:

            These are completely unnecessary. MetaData is already immutable
            (its a wrapper to the mutable context) and the ScopeKey becomes immutable (frozen)
            once its used by the repository to register a context.


            Aha, ok.
            I was looking at the MetaData. The interface itself is immutable, but to prevent someone to actually cast it to mutable impl and then change the state, I added Unmodifiable wrapper.


            • 3. Re: Scoping changes
              Ales Justin Master

              Or is MetaDataRetrievalToMetaDataBridge the only actual impl instance that is exposed as MetaData?
              That's OK then as well, since that one is immutable as well. ;-)