blob: b402b042f2689f61efa0a0ffaed7edd60a9f09fb [file] [log] [blame]
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>23.&nbsp; IBM solidDB</title><link rel="stylesheet" href="css/docbook.css" type="text/css"><base href="display"><meta name="generator" content="DocBook XSL Stylesheets V1.72.0"><link rel="start" href="manual.html" title="Apache OpenJPA 2.1 User's Guide"><link rel="up" href="supported_databases.html" title="Appendix&nbsp;2.&nbsp; Supported Databases"><link rel="prev" href="dbsupport_postgresql.html" title="22.&nbsp; PostgreSQL"><link rel="next" href="dbsupport_sybase.html" title="24.&nbsp; Sybase Adaptive Server"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">23.&nbsp;
IBM solidDB
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="dbsupport_postgresql.html">Prev</a>&nbsp;</td><th width="60%" align="center">Appendix&nbsp;2.&nbsp;
Supported Databases
</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="dbsupport_sybase.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="dbsupport_soliddb"></a>23.&nbsp;
IBM solidDB
</h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="dbsupport_soliddb.html#dbsupport_soliddb_table_types">23.1.
M-type tables vs. D-type tables
</a></span></dt><dt><span class="section"><a href="dbsupport_soliddb.html#dbsupport_soliddb_concurrency_control">23.2.
Concurrency control mechanism
</a></span></dt></dl></div><div class="example"><a name="example_props_soliddb"></a><p class="title"><b>Example&nbsp;2.23.&nbsp;
Example properties for IBM solidDB
</b></p><div class="example-contents"><pre class="programlisting">
openjpa.ConnectionDriverName: solid.jdbc.SolidDriver
openjpa.ConnectionURL: jdbc:solid://localhost:2315/dba/dba
</pre></div></div><br class="example-break"><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="dbsupport_soliddb_table_types"></a>23.1.&nbsp;
M-type tables vs. D-type tables
</h3></div></div></div><p>
IBM solidDB supports two types of tables: in-memory tables (M-tables) and
on-disk tables (D-tables). Since cursor hold over commit can not apply to M-tables
(which will cause SOLID Table Error 13187: The cursor cannot continue
accessing M-tables after the transaction has committed or aborted.
The statement must be re-executed), the default OpenJPA tables are D-tables.
One can set the whole server to disk-based mode by adding
[General]
DefaultStoreIsMemory=no
in solid.ini. The table types can also be determined by setting OpenJPA property
"openjpa.jdbc.DBDictionary" with value "storeIsMemory=true" or "storeIsMemory=false"
in the persistence.xml. The "STORE MEMORY" and "STORE DISK" will be appended to
the create table DDL, respectively.
</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="dbsupport_soliddb_concurrency_control"></a>23.2.&nbsp;
Concurrency control mechanism
</h3></div></div></div><p>
The default concurrency control mechanism depends on the table type:
Disk-based tables (D-tables) are by default optimistic.
Main-memory tables (M-tables) are always pessimistic.
Since OpenJPA applications expects lock waits as usually is done with
normal pessimistic databases, the server should be set to the pessimistic mode.
The optimistic mode is about not waiting for the locks at all. That increases
concurrency but requires more programming. The pessimistic mode with the
READ COMMITTED isolation level (default) should get as much concurrency as one
might need. The pessimistic locking mode can be set in solid.ini:
[General]
Pessimistic=yes
One can override the locking mode on the per table base by setting OpenJPA property
"openjpa.jdbc.DBDictionary" to value "lockingMode=PESSIMISTIC" in the persistence.xml.
An extra SQL will be generated along with CREATE TABLE DDL:
ALTER TABLE EX_POBJECT SET PESSIMISTIC.
The possible values for lockingMode is OPTIMISTIC/PESSIMISTIC.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="dbsupport_postgresql.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="supported_databases.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="dbsupport_sybase.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">22.&nbsp;
PostgreSQL
&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="manual.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;24.&nbsp;
Sybase Adaptive Server
</td></tr></table></div></body></html>