6 Replies Latest reply on Jan 18, 2007 10:27 AM by bkeh12

    Fine grained action aware interfaces (JBMICROCONT-134)

    alesj

      I've commited initial code for fine grained action aware interfaces - [Action_State]KernelControllerContextAware interfaces.
      Currently all interfaces extend KernelControllerContextAware, which is convenient for simple awareness, but might not be that useful in all cases.

      By this we eliminate the uncertain decision where KernelControllerContextAware-ness belongs - simply implement the right 'action state' aware interface.
      So we can change the current JMX and JNDI introductions on plain KernelControllerContextAware interface, but on a more selected one.

        • 1. Re: Fine grained action aware interfaces (JBMICROCONT-134)
          kabirkhan

          I have updated the lifecycle stuff to use the more specific lifecycle KernelControllerContextAware interfaces.

          As part of this I have changed the

          <aop:lifcycle>
          xml to

          <aop:lifecycle-configure/>
          <aop:lifecycle-create/>
          <aop:lifecycle-describe/>
          <aop:lifecycle-install/>
          <aop:lifecycle-instantiate/>
          <aop:lifecycle-start/>
          


          This will need updating in A/S trunk when the microcontainer snapshot is updated (affected modules are aop-mc-int and kernel). I modified kernel to not invoke the ConfigureKernelControllerContextAware twice, by checking that if the interface is EXACTLY KernelControllerContextAware, it will invoke that as part of the ConfigureAction.

          • 2. Re: Fine grained action aware interfaces (JBMICROCONT-134)
            starksm64

            I pulled in your changes and will test them in my local snapshot update. I'll be pushing out a new snapshot tonight that includes these along with management changes I'm working on.

            • 3. Re: Fine grained action aware interfaces (JBMICROCONT-134)
              bkeh12

              Hi,adrian
              Where are you ?

              alesj wrote:
              Currently all interfaces extend KernelControllerContextAware, which is convenient for simple awareness, but might not be that useful in all cases.

              Do you agree this!
              Can talk to us, please.

              • 4. Re: Fine grained action aware interfaces (JBMICROCONT-134)
                alesj

                Where do you see the problem?

                What I meant was that if you need to be notified of the exact state (implementing multiple KCCAware interfaces) when the awareness happens, the same method is always called, and you must look into the context to figure out what the current state is.

                • 5. Re: Fine grained action aware interfaces (JBMICROCONT-134)

                   

                  "bkeh12" wrote:
                  Hi,adrian
                  Where are you ?
                  alesj wrote:
                  Currently all interfaces extend KernelControllerContextAware, which is convenient for simple awareness, but might not be that useful in all cases.

                  Do you agree this!
                  Can talk to us, please.


                  Personally, I have little interest in this feature. :-)
                  I think it is an anti-pattern of IOC for the "POJO" to implement container interfaces.

                  I understand that sometimes it is useful, but only for people that are trying to
                  "extend" the container without modifying the container itself,
                  e.g. using AOP to add the interface as a mixin so you can pick and choose
                  which beans get certain processing.

                  Without more concrete usecases of these features it is difficult to come to
                  any conclusion on what this api should really look like.

                  The only reason I added it in the first place was because it mirrored the
                  MBeanRegistration interface from JMX.

                  The whole question then became more complicated when the
                  "JMX Introduction" aspect couldn't decide whether it wanted be invoked
                  at construction or configuration. :-)

                  So we extended the api such that you could get a callback on any of the state transitions.

                  • 6. Re: Fine grained action aware interfaces (JBMICROCONT-134)
                    bkeh12

                    Thank you very much... :-)