1 2 Previous Next 18 Replies Latest reply on Mar 14, 2006 11:20 AM by starksm64 Go to original post
      • 15. Re: Repository usage question

        The domain/cluster/server keys should in some way be implicit.

        We will also probably need a kind of default application
        (at leat transitionally) since there are
        many examples currently where MBeans get registered
        programmatically without them really saying what application they belong to.

        • 16. Re: Repository usage question
          starksm64

           

          "adrian@jboss.org" wrote:
          So we still haven't defined what the names mean.

          I'm assuming from Scott said the Microcontainer names map to:

          Application == KernelDeployment
          Deployment == BeanMetaData/KernelControllerContext

          This is a bit confusing.


          An application is just a root deployment like an ear that can be used to identified a shared context across subdeployments.

          • 17. Re: Repository usage question
            starksm64

             

            "adrian@jboss.org" wrote:
            The domain/cluster/server keys should in some way be implicit.

            We will also probably need a kind of default application
            (at leat transitionally) since there are
            many examples currently where MBeans get registered
            programmatically without them really saying what application they belong to.


            The default name for any level should just be "default' or some such, and defined with the level names.

            I expect that we need a wildcard "*" value for any level for searching/comparing keys. Such a wildcard key cannot be put into a java collection as its equals behavior would not satisfy the equals/hashCode contract I expect.


            • 18. Re: Repository usage question
              starksm64

               

              "kabir.khan@jboss.com" wrote:

              Should the following work (it doesn't), or do we always need to specify something for all parent levels of the scope?:
              BasicKernelRepository bkp = new BasicKernelRepository();
              
              HashMap attrs = new HashMap();
              scope.put(CommonNames.DEPLOYMENT, "MyBean");
              
              Key key = new Key("permissions", attrs);
              BasicMetaData data = new BasicMetaData(0, "test");
              bkp.addMetaData(key, data);
              
              Object stored = bkp.getMetaData(key);
              assertEquals(stored, "test");
              


              Yes, this should work. A missing value for a level should be treated as the default value for that level and equate to either an explicit default value for a level or a null for that level.


              1 2 Previous Next