summaryrefslogtreecommitdiff
path: root/docs/programmer_reference/ext.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/programmer_reference/ext.html')
-rw-r--r--docs/programmer_reference/ext.html152
1 files changed, 97 insertions, 55 deletions
diff --git a/docs/programmer_reference/ext.html b/docs/programmer_reference/ext.html
index 31d38bd9..c73bea92 100644
--- a/docs/programmer_reference/ext.html
+++ b/docs/programmer_reference/ext.html
@@ -14,13 +14,11 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
- <th colspan="3" align="center">Chapter 22. 
- Berkeley DB Extensions
- </th>
+ <th colspan="3" align="center">Chapter 22.  Berkeley DB Extensions </th>
</tr>
<tr>
<td width="20%" align="left"><a accesskey="p" href="tcl_faq.html">Prev</a> </td>
@@ -34,9 +32,7 @@
<div class="titlepage">
<div>
<div>
- <h2 class="title"><a id="ext"></a>Chapter 22. 
- Berkeley DB Extensions
- </h2>
+ <h2 class="title"><a id="ext"></a>Chapter 22.  Berkeley DB Extensions </h2>
</div>
</div>
</div>
@@ -70,64 +66,110 @@
</div>
</div>
</div>
- <p>A mod_db4 Apache module is included in the Berkeley DB distribution, providing
-a safe framework for running Berkeley DB applications in an Apache 1.3
-environment. Apache natively provides no interface for communication
-between threads or processes, so the mod_db4 module exists to provide
-this communication.</p>
- <p>In general, it is dangerous to run Berkeley DB in a multiprocess system
-without some facility to coordinate database recovery between processes
-sharing the database environment after application or system failure.
-Failure to run recovery after failure can include process hangs and an
-inability to access the database environment. The mod_db4 Apache module
-oversees the proper management of Berkeley DB database environment resources.
-Developers building applications using Berkeley DB as the storage manager
-within an Apache module should employ this technique for proper resource
-management.</p>
- <p>Specifically, mod_db4 provides the following facilities:</p>
+ <p>
+ A mod_db4 Apache module is included in the Berkeley DB
+ distribution, providing a safe framework for running Berkeley
+ DB applications in an Apache 1.3 environment. Apache natively
+ provides no interface for communication between threads or
+ processes, so the mod_db4 module exists to provide this
+ communication.
+ </p>
+ <p>
+ In general, it is dangerous to run Berkeley DB in a
+ multiprocess system without some facility to coordinate
+ database recovery between processes sharing the database
+ environment after application or system failure. Failure to
+ run recovery after failure can include process hangs and an
+ inability to access the database environment. The mod_db4
+ Apache module oversees the proper management of Berkeley DB
+ database environment resources. Developers building
+ applications using Berkeley DB as the storage manager within
+ an Apache module should employ this technique for proper
+ resource management.
+ </p>
+ <p>
+ Specifically, mod_db4 provides the following
+ facilities:
+ </p>
<div class="orderedlist">
<ol type="1">
- <li>New constructors for <a href="../api_reference/C/env.html" class="olink">DB_ENV</a> and <a href="../api_reference/C/db.html" class="olink">DB</a> handles, which install
-replacement open/close methods.</li>
- <li>Transparent caching of open <a href="../api_reference/C/env.html" class="olink">DB_ENV</a> and <a href="../api_reference/C/db.html" class="olink">DB</a> handles.</li>
- <li>Reference counting on all structures, allowing the module to detect the
-initial opening of any managed database and automatically perform recovery.</li>
- <li>Automatic detection of unexpected failures (segfaults, or a module
-actually calling exit() and avoiding shut down phases), and automatic
-termination of all child processes with open database resources to
-attempt consistency.</li>
+ <li>
+ New constructors for <a href="../api_reference/C/env.html" class="olink">DB_ENV</a> and <a href="../api_reference/C/db.html" class="olink">DB</a> handles, which
+ install replacement open/close methods.
+ </li>
+ <li>
+ Transparent caching of open <a href="../api_reference/C/env.html" class="olink">DB_ENV</a> and <a href="../api_reference/C/db.html" class="olink">DB</a>
+ handles.
+ </li>
+ <li>
+ Reference counting on all structures, allowing the
+ module to detect the initial opening of any managed
+ database and automatically perform recovery.
+ </li>
+ <li>
+ Automatic detection of unexpected failures
+ (segfaults, or a module actually calling exit() and
+ avoiding shut down phases), and automatic termination of
+ all child processes with open database resources to
+ attempt consistency.
+ </li>
</ol>
</div>
- <p>mod_db4 is designed to be used as an alternative interface to Berkeley DB. To
-have another Apache module (for example, mod_foo) use mod_db4, do not
-link mod_foo against the Berkeley DB library. In your mod_foo makefile, you
-should:</p>
+ <p>
+ mod_db4 is designed to be used as an alternative interface
+ to Berkeley DB. To have another Apache module (for example,
+ mod_foo) use mod_db4, do not link mod_foo against the Berkeley
+ DB library. In your mod_foo makefile, you should:
+ </p>
<pre class="programlisting">#include "mod_db4_export.h"</pre>
- <p>and add your Apache include directory to your CPPFLAGS.</p>
- <p>In mod_foo, to create a mod_db4 managed <a href="../api_reference/C/env.html" class="olink">DB_ENV</a> handle, use the
-following:</p>
+ <p>
+ and add your Apache include directory to your
+ CPPFLAGS.
+ </p>
+ <p>
+ In mod_foo, to create a mod_db4 managed <a href="../api_reference/C/env.html" class="olink">DB_ENV</a> handle, use
+ the following:
+ </p>
<pre class="programlisting">int mod_db4_db_env_create(DB_ENV **dbenvp, u_int32_t flags);</pre>
- <p>which takes identical arguments to <a href="../api_reference/C/envcreate.html" class="olink">db_env_create()</a>.</p>
- <p>To create a mod_db4 managed <a href="../api_reference/C/db.html" class="olink">DB</a> handle, use the following:</p>
+ <p>
+ which takes identical arguments to <a href="../api_reference/C/envcreate.html" class="olink">db_env_create()</a>.
+ </p>
+ <p>
+ To create a mod_db4 managed <a href="../api_reference/C/db.html" class="olink">DB</a> handle, use the
+ following:
+ </p>
<pre class="programlisting">int mod_db4_db_create(DB **dbp, DB_ENV *dbenv, u_int32_t flags);</pre>
- <p>which takes identical arguments to <a href="../api_reference/C/dbcreate.html" class="olink">db_create()</a>.</p>
- <p>Otherwise the API is completely consistent with the standard Berkeley DB
-API.</p>
- <p>The mod_db4 module requires the Berkeley DB library be compiled with C++
-extensions and the MM library. (The MM library provides an abstraction
-layer which allows related processes to share data easily. On systems
-where shared memory or other inter-process communication mechanisms are
-not available, the MM library emulates them using temporary files. MM
-is used in several operating systems to provide shared memory pools to
-Apache modules.)</p>
- <p>To build this apache module, perform the following steps:</p>
+ <p>
+ which takes identical arguments to <a href="../api_reference/C/dbcreate.html" class="olink">db_create()</a>.
+ </p>
+ <p>
+ Otherwise the API is completely consistent with the standard
+ Berkeley DB API.
+ </p>
+ <p>
+ The mod_db4 module requires the Berkeley DB library be
+ compiled with C++ extensions and the MM library. (The MM
+ library provides an abstraction layer which allows related
+ processes to share data easily. On systems where shared memory
+ or other inter-process communication mechanisms are not
+ available, the MM library emulates them using temporary files.
+ MM is used in several operating systems to provide shared
+ memory pools to Apache modules.)
+ </p>
+ <p>
+ To build this apache module, perform the following
+ steps:
+ </p>
<pre class="programlisting">% ./configure --with-apxs=[path to the apxs utility] \
- --with-db4=[Berkeley DB library installation directory] \
- --with-mm=[libmm installation directory]
+ --with-db4=[Berkeley DB library installation directory] \
+ --with-mm=[libmm installation directory]
% make
% make install</pre>
- <p>Post-installation, modules can use this extension via the functions
-documented in $APACHE_INCLUDEDIR/mod_db4_export.h.</p>
+ <p>
+ Post-installation, modules can use this extension via the
+ functions documented in
+ $APACHE_INCLUDEDIR/mod_db4_export.h.
+ </p>
</div>
</div>
<div class="navfooter">