Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-4593

Example in Commit Markable Resource is bad for performance

    XMLWordPrintable

Details

    Description

      In the JBoss EAP Development guide, in section 12.3.2.1 for EAP 6.4 (and this will be in EAP 7 too, but I'm not sure if the section numbering is the same, because the EAP 7 docs aren't up on the portal yet), we give example configurations for setting up datasources for using the commit markable resources optimization.

      In those examples, we show setting the Cached Connection Manager (ccm) to true. In the actual application server, we now use a default of false, because true is not needed in almost all applications, and it causes performance degradation.

      So, our examples should not be showing people setting that value to true, and in fact, the examples should only be showing setting the connectable attribute to true, and shouldn't show all the other extraneous settings that are unrelated.

      Here is the section that is problematic:

      Enabling a resource manager as CMR
      By default, the CMR feature is disabled for datasources. To enable it, you must create or modify the datasource configuration and ensure that the connectible attribute is set to true. An example configuration entry in the datasources section of a server xml configuration file could be as follows:

      <datasource enabled="true" jndi-name="java:jboss/datasources/ConnectableDS" pool-name="ConnectableDS" jta="true" use-java-context="true" spy="false" use-ccm="true" connectable="true"/>

      Note
      This feature is not applicable to XA datasources.
      You can also enable a resource manager as CMR using CLI as follows:

      /subsystem=datasources/data-source=ConnectableDS:add(enabled="true", jndi-name="java:jboss/datasources/ConnectableDS", jta="true", use-java-context="true", spy="false", use-ccm="true", connectable="true", connection-url="validConnectionURL", exception-sorter="org.jboss.jca.adapters.jdbc.extensions.mssql.MSSQLExceptionSorter", driver-name="h2")

      If these were changed to the following they would be fine:

      Enabling a resource manager as CMR
      By default, the CMR feature is disabled for datasources. To enable it, you must create or modify the datasource configuration and ensure that the connectible attribute is set to true. An example configuration entry in the datasources section of a server xml configuration file could be as follows:

      <datasource enabled="true" jndi-name="java:jboss/datasources/ConnectableDS" pool-name="ConnectableDS" jta="true" use-java-context="true" connectable="true"/>

      Note
      This feature is not applicable to XA datasources.
      You can also enable a resource manager as CMR using CLI as follows:

      /subsystem=datasources/data-source=ConnectableDS:add(enabled="true", jndi-name="java:jboss/datasources/ConnectableDS", jta="true", use-java-context="true", connectable="true", connection-url="validConnectionURL", exception-sorter="org.jboss.jca.adapters.jdbc.extensions.mssql.MSSQLExceptionSorter", driver-name="h2")

      People will tend to follow the examples blindly without understanding the settings that are unrelated, and if they do that in this case, it will lead, unnecessarily, to a performance degradation.

      Attachments

        Issue Links

          Activity

            People

              rhn-support-pnag Priyanka Pandey
              rhn-engineering-anmiller Andrig Miller (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: