Rtr Service Provider - HP Reliable Transaction Router Getting Started

Reliable transaction router
Table of Contents

Advertisement

Figure 4–6 RTR Service Provider
A database resource is represented by a datasource object.
For the application to locate the datasource representing the
database resource, a naming service that implements the
Java Naming and Directory Interface (JNDI) must be present.
Registering a datasource with the JNDI service enables the
RTR Java J2EE-based application to locate the datasource and
connect to its corresponding database. Once the datasource is
located and the datasource object is instantiated, the datasource
method getConnection( ) is called to obtain a connection object.
The sample Java code from a server Java application illustrates
Sample Java
Java use of a datasource and a connection pool.
server code
Some complex applications require multiple connections to one
or more databases. Connection pooling allows applications to
offload the high overhead of time and computing resources
involved in creating and maintaining multiple connections to one
or more databases. This is accomplished by using connectionpool
objects. Connection pools (like datasources) are registered with a
JNDI service. For more information on JDBC, refer to the Sun
Java web site link for the JDBC Standard Extension API.
DataSource
JRTR Server
Application
// Get a datasource that has been configured by the administrator
DataSource ds = (DataSource)LookupFromJNDI("myDataSource");
// Get a connection to the database
Connection con = ds.getConnection();
Application Programming Interfaces
JNDI
Service Provider
Connection Pool
JDBC Driver
RTR Interfaces 4–17
VM-1181A-AI

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Reliable Transaction Router and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Aa-rle1c-te

Table of Contents