Nsmq.jndi.properties, Datasource configuration, Connection – HP Integrity NonStop H-Series User Manual
Page 64: Connection pooling, Statement caching, Connection connection pooling statement caching

nsmq.jndi.properties
This file contains mapping data that is required to create the admin objects of NSMQ. The format
of the mappings is
For example, java\:jboss/exported/jms/RemoteConnectionFactory=tcp://
15.154.120.44:7900
NOTE:
The : is escaped as it is a special character. It needs to be escaped only in the key. If
the JNDI name refers to Topic or a Queue, then the corresponding value must be the name of Topic
or Queue.
For example, java\:jboss/exported/jms/topic/ism=TOPIC.TEST
DataSource configuration
This section explains the configuration of SQL/MX DataSources in NSASJ. Before proceeding
to the actual configuration of a DataSource in NSASJ, this section guides you through certain
concepts of DataSource, Connection, Connection pooling, and Statement Caching. These concepts
later help in understanding NSASJ DataSource configuration.
Connection
A Connection object provides a link to the underlying physical data source such as a database.
Database operations are done by executing SQL statements on a particular connection. A connection
object is obtained using a JDBC driver. A driver implements certain low level system contracts with
the database to obtain database connections.
SQL/MX JDBC T4 driver provides an implementation of the java.sql.Driver interface in the
class com.tandem.t4jdbc.SQLMXDriver. This class can be used to get the connections by
invoking the method connect (String URL, Properties info). The SQL/MX JDBC T4
driver implementation defines a set of properties that can be provided while creating a connection.
These properties, among other things, define the behavior of the connection. Some of the specific
properties are discussed later while configuring a DataSource.
NOTE:
The examples quoted here are for T4 driver, but they are applicable to T2 driver as well.
The values that are specific to T4 driver must be replaced by the T2 driver specifics.
Connection Pooling
Creating a new connection can be time consuming. Connections are pooled to prevent creation
of new connections very often. When connections are pooled, an application gets a reference to
a connection from the pool rather than creating a new connection. Connections can be pooled at
various levels. For instance, a driver itself can pool connections. The connections can also be
pooled by an implementation of ConnectionPoolDataSource.
Statement caching
Database operations are done by executing SQL statements. When an application executes a
statement, the statement first gets prepared, and then is executed. This happens at the back end,
and the application does not note this.
On databases like SQL/MX, preparing a statement might be a resource intensive and a time
consuming operation. However, the overall time to execute a statement can be reduced if the
prepare
operation can be avoided with every execution of the statement. SQL/MX JDBC provides
a feature where statements are cached within each connection.
64
Configuring NSASJ