beautypg.com

Modifying the hibernate application – HP Integrity NonStop H-Series User Manual

Page 328

background image

NOTE:

You can configure any number of servers based on your requirement. If you do

not specify the number of servers, the default value (

maxserver=5

,

initserver=1

, and

idleserver=1

) is assumed.

3.

Stop the datasource:

mxci>> stop ds MFC_datasource, reason 'test';

NOTE:

This step must be performed only if you have a configured datasource in the started

status.

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:

MFC_datasource

328

Configuring Hibernate Applications on NonStop Systems

This manual is related to the following products: