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

Enhancements for JDBC 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
documentation.
The new features added to the JDBC 2.0 Core API are as follows:
Result set enhancements: These consist of scrollable and updatable result sets. These enhancements
are partially supported because they allow the NonStop
TM
Server for Java to support cached row sets
(a part of the Standard Extension API, which is useful with JavaBeans). There are two types of
scrollable result sets: sensitive (the result set reflects changes to the database) and insensitive (the
result set does not reflect changes to the database). Only scroll-insensitive result sets are supported.
Because SQL/MP does not support scrollable cursors, it would be difficult, if not impossible, to
deliver adequate performance with scroll-sensitive result sets.
Batch Updates: These allow a Statement object to submit a set of heterogeneous update
commands together as a single unit, or batch, to the underlying DBMS. Autocommit mode is always
false when doing batch updates. This enhancement is supported as it is expected that solutions will
have such functionality in the future.
Advanced data types: These include persistent Java objects as well as SQL 3 data types. With the
exception of Binary Large OBjects (BLOBs) and Character Large OBjects (CLOBs), these
enhancements are not supported because SQL/MP does not support these data types. Blob and
Clob objects are implemented because the NonStop
TM
Server for Java is already implementing the
ability to use BLOBs with SQL to support solution vendors.
Miscellaneous features: These include enhancements to ResultSet and DriverManager. These
enhancements are supported.
JNDI for naming databases:
The new features added to the JDBC 2.0 Standard Extensions API are:
This allows an application to specify a logical name that JNDI (Java Naming and Directory
Interface) associates with a particular data source. This enhancement is supported because the
NonStop
TM
Server for Java expects most solutions will use this method to obtain a connection;
additionally, the Driver Manager class is being deprecated.
Connection pooling: This is a cache of database connections that is maintained in memory so that
connections can be reused. This enhancement is primarily for middle-tier applications and is
suggested because for many vendors there is a cost associated with obtaining a database connection.
This enhancement is not supported because there is no cost involved with obtaining a SQL/MP
database connection.
Distributed transactions: supports the concept of a global (distributed) transaction for those
implementing resource managers. From an application perspective, the NonStop
TM
Server for Java
JDBC driver supports distributed transactions in a standard way. The NonStop
TM
Server for Java
does not support the middleware (those implementing resource managers) pieces of distributed
transactions.
Cached row sets: provides an object that encapsulates a set of rows that have been retrieved from
some tabular data source. The CachedRowSet interface adds support to the JDBC API for the
JavaBeans
TM
component model. Because the NonStop
TM
Server for Java expects that solutions