JDBC Type 2 Driver Programmer's Reference for SQL/MX Release 3.2.1 (H06.26+, J06.15+)

6 Module File Caching
The Module File Caching (MFC) feature shares the SQL/MX prepared statement plans among the
JDBC/MX T2 database connections and JVM processes. It helps in reducing the SQL/MX compilation
time during the steady state of the JDBC/MX T2 application, thereby reducing resource consumption.
NOTE: Module File Caching is supported only on systems running J06.07 and later J-series RVUs,
and H06.18 and later H-series RVUs.
The topics discussed in this chapter are:
“What is New” (page 58)
“Design of MFC” (page 58)
“Enabling MFC” (page 58)
“Limitations of MFC” (page 58)
“Troubleshooting MFC” (page 59)
What is New
Starting with SQL/MX Release 3.2, MFC supports the BigNum data type in parameterized queries.
Design of MFC
For information on the MFC design, see the HP NonStop SQL/MX Connectivity Service Manual.
Enabling MFC
The following are the two new properties which are required for using MFC in an application that
uses the JDBC/MX T2 Driver.
enableMFC Property:
To enable MFC, the value of this property must be set to ON.
compiledModuleLocation Property:
The value for this property must be a valid directory name. For example: /usr/temp. This
is the location where the intermediary files such as *.mdf for MFC are generated.
Both these properties must be set to enable MFC.
Limitations of MFC
MFC cache should be used only on production systems. It should not be used on development
or User Acceptance Testing (UAT) systems where SQL/MX undergoes changes.
It does not handle session-specific SQL/MX Control Query Defaults (CQD) and SQL/MX
Control Query Shape (CQS).
HP recommends that when using with MFC, set the CQD in SQL/MX for disabling the
auto-recompilation feature of SQL/MX. The CQD for disabling the auto-recompilation is
"CONTROL QUERY DEFAULT RECOMPILATION_WARNINGS 'ON'". This ensures that
automatic recompilations are avoided due to changes in SQL/MX objects because the plans
are generated in the module file. The application will receive an SQL/MX exception if there
is an auto-recompilation required for the query. You must clean the stale module files before
continuing with the application. For more information on the CQD, see the HP NonStop
SQL/MX Release 3.2.1 Reference Manual.
For lightweight queries, MFC performs only marginally better than the SQL/MX compile.
58 Module File Caching