To deploy eXo JCR to JBoss, do the following steps:

  1. Download the latest version of eXo JCR .ear file distribution.

  2. Copy <jcr.ear> into <%jboss_home%/server/default/deploy>

  3. Put exo-configuration.xml to the root <%jboss_home%/exo-configuration.xml>

  4. Configure JAAS by inserting XML fragment shown below into <%jboss_home%/server/default/conf/login-config.xml>

    
    <application-policy name="exo-domain">
       <authentication>
          <login-module code="org.exoplatform.services.security.j2ee.JbossLoginModule" flag="required"></login-module>
       </authentication>
    </application-policy>
  5. Ensure that you use JBossTS Transaction Service and JBossCache Transaction Manager. Your exo-configuration.xml must contain such parts:

    
    <component>
       <key>org.jboss.cache.transaction.TransactionManagerLookup</key>
       <type>org.jboss.cache.GenericTransactionManagerLookup</type>^
    </component>

    <component>
       <key>org.exoplatform.services.transaction.TransactionService</key>
       <type>org.exoplatform.services.transaction.jbosscache.JBossTransactionsService</type>
       <init-params>
          <value-param>
             <name>timeout</name>
             <value>300</value>
          </value-param>
       </init-params>
    </component>
  6. Start server:

    • bin/run.sh for Unix

    • bin/run.bat for Windows

  7. Try accessing http://localhostu:8080/browser with root/exo as login/password if you have done everything right, you'll get access to repository browser.

  • To manually configure repository, create a new configuration file (e.g., exo-jcr-configuration.xml). For details, see JCR Configuration. Your configuration must look like:

    
    <repository-service default-repository="repository1">
       <repositories>
          <repository name="repository1" system-workspace="ws1" default-workspace="ws1">
             <security-domain>exo-domain</security-domain>
             <access-control>optional</access-control>
             <authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator</authentication-policy>
             <workspaces>
                <workspace name="ws1">
                   <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
                      <properties>
                         <property name="source-name" value="jdbcjcr" />
                         <property name="dialect" value="oracle" />
                         <property name="multi-db" value="false" />
                         <property name="update-storage" value="false" />
                         <property name="max-buffer-size" value="200k" />
                         <property name="swap-directory" value="../temp/swap/production" />
                      </properties>
                      <value-storages>
                         see "
    " part.
                      </value-storages>
                   </container>
                   <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
                      <properties>
                         <property name="root-nodetype" value="nt:unstructured" />
                      </properties>
                   </initializer>
                   <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
                         see  "
    " part.
                   </cache>
                   <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
                      see  "
    " part.
                   </query-handler>
                   <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
                      see  "
    " part.
                   </lock-manager>
                </workspace>
                <workspace name="ws2">
                            ...
                </workspace>
                <workspace name="wsN">
                            ...
                </workspace>
             </workspaces>
          </repository>
       </repositories>
    </repository-service> 
  • Then, update RepositoryServiceConfiguration configuration in exo-configuration.xml to use this file:

    
    <component>
       <key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
       <type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
       <init-params>
          <value-param>
             <name>conf-path</name>
             <description>JCR configuration file</description>
             <value>exo-jcr-configuration.xml</value>
          </value-param>
       </init-params>
    </component>

Configuration of every workspace in repository must contains of such parts: