22.4.3. Configuring the Content Store Location

By default, the JBoss Portal CMS stores all node properties, references, and binary content in the database, using the portal datasource. The location of some of these items is configurable, and there are 3 options: 100% Filesystem Storage

To enable 100% Filesystem storage, you must edit the file: jboss-portal.sar/portal-cms.sar/META-INF/jboss-service.xml . You will note that the file is set to use the HibernateStore and HibernatePersistenceManager classes, by default. To have the CMS use 100% file system storage, simply comment these blocks. Then, you should uncomment to use the LocalFileSystem and XMLPersistenceManager classes. Follow these steps to activate 100% FS storage:
  1. Comment out the following blocks (there are 3 in total):
    <!-- HibernateStore: uses RDBMS + Hibernate for storage -->
    <FileSystem class="org.jboss.portal.cms.hibernate.HibernateStore">
    And uncomment the blocks under them (there are 3 in total):
    <!-- LocalFileSystem: uses FileSystem for storage. -->
    <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
  2. Now comment out the following blocks (there are 2 in total):
    <!-- HibernatePersistentManager: uses RDBMS + Hibernate for storage -->
    <PersistenceManager class="org.jboss.portal.cms.hibernate.state.HibernatePersistenceManager">
    And uncomment the blocks under them (there are 2 in total):
    <!-- XMLPersistenceManager: uses FileSystem for storage -->
    <PersistenceManager class="org.apache.jackrabbit.core.state.xml.XMLPersistenceManager"/>


If you do any change at the workspaces configuration you will need to delete the file $JBOSS_HOME/server/xxx/data/portal/cms/conf/workspaces/default/workspace.xml before restarting JBoss or redeploying JBoss Portal. If you forget to do that, the changes won't affect the CMS. For the same reason, you also need to delete that file if you recompile JBoss Portal after changing the name of the datasource. Note that on a cluster environment, you need to remove that file (if it exists) on all the nodes.