Version 9

    Disabling the JBoss Portal CMS

     

    Our CMS comes bundled with JBoss Portal, by default. However, there are some that may want to disable the CMS for various reasons. This page outlines the steps to do so, and those wanting to unplug the CMS, should follow these instructions step by step.

     

    Requirements:

     

    It is required that you have the jboss-portal.sar archive fully expanded for these operations, as you will be editting files inside it, and some of the embedded archives as well.

     

    Removing files:

     

    Delete/Remove jboss-portal.sar\portal-cms.sar

     

    This will remove the portal cms codebase and services.

     

    Editting the descriptors:

     

    • Edit 'jboss-portal.sar\portal-core.war\WEB-INF\portlet.xml' and remove the CMS Portlets. There are two portlet applications you must remove here:

     

    <portlet-name>CMSPortlet</portlet-name>
    AND
    <portlet-name>CMSAdminPortlet</portlet-name>
    

     

    • Edit 'jboss-portal.sar\portal-core.war\WEB-INF\web.xml' and remove the CMS Servlets. They should be located near the bottom of the file.

     

      <servlet>
    
          <servlet-name>CMSPreviewServlet</servlet-name>
          <servlet-class>org.jboss.portal.core.cms.servlet.CMSPreviewServlet</servlet-class>
          <load-on-startup>0</load-on-startup>
       </servlet>
       <servlet>
          <servlet-name>CMSExportServlet</servlet-name>
          <servlet-class>org.jboss.portal.core.cms.servlet.CMSExportServlet</servlet-class>
          <load-on-startup>0</load-on-startup>
       </servlet>
       <servlet-mapping>
          <servlet-name>CMSPreviewServlet</servlet-name>
          <url-pattern>/cmspreview/*</url-pattern>
       </servlet-mapping>
       <servlet-mapping>
          <servlet-name>CMSExportServlet</servlet-name>
          <url-pattern>/cmsexport/*</url-pattern>
       </servlet-mapping>
    

     

    • Edit jboss-portal.sar\conf\data\default-object.xml and remove the Windows/Instances defined for the DefaultCMSPortletWindow AND CMSAdminPortletWindow:

     

             <window-name>DefaultCMSPortletWindow</window-name>
                <instance-ref>CMSPortletInstance</instance-ref>
                <region>center</region>
                <height>0</height>
             </window>
    

     

             <window>
                <window-name>CMSAdminPortletWindow</window-name>
                <instance-ref>CMSAdminPortletInstance</instance-ref>
                <region>center</region>
                <height>1</height>
             </window>
    

     

    • Edit jboss-portal.sar\portal-core.war\WEB-INF\portlet-instances.xml and remove the portlet instance descriptors. NOTE: In JBoss Portal 2.4, your instance descriptors for these two portlets may be found in the jboss-portal.sar\conf\data\default-object.xml, so you should remove them from there.

     

       <deployment>
          <instance>
             <instance-id>CMSPortletInstance</instance-id>
             <portlet-ref>CMSPortlet</portlet-ref>
          </instance>
       </deployment>
    

     

       <deployment>
          <instance>
             <instance-id>CMSAdminPortletInstance</instance-id>
             <portlet-ref>CMSAdminPortlet</portlet-ref>
             <security-constraint>
                <policy-permission>
                   <role-name>Admin</role-name>
                   <action-name>view</action-name>
                </policy-permission>
             </security-constraint>
          </instance>
       </deployment>
    

     

    • Edit jboss-portal.sar\portal-core.war\WEB-INF\jboss-portlet.xml and remove the service injectors:

     

       <portlet>
          <portlet-name>AdminCMSPortlet</portlet-name>
          <transaction>
             <trans-attribute>Required</trans-attribute>
          </transaction>
       </portlet>
    

     

       <service>
          <service-name>CMS</service-name>
          <service-class>org.jboss.portal.cms.CMS</service-class>
          <service-ref>:service=CMS</service-ref>
       </service>
    

     

    • Edit jboss-portal.sar\conf\login-config.xml and remove the loginmodule for the CMS:

     

       <application-policy name="cms">
          <authentication>
             <login-module code="org.apache.jackrabbit.core.security.SimpleLoginModule" flag="required"></login-module>
          </authentication>
       </application-policy>
    

     

    • Edit jboss-portal.sar\portal-samples.war\WEB-INF\jboss-portlet.xml and remove the CMS service injector:

     

       <service>
          <service-name>CMS</service-name>
          <service-class>org.jboss.portal.cms.CMS</service-class>
          <service-ref>:service=CMS</service-ref>
       </service>
    

     

    Deployment Notes

     

    It is advised that you deploy with a clean install, by deleting $JBOSS_HOME/server/default/data