summaryrefslogtreecommitdiff
path: root/docs/upgrading/upgrade_4_3_java.html
blob: eabae2d093c6086ca0b0fedb6dab1edb1eca3a1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?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 12.1.6.1</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>