2 Replies Latest reply on Apr 9, 2005 3:26 AM by timfox

    ClosedInterceptor and HierarchyInterceptor

    timfox

      Hi All-

      I've implemented the ClosedInterceptor and new HierarchyInterceptor and added a set of tests to Connection Test to test this plus some other Connection related tests.

      It all seems to be working.

      I can send a patch now if you like, or I can wait until I've done the next task.

      There is one omission for now: The hierarchy interceptor does not maintain MessageConsumers. This is because there is currently no ConsumerDelegate class (the class returned from ServerSessionDelegate is a Consumer). Any proxy that's closed by the ClosedInterceptor needs to implement close() and closing() which the Consumer class doesn't.

      I could add a ConsumerDelegate class to make it more symmetrical but not sure it it's worth it right now or fits in with the grander design.

      For the next task, I was thinking of looking at JBossSession. WDYT?


        • 1. Re: ClosedInterceptor and HierarchyInterceptor
          ovidiu.feodorov

           

          There is one omission for now: The hierarchy interceptor does not maintain MessageConsumers. This is because there is currently no ConsumerDelegate class (the class returned from ServerSessionDelegate is a Consumer). Any proxy that's closed by the ClosedInterceptor needs to implement close() and closing() which the Consumer class doesn't.


          You are right, this was an experiment, it was implemented that way because the Consumer didn't need to field any "ConsumerDelegate" method. All consumer-related methods are taken care of by interceptors. When all JMS functionality will be implemented, we will refactor the model and see what is the best aproach.

          Do you really need a ConsumerDelegate class? What would be the reason to have it?



          • 2. Re: ClosedInterceptor and HierarchyInterceptor
            timfox

             

            "ovidiu.feodorov@jboss.com" wrote:
            There is one omission for now: The hierarchy interceptor does not maintain MessageConsumers. This is because there is currently no ConsumerDelegate class (the class returned from ServerSessionDelegate is a Consumer). Any proxy that's closed by the ClosedInterceptor needs to implement close() and closing() which the Consumer class doesn't.


            You are right, this was an experiment, it was implemented that way because the Consumer didn't need to field any "ConsumerDelegate" method. All consumer-related methods are taken care of by interceptors. When all JMS functionality will be implemented, we will refactor the model and see what is the best aproach.

            Do you really need a ConsumerDelegate class? What would be the reason to have it?



            I suppose, if we needed to do anything on close() for a Consumer then that would be a reason to have a ConsumerDelegate() class, otherwise I agree that there doesn't seem to be a good reason.