This chapter is divided into 4 administration groups, including:

  • Connectors

    Details of WebDAV, FTP and JCA resource adapter, including configuration, parameters and examples.

  • Database

    Issues related to the database administration, including multi-language support and DBCleanService; and instructions on how to host several JCR instances on the same database instance.

  • Tools

    Necessary information about Session leak detector, Consistency checker, and Statistics.

  • Performance tuning

    Instructions on JBoss AS tuning, JCR cache tuning, Clustering, JVM parameters, and Force query hints.

DB2 configuration

MySQL configuration

PostgreSQL configuration

MS SQL configuration

Sybase configuration

Oracle configuration

  • Oracle DB automatically collects statistics to optimize performance of queries, but you can manually call the 'ANALYZE' command to start collecting statistics immediately which may improve performance.

    For example:

    ANALYZE INDEX JCR_PK_SITEM COMPUTE STATISTICS
    ANALYZE INDEX JCR_IDX_SITEM_PARENT_FK COMPUTE STATISTICS
    ANALYZE INDEX JCR_IDX_SITEM_PARENT COMPUTE STATISTICS
    ANALYZE INDEX JCR_IDX_SITEM_PARENT_NAME COMPUTE STATISTICS
    ANALYZE INDEX JCR_IDX_SITEM_PARENT_ID COMPUTE STATISTICS
    ANALYZE INDEX JCR_PK_SVALUE COMPUTE STATISTICS
    ANALYZE INDEX JCR_IDX_SVALUE_PROPERTY COMPUTE STATISTICS
    ANALYZE INDEX JCR_PK_SREF COMPUTE STATISTICS
    ANALYZE INDEX JCR_IDX_SREF_PROPERTY COMPUTE STATISTICS
    ANALYZE INDEX JCR_PK_SCONTAINER COMPUTE STATISTICS

  • WebDAV

    All necessary information about WebDAV, including configuration, examples, commands, and restrictions. Also, this part also provides a set of frequently asked questions.

  • FTP

    Details of configuration parameters of FTP, such as command-port, data-min-port and data-max-port, system, and client-side-encoding.

  • JCA Resource Adapter

    Details of SessionFactory, configuration, and deployment.

The WebDAV protocol enables you to use third party tools to communicate with hierarchical content servers via HTTP. It is possible to add and remove documents or a set of documents from a path on the server. DeltaV is an extension of the WebDAV protocol that allows managing document versioning. Locking guarantees protection against multiple access when writing resources. The ordering support allows changing the position of the resource in the list and sorts the directory to make the directory tree viewed conveniently. The fulltext search makes it easy to find the necessary documents. You can search by using two languages: SQL and XPATH.

In JCR, you plug in the WebDAV layer on the top of your JCR implementation, based on the code taken from the extension modules of the reference implementation, so it is possible to browse a workspace using third party tools (it can be Windows folders or Mac ones as well as a Java WebDAV client, such as DAVExplorer or IE using FileOpen as a Web Folder).

Now WebDAV is an extension of the REST service. To get the WebDAV server ready, you must deploy the REST application. Then, you can access any workspaces of your repository by using the following URL:

For example, when accessing the WebDAV server with the URL http://localhost:8080/portal/rest/jcr/repository/collaboration, you will be asked to enter your login and password. Those will then be checked by using the organization service that can be implemented thanks to an InMemory (dummy) module or a DB module or an LDAP one and the JCR user session will be created with the correct JCR Credentials.

Related documents

The following code snippet represents the configuration of the WebDAV component.


<component>
  <key>org.exoplatform.services.jcr.webdav.WebDavServiceImpl</key>
  <type>org.exoplatform.services.jcr.webdav.WebDavServiceImpl</type>
  <init-params>

    <!-- default node type which is used for the creation of collections -->
    <value-param>
      <name>def-folder-node-type</name>
      <value>nt:folder</value>
    </value-param>

    <!-- default node type which is used for the creation of files -->
    <value-param>
      <name>def-file-node-type</name>
      <value>nt:file</value>
    </value-param>

    <!-- if MimeTypeResolver can't find the required mime type,
         which conforms with the file extension, and the mimeType header is absent
         in the HTTP request header, this parameter is used
         as the default mime type-->
    <value-param>
      <name>def-file-mimetype</name>
      <value>application/octet-stream</value>
    </value-param>

    <!-- This parameter indicates one of the three cases when you update the content of the resource by PUT command.
         In case of "create-version", PUT command creates the new version of the resource if this resource exists.
         In case of "replace" - if the resource exists, PUT command updates the content of the resource and its last modification date.
         In case of "add", the PUT command tries to create the new resource with the same name (if the parent node allows same-name siblings).-->

    <value-param>
      <name>update-policy</name>
      <value>create-version</value>
      <!--value>replace</value -->
      <!-- value>add</value -->
    </value-param>

    <!--
        This parameter determines how service responds to a method that attempts to modify file content.
        In case of "checkout-checkin" value, when a modification request is applied to a checked-in version-controlled resource, the request is automatically preceded by a checkout and followed by a checkin operation.
        In case of "checkout" value, when a modification request is applied to a checked-in version-controlled resource, the request is automatically preceded by a checkout operation.
    -->
    <value-param>
      <name>auto-version</name>
      <value>checkout-checkin</value>
      <!--value>checkout</value -->
    </value-param>

    <!--
        This parameter is responsible for managing Cache-Control header value which will be returned to the client.
        You can use patterns like "text/*", "image/*" or wildcard to define the type of content.
    -->
    <value-param>
      <name>cache-control</name>
      <value>text/xml,text/html:max-age=3600;image/png,image/jpg:max-age=1800;*/*:no-cache;</value>
    </value-param>

    <!--
        This parameter determines the absolute path to the folder icon file, which is shown
        during WebDAV view of the contents
    -->
    <value-param>
      <name>folder-icon-path</name>
      <value>/absolute/path/to/file</value>
    </value-param>

    <!--
        This parameter is responsible for untrusted user agents definition.
        Content-type headers of listed here user agents should be
        ignored and MimeTypeResolver should be explicitly used instead
    -->
    <values-param>
      <name>untrusted-user-agents</name>
      <value>Microsoft Office Core Storage Infrastructure/1.0</value>
    </values-param>

  </init-params>
</component>

There are some restrictions for WebDAV in different Operating systems.

Windows 7

When you try to set up a web folder by "adding a network location" or "mapping a network drive" through My Computer, you can get an error message saying that either "The folder you entered does not appear to be valid. Please choose another" or "Windows cannot access… Check the spelling of the name. Otherwise, there might be…". These errors may appear when you are using SSL or non-SSL.

To fix this problem, do the following steps:

Microsoft Office 2010

If you have Microsoft Office 2010 or Microsoft Office 2007 applications installed on a client computer, try to access an Office file that is stored on a web server that is configured for Basic authentication from the client computer. The connection between your computer and the web server does not use Secure Sockets Layer (SSL). When you try to open or to download the file, you experience the following symptoms:

To enable the Basic authentication on the client computer, do as follows:

Q1. Can I manage the 'cache-control' value for different media-types from server configuration?
Q2. How to perform WebDAV requests using curl?
Q3. How does eXo JCR WebDAV server treat content encoding?
Q1.

Can I manage the 'cache-control' value for different media-types from server configuration?

Use the "cache-control" configuration parameter.

The value of this parameter must contain colon-separated pairs of the "MediaType:cache-control" value.

For example, if you need to cache all text/xml and text/plain files for 5 minutes (300 sec.) and other text/\* files for 10 minutes (600 sec.), use the next configuration:


<component>
    <type>org.exoplatform.services.jcr.webdav.WebDavServiceImpl</type>
    <init-params>
        <value-param>
            <name>cache-control</name>
            <value>text/xml,text/plain:max-age=300;text/*:max-age=600;</value>
        </value-param>
    <init-params>
<component>
Q2.

How to perform WebDAV requests using curl?

Simple Requests:

For simple requests, such as GET, HEAD, MKCOL, COPY, MOVE, DELETE, CHECKIN, CHECKOUT, UNCHECKOUT, LOCK, UNLOCK, VERSIONCONTROL, and OPTIONS, perform:

curl -i -u 'user:pass' -X 'METHOD_NAME' 'resource_url'

For example, to create a folder named "test", perform as follows:

curl -i -u 'root:exo' -X MKCOL 'http://localhost:8080/rest/jcr/repository/production/test
      

To PUT the test.txt file from your current folder to the "test" folder on the server, perform as follows:

curl -i -u 'root:exo' -X PUT 'http://localhost:8080/rest/jcr/repository/production/test/test.txt'
        -d
        @test.txt
      

Requests with XML body:

For requests which contain the XML body, such as ORDER, PROPFIND, PROPPATCH, REPORT, and SEARCH, add -d 'xml_body text' or -d @body.xml to your curl-command:

curl -i -u 'user:pass' -X 'METHOD_NAME' -H 'Headers' 'resource_url' -d 'xml_body text'
      

Note

body.xml must contain a valid xml request body.

For example, to find all files containing "test", perform as follows:

curl -i -u "root:exo" -X "SEARCH" "http://192.168.0.7:8080/rest/jcr/repository/production/" -d
        "<?xml version='1.0' encoding='UTF-8' ?>
        <D:searchrequest xmlns:D='DAV:'>
        <D:sql>SELECT * FROM nt:base WHERE contains(*, 'text')</D:sql>
        </D:searchrequest>"
      

If you need to add some headers to your request, use \-H key.

To have more information about methods parameters, you can find in HTTP Extensions for Distributed Authoring specification.

Q3.

How does eXo JCR WebDAV server treat content encoding?

OS client (Windows, Linux, and more) does not set an encoding in a request, but the 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 sets the Content-Type header, for example, JS code from a page, it will work for a text file as expected.

If WebDAV request does not contain a content encoding, it is possible to write a dedicated action in a customer application. The action will set jcr:encoding using its own logic, for example, based on IP or user preferences.

The JCR-FTP Server represents the standard eXo service, operates as an FTP server with an access to a content stored in JCR repositories in the form of nt:file/nt:folder nodes or their successors. The client of an executed Server can be any FTP client. The FTP server is supported by a standard configuration which can be changed as required.

FTP includes the following configuration parameters:

JCR supports J2EE Connector Architecture 1.5, thus if you want to delegate the JCR Session lifecycle to your application server, you can use the JCA resource adapter for eXo JCR. This adapter only supports XA Transaction, in other words you cannot use it for local transactions. Since the JCR Sessions have not been designed to be shareable, the session pooling is simply not covered by the adapter.

Whenever relational database is used to store multilingual text data of eXo Java Content Repository, it is necessary to adapt configuration in order to support UTF-8 encoding. Here is a short instruction for several supported RDBMS with examples.

Modify the repository-configuration.xml file which can be found in various locations.

Note

The jdbcjcr datasource used in examples can be configured via the InitialContextInitializer component.

It is a special service for data removal from database. The section shortly describes the working principles of DBCleaner under all databases.

Frequently, a single database instance must be shared by several other applications, but you can host several JCR instances in the same database instance. To fulfill this need, you have to review your queries and scope them to the current schema; it is now possible to have one JCR instance per DB schema instead of per DB instance. Also, you will need to apply the configuration changes described below.

Q1. Which database server is better for eXo JCR?
Q2. How to setup eXo JCR for multilingual content on MySQL?
Q3. Does MySQL have limitation affecting on eXo JCR features?
Q4. Does use of Sybase database need special options in eXo JCR configuration?
Q5. It is better to use queries which access data by the JCR API?
Q6. Is ordering by jcr:path or Item name supported?
Q1.

Which database server is better for eXo JCR?

If the question is about the performance, it is difficult to answer, because each database can be configured to have better performance in a special case. According to the results of our internal tests, the best choice is Oracle 11G R2 even when you store the binary data in the database. For other databases, it is recommended to store the binary data in the file system unless you have only small file content to store. MySQL and PostgreSQL are also demonstrated in our benchmark results that they could provide good performance. DB2 and MSSQL are slower in default configurations. The default configuration of Sybase is the slowest, but in this question, take the database server maintenance into account. The installation of MySQL and PostgreSQL is simple and they can work even on any limited hardware. The same actual for maintenance during the work. Note for Sybase: "check-sns-new-connection" data container configuration parameter should be set to "true". For testing purpose, embedded database such as HSQLDB is the best choice. Apache Derby and H2 are also supported. But, H2 surprisingly needs "beta" feature enabled - MVCC=TRUE in JDBC URL.

Q2.

How to setup eXo JCR for multilingual content on MySQL?

To allow multiple character sets to be sent from the client, the UTF-8 encoding should be used, either by configuring UTF-8 as the default server character set, or by configuring the JDBC driver to use UTF-8 through the characterEncoding property. MySQL database should be created in single-byte encoding, for example "latin1":

CREATE DATABASE db1 CHARACTER SET latin1 COLLATE latin1_general_cs;

The eXo JCR application (for example, GateIn) should use JCR dialect "MySQL-UTF8".

Or, the MySQL database default encoding and JCR dialect cannot be UTF8. Use single-byte encoding (for example, "latin1") for database and "MySQL-UTF8" dialect for eXo JCR.

Note

The "MySQL-UTF8" dialect cannot be auto-detected, it should be set explicitly in the configuration.

Q3.

Does MySQL have limitation affecting on eXo JCR features?

Index's key length of JCR_SITEM (JCR_MITEM) table for mysql-utf8 dialect is reduced to 765 bytes (or 255 chars).

Q4.

Does use of Sybase database need special options in eXo JCR configuration?

To enable JCR to work properly with Sybase, a check-sns-new-connection property with the 'false' value is required for each workspace data container:


<container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
    <properties>
        <property name="source-name" value="jdbcjcr" />
        <property name="dialect" value="auto" />
        <property name="multi-db" value="true" />
        <property name="update-storage" value="false" />
        <property name="max-buffer-size" value="200k" />
        <property name="swap-directory" value="target/temp/swap/ws" />
        <property name="swap-directory" value="target/temp/swap/ws" />
        <property name="check-sns-new-connection" value="false" />
    </properties>
Q5.

It is better to use queries which access data by the JCR API?

No, direct access to items via JCR API is more efficient. Search will consume additional resources for index querying and only then return the items.

Q6.

Is ordering by jcr:path or Item name supported?

No, it is not supported. There are two ways to order results, when the path may be used as criteria:

  • Order by property with the NAME or PATH value type (JCR supports it).

  • Order by jcr:path - sort by the exact path of node (JCR does not support it).

Order by jcr:path

If no order specification is supplied in the query statement, implementations may support document order on the result nodes (see 6.6.4.2 Document Order of JSR-170), and it is sorted by order number.

By default, (if query does not contain any ordering statements) result nodes are sorted by the document order.

SELECT * FROM nt:unstructured WHERE jcr:path LIKE 'testRoot/%'

For specified jcr:path ordering, there is different proceeding in XPath and SQL:

  • SQL no matter ascending or descending - query returns result nodes in random order:

    SELECT * FROM nt:unstructured WHERE
                  jcr:path LIKE 'testRoot/%' ORDER BY jcr:path
  • XPath - jcr:path order construction is ignored (so result is not sorted according to the path):

    /testRoot/*
                  @jcr:primaryType='nt:unstructured'
                  order by jcr:path
  • Session leak detector

    All necessary information about this tool, including activation and report.

  • Consistency checker

    Details of consistency checker, and Recommendations on how to fix corrupted JCR.

  • JCR statistics

    Instructions on how to get and manage statistics on database access layer and on JCR API accesses, and statistics manager.

The session leak detector is able to help you debug your application based on JCR when you suspect that you have a bug related to a wrong usage of JCR sessions. It works by creating a queue of weak references to JCR sessions and the queue is periodically cleaned. When a session reference is dequeued and is not cleared it is considered as a leaked session. Obviously what matters here is the time by which a session is stale known as max age. If the max age is too short, it will suspect that many sessions are leaked although they are not. The default max age value is configured at 2 minutes.

Production and any systems may have faults in some days. They may be caused by hardware and/or software problems, human faults during updates and in many other circumstances. It is important to check integrity and consistency of the system if it is not backed up or stale, or it takes the recovery process much time. The eXo JCR implementation offers an innovative JMX-based complex checking tool. Running inspection, this tool checks every major JCR component, such as persistent data layer and index. The persistent layer includes JDBC Data Container and Value Storage if they are configured. The database is verified using the set of complex specialized domain-specific queries. The Value Storage tool checks the existence and access to each file. Index verification contains two-way pass cycle, existence of each node in the index checks on persistent layer along with opposite direction, when each node from Data Container is validated in the index. Access to the checking tool is exposed via the JMX interface (RepositoryCheckController MBean) with the following operations available:


The list of Database inconsistencies which can be checked and repaired automatically:

  • An item has no parent node: Properties will be removed and the root UUID will be assigned in case of nodes.

  • A node has a single valued property with nothing declared in the VALUE table: This property will be removed if it is not required by primary type of its node.

  • A node has no primary type property: This node and the whole subtree will be removed if it is not required by primary type of its parent.

  • Value record has no related property record: Value record will be removed from database.

  • An item is its own parent: Properties will be removed and root UUID will be assigned in case of nodes.

  • Several versions of same item: All earlier records with earlier versions will be removed from ITEM table.

  • Reference properties without reference records: The property will be removed if it is not required by the primary type of its node.

  • A node is marked as locked in the lockmanager's table but not in ITEM table or the opposite: All lock inconsistencies will be removed from both tables.

Note

The only inconsistency that cannot be fixed automatically is Corrupted VALUE records. Both STORAGE_DESC and DATA fields contain not null value. Since there is no way to determinate which value is valid: either on the file system or in the database.

The list of ValueStorage inconsistencies which can be checked and repaired automatically:

  • Property's value is stored in the File System but the content is missing: A new empty file corresponding to this value will be created.

The following is the list of SearchIndex inconsistencies which can be checked. To repair them, you need to reindex the content completely, what also can be done using JMX:

  • Not indexed document

  • Document indexed more than one time

  • Document corresponding to removed node


All tool activities are stored in a file, which can be found in app directory by the report-<repository name>-dd-MMM-yy-HH-mm.txt name.

Recommendations on how to fix corrupted JCR

Here are examples of corrupted JCR and ways to eliminate them:

  1. Items have no parent

  2. A node has a single valued property with no declaration in the VALUE table.

  3. Nodes have no primary type property.

  4. All value records have no related property record.

  5. Corrupted VALUE records. Both STORAGE_DESC and STORAGE_DESC fields contain non-null value.

  6. Item is its own parent.

  7. Several versions of the same item.

  8. Reference properties without reference records.

  9. A node which is considered to be locked in the lockmanager data is not locked according to the JCR data or the opposite situation.

  10. A property's value is stored in the file system, but its content is missing.

    This cannot be checked via simple SQL queries.

This section will show you how to get and manage all statistics provided by eXo JCR. All the statistics are controlled by the statistics manager which is reponsible for printing data into the CSV files and exposing the statistics through JMX and/or Rest.

Statistics Manager

The statistics manager will create all the CSV files for each category of statistics under its management. These files are in the format of Statistics${category-name}-${creation-timestamp}.csv. Those files will be created into the user directory if it is possible otherwise it will create them into the temporary directory. The .csv files (for example, Comma-Separated Values) includes: one new line which is added regularly (every 5 seconds by default) and one last line which will be added at JVM exit. Each line has 5 figures described below for each method and globally for all methods.


By default, the JVM parameter called JCRStatisticsManager.persistence.enabled is set to "true". Also, the JCRStatisticsManager.persistence.timeout JVM parameter that shows period between each record (for example, line of data into the file) is set to 5000. You can define another periods by setting its value to your desired one in milliseconds.

You can also access the statistics thanks to JMX, the available methods are the following:

getMinGive the minimum time spent into the method corresponding to the given category name and statistics name. The expected arguments are the name of the category of statistics (for example, JDBCStorageConnection) and the name of the expected method or global for the global value.
getMaxGive the maximum time spent into the method corresponding to the given category name and statistics name. The expected arguments are the name of the category of statistics (for example, JDBCStorageConnection) and the name of the expected method or global for the global value.
getTotalGive the total amount of time spent into the method corresponding to the given category name and statistics name. The expected arguments are the name of the category of statistics (for example, JDBCStorageConnection) and the name of the expected method or global for the global value.
getAvgGive the average time spent into the method corresponding to the given category name and statistics name. The expected arguments are the name of the category of statistics (for example, JDBCStorageConnection) and the name of the expected method or global for the global value.
getTimesGive the total amount of times the method has been called corresponding to the given category name and statistics name. The expected arguments are the name of the category of statistics (for example, JDBCStorageConnection) and the name of the expected method or global for the global value.
resetReset the statistics for the given category name and statistics name. The expected arguments are the name of the category of statistics (for example, JDBCStorageConnection) and the name of the expected method or global for the global value.
resetAllReset all the statistics for the given category name. The expected argument is the name of the category of statistics (for example, JDBCStorageConnection).


The full name of the related MBean is exo:service=statistic, view=jcr.

In order to have a better idea of the time spent into the database access layer, it can be interesting to get some statistics on that part of the code, knowing that most of the time spent into eXo JCR is mainly the database access. This statistics will then allow you to identify without using any profiler what is normally slow in this layer, which could help to fix the problem quickly.

In case you use org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer or org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer as WorkspaceDataContainer, you can get statistics on the time spent on the database access layer. The database access layer (in eXo JCR) is represented by the methods of the org.exoplatform.services.jcr.storage.WorkspaceStorageConnection interface, so for all the methods defined in this interface, you can have the following figures:

Those figures are also available globally for all the methods which gives us the global behavior of this layer.

If you want to enable the statistics, you just need to set the JVM parameter called JDBCWorkspaceDataContainer.statistics.enabled to true. The corresponding CSV file is StatisticsJDBCStorageConnection-${creation-timestamp}.csv for more details about how the csv files are managed. See Statistics manager for more details.

The format of each column header is ${method-alias}-${metric-alias}. The metric alias are described in the statistics manager section.

The name of the category of statistics corresponding to these statistics is JDBCStorageConnection, this name is mostly needed to access to the statistics through JMX.


In order to know exactly how your application uses JCR, it can be interesting to register all the JCR API accesses in order to easily create real life test scenario based on pure JCR calls and also to tune your JCR to better fit your requirements.

In order to allow you to specify the configuration which part of JCR needs to be monitored without applying any changes in your code and/or building anything, choose to rely on the Load-time Weaving proposed by AspectJ.

To enable this feature, you will have to add the following jar files to your classpath:

You will also need to get aspectjweaver-1.6.8.jar from the main maven repository http://repo2.maven.org/maven2/org/aspectj/aspectjweaver. At this stage, to enable the statistics on the JCR API accesses, you will need to add the JVM parameter -javaagent:${pathto}/aspectjweaver-1.6.8.jar to your command line. For more details, refer to http://www.eclipse.org/aspectj/doc/released/devguide/ltw-configuration.html.

By default, the configuration will collect statistics on all the methods of the internal interfaces org.exoplatform.services.jcr.core.ExtendedSession and org.exoplatform.services.jcr.core.ExtendedNode, and the JCR API interface javax.jcr.Property. To add and/or remove some interfaces to/from monitor, you have two configuration files changed that are bundled into the exo.jcr.component.statistics-X.Y.Z.jar which includes conf/configuration.xml and META-INF/aop.xml.

The file content below is the content of conf/configuration.xml that you will need to modify to add and/or remove the full qualified name of the interfaces to monitor, into the list of parameter values of the init param called targetInterfaces.


<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd http://www.exoplatform.org/xml/ns/kernel_1_2.xsd"
 xmlns="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd">

 <component>
   <type>org.exoplatform.services.jcr.statistics.JCRAPIAspectConfig</type>
   <init-params>
     <values-param>
       <name>targetInterfaces</name>
       <value>org.exoplatform.services.jcr.core.ExtendedSession</value>
       <value>org.exoplatform.services.jcr.core.ExtendedNode</value>
       <value>javax.jcr.Property</value>
     </values-param>
   </init-params>
  </component>
</configuration>

The file content below is the content of META-INF/aop.xml that you will need to modify to add and/or remove the full qualified name of the interfaces to monitor, into the expression filter of the pointcut called JCRAPIPointcut. As you can see below, by default only JCR API calls from the exoplatform packages are taken into account, do not hesitate to modify this filter to add your own package names.


<aspectj>
  <aspects>
    <concrete-aspect name="org.exoplatform.services.jcr.statistics.JCRAPIAspectImpl" extends="org.exoplatform.services.jcr.statistics.JCRAPIAspect">
      <pointcut name="JCRAPIPointcut"
        expression="(target(org.exoplatform.services.jcr.core.ExtendedSession) || target(org.exoplatform.services.jcr.core.ExtendedNode) || target(javax.jcr.Property)) &amp;&amp; call(public * *(..))" />
    </concrete-aspect>
  </aspects>
  <weaver options="-XnoInline">
    <include within="org.exoplatform..*" />
  </weaver>
</aspectj>

The corresponding CSV files are of the Statistics${interface-name}-${creation-timestamp}.csv type. See Statistics manager for more details about how the csv files are managed.

The format of each column header is ${method-alias}-${metric-alias}. The method alias will be of the ${method-name} type (a list of parameter types separated by semicolon (;) to be compatible with the CSV format).

The name of the category of statistics corresponding to these statistics is the simple name of the monitored interface (for example, ExtendedSession for org.exoplatform.services.jcr.core.ExtendedSession), this name is mostly needed to access the statistics through JMX.

Note

This feature will affect the eXo JCR performance, so it is recommended you use this feature carefully.

This section will show you possible ways of improving JCR.

It is intended for eXo Platform administrators and those who want to use JCR features.

JBoss AS Tuning

You can use maxThreads parameter to increase maximum amount of threads that can be launched in AS instance. This can improve performance if you need a high level of concurrency. Also, you can use the -XX:+UseParallelGC java directory to use parallel garbage collector.

JCR Cache Tuning

Clustering

For performance, it is better to have loadbalancer, the database server, and shared NFS on different computers. If one node gets more load than others, you can decrease this load by using the load value in the load balancer.

JVM parameters

Forse Query Hints

Some databases support hints to increase query performance (like Oracle, MySQL, and more). eXo JCR have separate Complex Query implementation for Orcale dialect, that uses query hints to increase performance for few important queries.

Copyright © 2009-2012. All rights reserved. eXo Platform SAS