Author: arminw
Date: Wed May 24 03:33:00 2006
New Revision: 409120

URL: http://svn.apache.org/viewvc?rev=409120&view=rev
Log:
update stored procedures based key generation

Modified:
    
db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/sequencemanager.xml

Modified: 
db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/sequencemanager.xml
URL: 
http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/sequencemanager.xml?rev=409120&r1=409119&r2=409120&view=diff
==============================================================================
--- 
db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/sequencemanager.xml
 (original)
+++ 
db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/sequencemanager.xml
 Wed May 24 03:33:00 2006
@@ -697,8 +697,7 @@
                         sequence generator a final answer (Identity columns 
really suck). If you are using
                         multiple application servers in your environment, and 
your database does not
                         support read locking like Microsoft SQL Server, this 
is the only
-                        safe way to guarantee unique keys 
(HighLowSequenceManager WILL
-                        give out duplicate keys, and corrupt your data)".
+                        safe way to guarantee unique keys".
                         <br/>
                         The
                         <code>SequenceManagerStoredProcedureImpl</code> 
implementation enabled database
@@ -736,14 +735,10 @@
                     </ul>
                     <p>
                         Below you can find the stored procedures you need to
-                        use sequencing for MSSQL server and Informix.
+                        use sequencing for <em>MSSQL</em> server and 
<em>Informix</em>.
                         <br/>
-                        You have to adapt the scripts for other databases (We 
are interested
-                        in scripts for other databases).
-                    </p>
-                    <p>
-                        Here you can find the currently supported databases 
and the statements to
-                        create the sql functions:
+                        You have to adapt the scripts for other databases 
(<em>We are interested
+                        in scripts for other databases!</em>).
                     </p>
                     <table>
                         <tr>
@@ -770,20 +765,25 @@
 @SEQ_NAME varchar(150)
 AS
 declare @MAX_KEY BIGINT
--- return an error if
--- sequence does not exist
--- so we will know if someone
--- truncates the table
+
+set nocount off
+
 set @MAX_KEY = 0
 
 UPDATE OJB_NEXTVAL_SEQ
-SET    @MAX_KEY = MAX_KEY = MAX_KEY + 1
-WHERE  SEQ_NAME = @SEQ_NAME
+SET @MAX_KEY = MAX_KEY = MAX_KEY + 1
+WHERE SEQ_NAME = @SEQ_NAME
 
+-- return an error if
+-- sequence does not exist
+-- so we will know if someone
+-- truncates the table
 if @MAX_KEY = 0
-select 1/0
+   RAISERROR ('Sequence %s does not
+        exists!', 16, 1, @SEQ_NAME)
 else
-select @MAX_KEY
+   select @MAX_KEY
+
 RETURN @MAX_KEY
                                 ]]></source>
                             </td>
@@ -816,18 +816,11 @@
 end function;]]></source>
                             </td>
                         </tr>
-                        <tr>
-                            <td>Oracle</td>
-                            <td>
-                                <source><![CDATA[
-TODO]]></source>
-                            </td>
-                            <td>
-                                <source><![CDATA[
-TODO]]></source>
-                            </td>
-                        </tr>
                     </table>
+                    <p>
+                        Some specific notes about using this sequence manager 
implementation with <em>MSSQL</em>
+                        can be found in a post on the <a 
href="ext:sequencing-mail">user-list</a>.
+                    </p>
                     <p>
                         Limitations:
                         <br/>- currently none known



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to