3 Replies Latest reply on Mar 5, 2012 8:24 AM by Antoine Herzog

    PortalContainerFilter can be removed ?

    Antoine Herzog Master



      In the web.xml of the portal war (such as .../deploy/gatein.ear/02portal.war/WEB-INF/web.xml, or the same in a new portal container ear), there is a filter set with PortalContainerFilter.


      When looking at the code, it seems that this filter is not usefull, when using the portal plateform with fixed and stable PortalContainer definition.


      If I have my server in prod, with my only one, well defined PortalContainer (name myPalContainer) ... I don't need to have any check on a disabled Portal, nor to use this filter.


      => Can this filter be removed ?

      so it could be better for performance, on each http request of the users ?

      (this might be important, on heavy load).


      This question is related to this one :





      JBoss Portal and GateIn (JSR-286), JSF, Richfaces, J2EE, Drools, BRMS.


        • 1. Re: PortalContainerFilter can be removed ?
          Nicolas Filotto Novice

          OK I will split my answer in 2 parts, here I will answer about the PortalContainerFilter and in the second thread I will give more details about why we allow to disable a portal container


          If I understand you right, you have gatein.ear and another ear file that defines your target portal container called "myPalContainer" and you defined only this new portal container in PortalContainerConfig which implicitly disables the portal container "portal" (that will try to register itslef from the portal.war of gatein.ear) so in your case this filter is required in gatein.ear otherwise as /portal is still accessible, any access to /portal will cause this kind of issues https://issues.jboss.org/browse/GTNPORTAL-1345. In your custom ear you are free to remove it without any risk as you know that you don't need to disable it and more important it is a change in your ear file not in gatein.ear that cannot be modified if you need to be covered by the support.

          • 2. Re: PortalContainerFilter can be removed ?
            Nicolas Filotto Novice

            If you have the ability to compare the perfs with and without this filter please don't hesitate to share it with me because frankly speaking I would be quite surprised if it has any significant impact

            • 3. Re: PortalContainerFilter can be removed ?
              Antoine Herzog Master

              roughly, I want to configure the portal cleanly...

              without a portal container /portal if it is not used.

              and without a filter initialized and run, on each http request,... if not useful.

              if this is possible...


              for the perfs, it is not significant compare to the huge process of the portal page + applications running.

              but many "not significant" things consume some CPU, some memory, and garbage collection.

              the more I avoid the waste, the better.


              the global idea is : clean, no waste, ... and good knowledge of the portal mechanisms and running.


              by the way : I don't have only "one portal I want to do...", but help companies setting and running their portal.

              I see many questions about "how to..." and "why... ?".

              it is difficult to explain to some architects, or dev team, that you have to keep the "/portal" container... but it is not used.


              anyway, all this is for fine tuning : it does not prevent to use the portal, and take advantage of the huge amount of features and code available with this product.


              Thanks for the answers,