Setting concurrent access rights

For file and database persistence types, you can specify that multiple execution units (XU) can concurrently access a ruleset in the persistence layer. For the memory persistence type, the concurrent access is always enabled and you cannot disable it.

About this task

When you set the persistence type to file or database for a ruleset, you can set the property CONCURRENT_PERSISTENCE_ACCESS to enable concurrent, multithreaded access to rulesets by the Execution Unit (XU) on the persistence layer. The default value of this property is false.

Important:

Carefully consider your choice before changing this default value because setting it to true might lead to access conflicts if the database driver does not support multithreading.

Procedure

To set concurrent access rights:

  1. Open the RAR deployment descriptor in any text or XML editor.
  2. Locate the property name <config-property-name>persistenceProperties</config-property-name>.
  3. In the <config-property-value> lines, add the CONCURRENT_PERSISTENCE_ACCESS property and set its value as follows:
    • Jakarta EE database persistence:
      <config-property-value>
         JNDI_NAME=jdbc/resdatasource
         CONCURRENT_PERSISTENCE_ACCESS=false
      </config-property-value>
      
    • Java™ SE database persistence:
      <config-property-value>
            DRIVER_CLASS_NAME=org.apache.h2.jdbc.EmbeddedDriver,
            URL=jdbc:h2:resdb;create=true,
            USER=res,
            PASSWORD=res,
           CONCURRENT_PERSISTENCE_ACCESS=false
      </config-property-value>
      
    • File persistence:
      <config-property-value>
         DIRECTORY=res_data,
         CONCURRENT_PERSISTENCE_ACCESS=false
      </config-property-value>
      
  4. Save the deployment descriptor.
  5. Restart the application server.