1 2 3 4 5 Previous Next 63 Replies Latest reply on Feb 14, 2007 11:54 AM by adrian.brock Go to original post
      • 60. Re: Scoped beans deployment

         

        "alesj" wrote:

        So this probably means that we need to limit the whenRequired attribute where we are able to specify it. I'll look if there are some issues with our current usage.


        Why? If somebody does it wrong they'll be told there is an unresolved dependency.

        I'd rather assume the user knows what they are doing.
        It is better than "nannying" them and then not allowing them to do something
        that we didn't forsee but which is perfectly valid.

        • 61. Re: Scoped beans deployment
          alesj

           

          "adrian@jboss.org" wrote:

          3) We check that all "PREINSTALL" dependencies are satisfied,
          basically the classloader and in future the classloading dependencies
          4) We switch the context to the scoped controller (creating it if necessary)
          5) We check that all "DESCRIBED" dependencies are satisfied
          (since the classloader has moved to PREINSTALL this will be none by default)
          6) Business as usual, except the context is now in a scoped controller.


          So PREINSTALL is before DESCRIBE.
          And it does this:
           BeanMetaData metaData = context.getBeanMetaData();
           if (metaData.getBean() != null)
           {
           BeanInfo info = configurator.getBeanInfo(metaData);
           context.setBeanInfo(info);
          
           MetaData md = addMetaData(context);
          

          + sets up new child Controller (if there is a scoping annotation on the bean).

          But the rest of the dependencies:
           try
           {
           DependencyInfo depends = context.getDependencyInfo();
           // add custom dependencies (e.g. AOP layer).
           List<Object> dependencies = info.getDependencies(md);
           log.trace("Extra dependencies for " + context.getName() + " " + dependencies);
           if (dependencies != null)
           {
           for (Object dependencyName : dependencies)
           {
           AbstractDependencyItem dependency = new AbstractDependencyItem(metaData.getName(), dependencyName, ControllerState.INSTANTIATED, ControllerState.INSTALLED);
           depends.addIDependOn(dependency);
           }
           }
           }
           catch (Throwable t)
           {
           removeMetaData(context);
           throw t;
           }
          

          are still done in DescribeAction, right.

          • 62. Re: Scoped beans deployment
            alesj

             

            "alesj" wrote:

            What about adding additional state after DESCRIBE --> SCOPE?

            "adrian@jboss.org" wrote:

            I don't understand the question?

            The problem was that I thought that pre-install was after describe, and I couldn't figure out how would you get the scoping annotations before classloading dependencies and metadata.

            • 63. Re: Scoped beans deployment

               

              "alesj" wrote:
              right?


              Qui tacet consentit :-)

              1 2 3 4 5 Previous Next