background image
<< java.sql.Blob and java.sql.Clob interfaces | Refined subclasses of SQLException >>

JDBC 4.0 and 4.1 features

<< java.sql.Blob and java.sql.Clob interfaces | Refined subclasses of SQLException >>
Derby Reference Manual
320
a subset of the JDBC 3.0 specification. Support for JSR 169 is limited to the embedded
driver. Derby does not support using the Network Server under JSR 169.
To obtain a connection using JSR 169, use the
org.apache.derby.jdbc.EmbeddedSimpleDataSource
class. This class is
identical in implementation to the
org.apache.derby.jdbc.EmbeddedDataSource
class. See the Derby Developer's Guide for information on using the properties of the
org.apache.derby.jdbc.EmbeddedDataSource
class.
JSR 169 and its Derby implementation have the following limitations:
· Applications must get and set
DECIMAL
values using alternate JDBC
getXXX
and
setXXX
methods, such as
getString()
and
setString()
. Any alternate
method that works against a DECIMAL type with JDBC 3.0 will work in JSR 169.
· The XML data type is not supported, but an application can retrieve, update, query,
or otherwise access an XML data value if it has classes for a JAXP parser and
for Xalan in the classpath. Derby issues an error if either the parser or Xalan is
not found. In some situations, you may need to take steps to place the parser
and Xalan in your classpath. See "XML data types and operators" in the Derby
Developer's Guide
for details.
JSR 169 and its Derby implementation do not support the following:
· Java functions and procedures that use server-side JDBC, that is, routines declared
with
CONTAINS SQL
,
READS SQL DATA
, or
MODIFIES SQL DATA
clauses
· The
DriverManager
interface (this means that you cannot use the
DriverManager.getConnection
method to obtain a connection but must use
the
org.apache.derby.jdbc.EmbeddedSimpleDataSource
class instead)
· The standard URL used to obtain a connection,
jdbc:default:connection
(a runtime error may occur if the routine tries to obtain a connection using
jdbc:default:connection
)
· Diagnostic tables
· Triggers
· Encrypted databases
· Non-blocking I/O
· Java EE resource manager support, including distributed transactions
· Principal-based security
· LDAP-based authentication
· SSL/TLS encryption
· Replication
JDBC 4.0 and 4.1 features
JDBC 4.0 adds some functionality to the core API. This section documents the features
supported by Derby.
All these JDBC 4.0 features are also supported by JDBC 4.1. See
JDBC 4.1-only
features
for information about features supported only by JDBC 4.1.
Note: These features are present only in a JDK 6 or higher environment.
These features are:
· DataSources. To support the JDBC 4.0 ease of development, Derby introduces
new implementations of
javax.sql.DataSource
. See
javax.sql.DataSource
interface: JDBC 4.0 features
.
· Autoloading of JDBC drivers. In earlier versions of JDBC, applications had
to manually register drivers before requesting Connections. With JDBC 4.0,
applications no longer need to issue a Class.forName() on the driver name; instead,