Modifying the hibernate application, Enabling browse access, Hibernate applications – HP Integrity NonStop J-Series User Manual

Page 191

Advertising
background image

4.

To enable the MFC feature, add the statement_module_caching environment variable
to the datasource:

mxci>> add evar $mcbs."MFC_datasource".statement_module_caching, type set,
value 'true';

NOTE:

MFC can have only two values: true or false.

5.

Add the compiled_module_location environment variable to the datasource:

mxci>> add evar $mfc."MFC_datasource".compiled_module_location, type set,
value 'default';

NOTE:

The compiled_module_location can be set to a value other than default, such

as, /usr/sash. However, you must ensure that the directory is created before specifying it.

mxci>> add evar $mfc."MFC_datasource".compiled_module_location, type set,
value '/usr/sash';

6.

Start the datasource:

>> start ds $mfc."MFC_datasource";

For more details, see the JDBC Type 4 Driver 2.0 Programmer's Reference.

Modifying the Hibernate Application

NOTE:

If the default datasource is configured for MFC, do not modify the Hibernate application.

To use the MFC feature , modify the Hibernate application using the following steps:

hibernate.properties

file

Modify the hibernate.properties file as follows:

To set serverDataSource to the datasource name on which MFC is configured, add
the following:

hibernate.connection.serverDataSource MFC_datasource

hibernate.cfg.xml

file

Modify the hibernate.cfg.xml file as follows:

To modify the hibernate.properties file, complete the following steps:

To set serverDataSource to the datasource name on which MFC is configured, add
the following:

<property name="connection.serverDataSource">MFC_datasource</property>

Enabling Browse Access

Browse Access is a SQL/MX specific feature, which allows you to read uncommitted data from a
table. The feature uses the Hibernate interceptor, which intercepts SQL queries and appends
for browse access

string based on the configurations defined in the query filtering criteria of

BrowseAccessIncludeExcludeList.xml

file. You can use the Browse Access feature in

Hibernate

applications, and Spring and Hibernate applications.

Hibernate

Applications

For Hibernate applications, the interceptor cannot be injected on the Hibernate Configuration
object through the configuration. Code must be changed to inject the interceptor on the
Configuration

object. The changes required to enable Browse Access feature are:

Enabling Browse Access

191

Advertising
This manual is related to the following products: