3 Replies Latest reply on Mar 6, 2011 9:47 PM by Minh Hoang TO

    GenericPortlet Statistics

    Tim Kelley Newbie

      I posted something similar in the PortletBridge forum (http://community.jboss.org/message/590740#590740), but I will post a more generic questions here.

       

      Basically speaking, I want to be able to gather statistics for other GenericPortlet classes, rather than portlets using the WebUI framework.  I have spent many hours reviewing the source code, looking at the ApplicationStatisticService class, and also through the WebUI framework.  It appears that any other portlet not built on WebUI does not have statistics gathered via the ApplicationStatisticService.

       

      Does anyone have any thoughts or can provide some insight into this for me?

       

      Thanks,

      Tim Kelley

        • 1. GenericPortlet Statistics
          Minh Hoang TO Novice

          What kind of statistic info you want to monitor? The ApplicationStatisticLifecycle is an utility applied only to WebUI portlet

           

          About GenericPortlet, i see there are two ways to monitor portlet within the scope of a request/response

           

          1. Create a Portlet Filter, then define the filter-mapping for each portlet definition

           

          2. Inject an interceptor in the Portlet Container service

          1 of 1 people found this helpful
          • 2. GenericPortlet Statistics
            Tim Kelley Newbie

            Could you provide some reference for injecting an interceptor into the Portlet Container Service?  I have been looking at the PortletInvokerInterceptor, and am not sure on how to configure an additional interceptor into the portlet container.

             

            Thanks for your help.

             

            Tim

            • 3. GenericPortlet Statistics
              Minh Hoang TO Novice

              The interceptor in PC is designed as a chain of responsibility. You could inject a custom interceptor in the chain by following those steps:

               

              1. Implement a custom PortletInvokerInterceptor

               

              2. Create a Startable object, depending on ExoKernelIntergration service (to make sure that the ExoKernelIntegration and PorltetInvoker component are started before your Startable object)

               

              3. In the start() method of your Startable object, retrieve the PortletInvoker, make a while loop on the list of PortletInvokerInterceptor binding to the PortletInvoker and add your custom interceptor

               

              You could find analogous code in the class WSRPServiceIntegration