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/01/26 15:37:43 UTC
cvs commit: jakarta-ojb/xdocs repository.xml
thma 2003/01/26 06:37:43
Modified: src/test/org/apache/ojb repository.dtd
xdocs repository.xml
Log:
update repository documentation wrt.
- sequence-manager element
- optional handling of id attributes
Revision Changes Path
1.31 +8 -3 jakarta-ojb/src/test/org/apache/ojb/repository.dtd
Index: repository.dtd
===================================================================
RCS file: /home/cvs/jakarta-ojb/src/test/org/apache/ojb/repository.dtd,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- repository.dtd 15 Jan 2003 10:51:23 -0000 1.30
+++ repository.dtd 26 Jan 2003 14:37:43 -0000 1.31
@@ -360,9 +360,14 @@
-->
<!ELEMENT field-descriptor (documentation?, attribute*)>
<!--
- The id attribute must contain a unique number identifying the decriptor.
- The numbers for the attributes of a class must correspond to the order
- of columns in the mapped table.
+ <b>The id attribute is optional.</b> If not specified, OJB internally
+ sorts field-descriptors according to their order of appearance in the
+ repository file.
+ If a different sort order is intended the id attribute may be used to
+ hold a unique number identifying the decriptors position in the sequence of
+ field-descriptors.
+ The order of the numbers for the field-descriptors must correspond to
+ the order of columns in the mapped table.
The name attribute holds the name of the persistent classes attribute.
If the PersistentFieldDefaultImpl is used there must be an attribute
1.13 +70 -5 jakarta-ojb/xdocs/repository.xml
Index: repository.xml
===================================================================
RCS file: /home/cvs/jakarta-ojb/xdocs/repository.xml,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- repository.xml 15 Jan 2003 10:51:23 -0000 1.12
+++ repository.xml 26 Jan 2003 14:37:43 -0000 1.13
@@ -73,11 +73,15 @@
touch the isolation-level off the database.
<br/><br/>
The version attribute is used to bind a repository.xml file to a given
- version of this dtd. This will help to avoid versions conflicts.
+ version of this dtd.
+ A given OJB release will work properly only with the repository version
+ shipped with that relase.
+ This strictness maybe inconvenient but it does help to avoid the
+ most common version conflicts.
</p>
<source><![CDATA[
<!ATTLIST descriptor-repository
- version (0.9.6) #REQUIRED
+ version (0.9.9) #REQUIRED
isolation-level (read-uncommitted | read-committed |
repeatable-read | serializable |
optimistic) "read-uncommitted"
@@ -308,6 +312,62 @@
</subsection>
+<subsection name="sequence-manager">
+<p>
+ The sequence-manager element specifies the sequence
+ manager implementation used for key generation. All
+ sequence manager implementations shipped with OJB
+ you will find under org.apache.ojb.broker.util.sequence
+ If no sequence-manager is defined, OJB use the default one.
+<br/><br/>
+ Use the attribute element to pass implementation specific
+ properties.
+</p>
+
+<source><![CDATA[
+<!ELEMENT sequence-manager (documentation?, attribute*)>
+]]></source>
+
+<p>
+ The className attribute represents the full qualified class name
+ of the desired sequence manager implementation - it is mandatory
+ when using the sequence-manager element.
+ All sequence manager implementations you find will under
+ org.apache.ojb.broker.util.sequence package named as SequenceManagerXXXImpl
+<br/><br/>
+ Sequence Manager implementations
+<br/><br/>
+ 1. className="org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl"
+ High/Low sequence manager implementation. This is OJB's default sequence manager.
+<br/><br/>
+ 2. className=org.apache.ojb.broker.util.sequence.SequenceManagerInMemoryImpl
+ InMemory-sequence manager implementation.
+ This is the fastest standard sequence manager implementation, but
+ has some limitations:<br/>
+ - do not use in client/server mode<br/>
+ - do not use in clustered environments<br/>
+ - do not use if other entities generate id's for the persistent objects
+<br/><br/>
+ 3. className=org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl
+ Use database based sequence generation. Check your DB for support, add
+ a extent aware 'sequence-name' attribute to your autoincrement field
+ descriptors. If no sequence-name was found by the implementation,
+ an extent aware sequence name is build by it's own.
+<br/><br/>
+ 4. className=org.apache.ojb.broker.util.sequence.SequenceManagerSeqNextValImpl
+ A database sequence based High/Low implementation. See 3. for more informantion.
+ Limitations:<br/>
+ - do not use when other applications use the database sequence ditto
+</p>
+
+<source><![CDATA[
+<!ATTLIST sequence-manager
+ className CDATA #REQUIRED
+>
+]]></source>
+
+
+</subsection>
<subsection name="class-descriptor">
<p>
@@ -407,9 +467,14 @@
]]></source>
<p>
- The id attribute must contain a unique number identifying the decriptor.
- The numbers for the attributes of a class must correspond to the order
- of columns in the mapped table.
+ <b>The id attribute is optional.</b> If not specified, OJB internally
+ sorts field-descriptors according to their order of appearance in the
+ repository file.<br/>
+ If a different sort order is intended the id attribute may be used to
+ hold a unique number identifying the decriptors position in the sequence of
+ field-descriptors.<br/>
+ The order of the numbers for the field-descriptors must correspond to
+ the order of columns in the mapped table.
<br/><br/>
The name attribute holds the name of the persistent classes attribute.
If the PersistentFieldDefaultImpl is used there must be an attribute