libdb/docs/upgrading/upgrade_4_3_java.html
2011-09-13 13:44:24 -04:00

105 lines
5.2 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Java</title>
<link rel="stylesheet" href="gettingStarted.css" type="text/css" />
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
<link rel="start" href="index.html" title="Berkeley DB Upgrade Guide" />
<link rel="up" href="upgrade_4_3_toc.html" title="Chapter 7. Upgrading Berkeley DB 4.2 applications to Berkeley DB 4.3" />
<link rel="prev" href="upgrade_4_3_toc.html" title="Chapter 7. Upgrading Berkeley DB 4.2 applications to Berkeley DB 4.3" />
<link rel="next" href="upgrade_4_3_err.html" title="DB_ENV-&gt;set_errcall, DB-&gt;set_errcall" />
</head>
<body>
<div xmlns="" class="navheader">
<div class="libver">
<p>Library Version 11.2.5.2</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
<th colspan="3" align="center">Java</th>
</tr>
<tr>
<td width="20%" align="left"><a accesskey="p" href="upgrade_4_3_toc.html">Prev</a> </td>
<th width="60%" align="center">Chapter 7. Upgrading Berkeley DB 4.2 applications to Berkeley DB 4.3</th>
<td width="20%" align="right"> <a accesskey="n" href="upgrade_4_3_err.html">Next</a></td>
</tr>
</table>
<hr />
</div>
<div class="sect1" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a id="upgrade_4_3_java"></a>Java</h2>
</div>
</div>
</div>
<p>The Berkeley DB Java API has changed significantly in the 4.3 release, in ways
incompatible with previous releases. This has been done to provide a
consistent Java-like API for Berkeley DB as well as to make the Berkeley DB Java API
match the API in Berkeley DB Java Edition, to ease application-porting between
the two libraries.</p>
<p>Here is a summary of the major changes:</p>
<div class="orderedlist">
<div class="itemizedlist">
<ul type="disc">
<li>Db -&gt; Database</li>
<li>Dbc -&gt; Cursor</li>
<li>Dbt -&gt; DatabaseEntry</li>
<li>DbEnv -&gt; Environment</li>
<li>DbTxn -&gt; Transaction</li>
<li>Db.cursor -&gt; Database.openCursor</li>
<li>Dbc.get(..., DbConstants.DB_CURRENT) -&gt; Cursor.getCurrent(...)</li>
</ul>
</div>
<ol type="1">
<li>The low-level wrapper around the C API has been moved into a package
called com.sleepycat.db.internal.</li>
<li>There is a new public API in the package com.sleepycat.db.</li>
<li>All flags and error numbers have been eliminated from the public API.
All configuration is done through method calls on configuration objects.</li>
<li>All classes and methods are named to Java standards, matching Berkeley DB Java
Edition. For example:</li>
<li>The statistics classes have "getter" methods for all fields.</li>
<li>In transactional applications, the Java API infers whether to
auto-commit operations: if an update is performed on a transactional
database without supplying a transaction, it is implicitly
auto-committed.</li>
<li>The com.sleepycat.bdb.* packages have been reorganized so that the binding
classes can be used with the base API in the com.sleepycat.db package. The
bind and collection classes are now essentially the same in Berkeley DB and Berkeley DB
Java Edition. The former com.sleepycat.bdb.bind.* packages are now the
com.sleepycat.bind.* packages. The former com.sleepycat.bdb,
com.sleepycat.bdb.collections, and com.sleepycat.bdb.factory packages are now
combined in the new com.sleepycat.collections package.</li>
<li>A layer of the former collections API has been removed to simplify the API and
to remove the redundant implementation of secondary indices. The former
DataStore, DataIndex, and ForeignKeyIndex classes have been removed. Instead
of wrapping a Database in a DataStore or DataIndex, the Database object is now
passed directly to the constructor of a StoredMap, StoredList, etc.</li>
</ol>
</div>
</div>
<div class="navfooter">
<hr />
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left"><a accesskey="p" href="upgrade_4_3_toc.html">Prev</a> </td>
<td width="20%" align="center">
<a accesskey="u" href="upgrade_4_3_toc.html">Up</a>
</td>
<td width="40%" align="right"> <a accesskey="n" href="upgrade_4_3_err.html">Next</a></td>
</tr>
<tr>
<td width="40%" align="left" valign="top">Chapter 7. Upgrading Berkeley DB 4.2 applications to Berkeley DB 4.3 </td>
<td width="20%" align="center">
<a accesskey="h" href="index.html">Home</a>
</td>
<td width="40%" align="right" valign="top"> DB_ENV-&gt;set_errcall, DB-&gt;set_errcall</td>
</tr>
</table>
</div>
</body>
</html>