You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by th...@apache.org on 2003/06/20 09:29:59 UTC
cvs commit: db-ojb/xdocs faq.xml howto-work-with-clustering.xml
thma 2003/06/20 00:29:59
Modified: xdocs faq.xml howto-work-with-clustering.xml
Log:
add faq entry on clustering
Revision Changes Path
1.23 +56 -0 db-ojb/xdocs/faq.xml
Index: faq.xml
===================================================================
RCS file: /home/cvs/db-ojb/xdocs/faq.xml,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- faq.xml 14 Jun 2003 22:06:43 -0000 1.22
+++ faq.xml 20 Jun 2003 07:29:59 -0000 1.23
@@ -66,6 +66,7 @@
<li><a href="#FAQ36">Can OJB handle ternary (or higher) associations?</a></li>
<li><a href="#How to map a list of Strings">How to map a list of Strings</a></li>
<li><a href="#How to set up Optimistic Locking">How to set up Optimistic Locking</a></li>
+ <li><a href="#How to use OJB in a cluster">How to use OJB in a cluster</a></li>
</ul>
@@ -1299,6 +1300,61 @@
For further reference see also
<a href="repository.html#field-descriptor">the repository documentation</a>.
</subsection>
+
+
+ <subsection name="How to use OJB in a cluster">
+ <p>
+ Q: I'm running a web site in a load-balanced/cluster environment.
+ Multiple servlet engines (different VMs/HTTP sessions), each running an OJB
+ instance, against a single shared database.
+ How should OJB be configured to get the concurrent
+ servlet engines synchronized properly?
+ </p>
+
+ <p>
+ <b>transactional isolation and locking</b><br/>
+ If you are using the PersistenceBroker API
+ use optimistic locking (OL) to let OJB handle write conflicts.
+ To use OL define a TIMESTAMP or INTEGER column and the respective Java attribute for it.
+ In the field-descriptor of this attribute set the attribute
+ locking="true"
+ <br/>
+ If you are working with the ODMG API use the PersistenLockMapImpl,
+ by setting the respective flag in OJB.properties.
+ </p>
+
+ <p>
+ <b>sequence numbers</b><br/>
+ Use a SequenceManager that is safe across multiple JVMs.
+ The NextVal based SequenceManagers or any other SequenceManager
+ based on database mechanisms will be fine.
+ </p>
+
+ <p>
+ <b>caching</b><br/>
+ You could
+ <ol>
+ <li>
+ Use the EmptyCacheImpl to avoid any dirty reads. (But: The EmptyCache
+ cannot handle cyclic structures on load!)
+ </li>
+ <li>
+ Use the PerBrokerCache Implementation. Could result in dirty reads, but
+ together with Optimistic locking this should be OK.
+ </li>
+ <li>
+ Use the JCS cache implementation (see OJB.properties).
+ JCS will coordinate the distributed
+ caches on all clients. JCS will involve some RMI communication between the
+ caches. Please have a look at the JCS site for configuration details.
+ </li>
+ </ol>
+ There is also a <a href="howto-work-with-clustering.html">
+ complete howto document</a>
+ available that covers these topics.
+ </p>
+ </subsection>
+
</section>
</body>
</document>
1.2 +1 -1 db-ojb/xdocs/howto-work-with-clustering.xml
Index: howto-work-with-clustering.xml
===================================================================
RCS file: /home/cvs/db-ojb/xdocs/howto-work-with-clustering.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- howto-work-with-clustering.xml 14 Jun 2003 22:06:01 -0000 1.1
+++ howto-work-with-clustering.xml 20 Jun 2003 07:29:59 -0000 1.2
@@ -21,7 +21,7 @@
Tangosol Coherence is a high-performance, and very nice caching product.
I've only just begun using it, but already it seems excellent.
- You can download a 30-day evaulation license. <br/>
+ You can download a 30-day evaluation license. <br/>
I'm regurgitating some stuff that Thomas Mahler put on the mailing list,
and then adding more that is specific to using Tangosol coherence.