Sample configuration, Transaction management – HP Integrity NonStop H-Series User Manual

Page 68

Advertising
background image

Enabling container pooling enables to manage the connections through CLI.

Statement caching can be enabled in the datasources/datasource/statement
element. For more information, see tables 5.15 Pool settings and 5.20 Statement settings
at the

http://docs.jboss.org/ironjacamar/userguide/1.0/en-US/html/

deployment.html#deployingds_descriptor

site that explains all the attributes that can be

configured while defining the connection pool and statement caching.

Sample Configuration

The subsequent subsection explains certain DataSource configurations that are relevant to
SQL/MX.

The following are some salient features of this configuration:

1.

Connection pooling and statement caching are enabled at the driver’s DataSource level.

2.

Although the configuration defines a DataSource which is a non-XA DataSource element,
it can still participate in an XA transaction.

<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<datasources jndi-name="java:/T4NonStopDS" pool-name="NonStopDS"
enabled="true" use-java-context="true”>
<connection-url>jdbc:t4sqlmx://15.154.116.220:21001/:</connection-url>
<connection-property name="catalog">
eapcat
</connection-property>
<connection-property name="schema">
eapsch
</connection-property>
<connection-property name="user">
eap.user
</connection-property>
<connection-property name="password">
pass123
</connection-property>
<connection-property name="intitalPoolSize">
3
</connection-property>
<connection-property name="minPoolSize">
5
</connection-property>
<connection-property name="maxPoolSize">
10
</connection-property>
<connection-property name="maxStatements">
50
</connection-property>
<datasource-class>com.tandem.t4jdbc.SQLMXDataSource</datasource-class>
<!-- driver-class>com.tandem.t4jdbc.SQLMXDriver!-- driver-class>com.tandem.t4jdbc.SQLMXDriver>
<driver>t4sqlmx.jar<//driver>
</datasource>
</datasource>

Transaction management

NSASJ provides support for transactions using JBossTS. The JBossTS library comprises two different
implementations of Java Transaction API (JTA). One is a pure java based implementation, and the
other is the JTA implementation using Java Transaction Service (JTS). NSASJ provides support for
the pure java based JTA implementation.

TMF is the transaction manager available on NonStop platform. TMF can coordinate transactions
across transactional resources such as SQL/MX, SQL/MP, and Enscribe files.

The JTA implementation supported by NSASJ integrates with TMF. Thus, the transaction manager
provided by NSASJ can coordinate transactions not only across the resource adapters such as
JDBC, but also across NonStop resources such as Enscribe and SQL/MX.

The following are the advantages of JTA and TMF integration:

An application programmer can easily write applications for NSASJ without being restricted
to any NonStop platform specifics, or any transaction related API to write applications.

Whenever an application starts an XA transaction, the same thread context has a TMF
transaction context too. A TMF transaction starts in the cover of a transaction manager. Due
to this, when a Pathsend call is made using JToolkit API, the TMF transaction context gets

68

Configuring NSASJ

Advertising
This manual is related to the following products: