JBoss.orgCommunity Documentation

Chapter 5. Frequently Asked Question

5.1. JCR FAQ
5.1.1. Kernel
5.1.2. JCR

This chapter provides you all FAQs related to the contents mentioned above.

It's the draft for a future FAQ of JCR usage.

So we have configured JCR in standalone mode and want to reconfigure it for clustered environment. First of all, let's check whether all requirements are satisfied:

So now, we need to configure the Container a bit. Check exo-configuration.xml to be sure that you are using JBossTS Transaction Service and Infinispan Transaction Manager, as shown below.

<component>
   <key>org.infinispan.transaction.lookup.TransactionManagerLookup</key>
   <type>org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup</type>
</component>
   
<component>
  <key>org.exoplatform.services.transaction.TransactionService</key>
  <type>org.exoplatform.services.transaction.infinispan.JBossTransactionsService</type>
  <init-params>
    <value-param>
      <name>timeout</name>
      <value>3000</value>
    </value-param>
  </init-params>   
</component>

Next stage is actually the JCR configuration. We need Infinispan configuration templates for : data-cache, indexer-cache and lock-manager-cache. Later they will be used to configure JCR's core components. There are pre-bundled templates in EAR or JAR in conf/standalone/cluster. They can be used as is or re-written if needed. And now, re-configure a bit each workspace. Actually, a few parameters need changing, e.g. <cache>, <query-handler> and <lock-manager>.

Those properties have the same meaning and restrictions as in the previous block. The last property "max-volatile-time" is not mandatory but recommended. This notifies that the latest changes in index will be visible for each cluster node not later than in 60s.

That's all. The JCR is ready to join a cluster.

OS client (Windows, Linux etc) doesn't set an encoding in a request. But eXo JCR WebDAV server looks for an encoding in a Content-Type header and set it to jcr:encoding. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html, 14.17 Content-Type. e.g. Content-Type: text/html; charset=ISO-8859-4 So, if a client will set Content-Type header, e.g. JS code from a page, it will works for a text file as expected.

If WebDAV request doesn't contain a content encoding, it's possible to write a dedicated action in a customer application. The action will set jcr:encoding using its own logic, e.g. based on IP or user preferences.