NonStop Server for Java (NSJ) Programmer's Guide (NSJ 2.0+)

Java Naming and Directory Interface (JNDI)
Highlights
The Java Naming and Directory Interface
TM
(JNDI) provides naming and directory functionality to Java programs. It is
independent of any specific directory service implementation; therefore, it allows a variety of directories to be accessed in a
common way.
The JNDI architecture consists of an Application Programming Interface (API) and a Service Provider Interface (SPI). Java
programs use the JNDI API to access a variety of naming and directory services. The JNDI SPI enables a variety of naming
and directory services to be plugged in transparently, allowing Java programs that use the JNDI API to access their services.
JNDI is a Java Standard Extension.
NonStop
TM
Server for Java implements JNDI by means of CORBA naming (COS Naming). Compaq NonStop
TM
EJB provides
a COS Naming Service for JNDI.
For more information about the JNDI, see the Sun Microsystems JNDI document
(http://java.sun.com/products/jndi/javadoc/overview-summary.html).
Enhancements for JDBC
TM
2.0
Sun Microsystems has enhanced JDBC
TM
for version 2.0, dividing those enhancements into two parts: the JDBC 2.0 Core API
and the JDBC 2.0 Standard Extension API. This Programmer's Guide briefly describes these enhancements. For a detailed
description of the enhancements, see the Sun Microsystems JDBC documentation
(http://java.sun.com/products/jdk/1.2/docs/guide/jdbc/index.html).
Core Enhancements
The following enhancements have been made to the core API of JDBC 2.0.
Result Set Enhancements
The following describes the new functionality that has been added to JDBC result sets. The goal of the enhancements is to add
two new basic capabilities to result sets: scrolling and updatability.
Scrolling
The JDBC 1.0 API provided one type of result set: forward-only. The JDBC 2.0 API provides three result set types:
forward-only, scroll-insensitive, and scroll-sensitive. The two new result set types support scrolling, but they differ in their
ability to make changes visible while the result set is open. A scroll-insensitive result set provides a static view of the
underlying data it contains (that is, the membership, order, and column values for rows are fixed when the result set is created).
A scroll-sensitive result set is sensitive to underlying changes that are made while the result set is open (that is, changes in the
underlying column values of rows are visible).
Support of the new result set types is optional for a JDBC driver. You can call the method
DatabaseMetaData.supportsResultSetType() to see which result set types are supported by a JDBC driver. An
application can still make a request to a JDBC driver to create a Statement, PreparedStatement, or
CallableStatement object by using a result set type that the driver does not support. In this case, the driver issues a
SQLWarning on the Connection that produces the statement and chooses an alternative value for the result set type of the
statement.
Because Compaq NonStop
TM
SQL/MP does not support scrollable cursors, NonStop
TM
Server for Java does not support
scroll-sensitive result sets. NonStop
TM
Server for Java supports scroll-insensitive result sets by storing the entire result set in
memory. For this reason, if you select a large scroll-insensitive result set, performance can be affected.
With JDBC 2.0, both Statements and PreparedStatements can be created that generate scroll-insensitive result sets.