Posted: 11 Dec 2015 13:58 EST Last activity: 21 Dec 2015 10:59 EST
Understanding JBoss EAP 6.x Settings
We are currently installing PRPC 7.1.9 on JBoss EAP 6.4.4 with an Oracle 11g database. I had questions on some of the settings and installation steps outlined in the PRPC Installation guide, as we would like to know WHY Pega has identified various settings.
1: Why is use-ccm set to false on the datasource configuration:
Example from install guide: <datasource jta="false" jndi-name="java:/jdbc/PegaRULES" poolname="PegaRULES" enabled="true" use-ccm="false">
CCM is set to TRUE by default. It is my understanding that this feature can prevent leaked datasource connections. Why would we want to disable this feature?
2: Prepared statement sharing: Pega Performance engineering has recommended the use of prepared statements. Why is share-prepared-statements set to false in the instructions?
Will sharing prepared statements cause any problems with PRPC? If not, why is this indicated in the install guide.
3: Is datasource driver class necessary?
We installed the Oracle JDBC driver using the default driver installation tools as a part of the JBOSS installation. This configured the datasources with just a <driver>oracle</driver> entry, and did not include a <driver-class> entry. Is there any reason to include the driver-class entry?
4: Differences with Standard oracle driver installation vs. Pega instructed driver installation:
When installing the oracle driver using the jboss default driver installation methods, we noticed the following differences between the defaults and instructions in the pega install documentation:
Driver module path: Default installation path is: $JBOSS_HOME/modules/oracle/jdbc/main, Pega instructed path is: $JBOSS_HOME/modules/system/layers/base/com/oracle/main. Is there a specific reason for using this path?
Differences in module.xml file: Pega documentation instructs to add the following properties in the module.xml file: <property name="jboss.api" value="unsupported"/>, <module name="javax.servlet.api" optional="true"/> What do these changes support? If we do not include these properties will there be any impact on the application?
Driver Configuration: The default driver installation produces the following configuration:
In step 6 of the Setting Red Hat JBoss application deployment parameters section, the JNDI value listed does NOT match the JNDI values specified in the datasource section earlier in the document. My working config looks like this:
Note the value is different from the listed: java:comp/env/jdbc/AdminPegaRULES that is in the installation document. This section should be updated to the correct value of: java:/jdbc/AdminPegaRULES
Please note, my current working configuration is using the default driver installation methods provided by the jboss installer, and not the methods identified in the install document. I have not seen any issues so far because of this, however I would like to vet this configuration before moving it to upper environments.
Lots of good questions!!! Let me try to answer them one by one:
1. We should not. I checked the history of this in Redhat's web site, there was a bug in JBoss when you create datasource from admin console you get use-ccm set to false in standalone.xml. It has since been fixed in JBoss EAP 6.4. That was probably why the guide uses that setting. use-ccm essentially uses JBoss CachedConnectionManager.
2. No reason to disable the statement cache. However, we do expect customers to tune as necessary based on their own needs. For production environment, using the cache is probably a better option as suggested by our performance team.
3. If you only have one driver class, it should not be needed, but it does not hurt to specify either. However, if you have more than one, you may need to specify that for the second one.
4. One is for xa driver, and pega's example for non-xa driver. Both should be supported pending your own need.
5. this is a doc bug, will be addressed in the next release. You are absolutely right on!
I believe <property name="jboss.api" value="unsupported"/> simply means that the current module is not accessible from JBoss pubic API. <module name="javax.servlet.api" optional="true"/> means that the dependent module javax.servlet.api is NOT optional (i.e., required). Here is the documentation from the relevant xsd (.../docs/schema/module-1_1.xsd):
Specifies whether this dependency is optional (defaults to false). An optional dependency will not
cause the module to fail to load if not found; however if the module is added later, it will not be
retroactively linked into this module's dependency list.
The jndi settings are what is intended but that may be due to how JBoss handles the naming context. In Websphere for example, using java:/comp/env does work.