Thursday, June 7, 2012

Sequence number generation in Replication copies

Very very funny, familiared and important issue. Mostly everyone has faced this issue. The issue is that, I am having the employee database on main server. And I have a lot of replica copies in different location. I need a exact sequence unique long needed. If replication copy's same document is modified in more than one different location then replication conflict occurs. And also the sequence number will get spoiled.  And some people used to say that this is easy but now only I have familiared with this. Only the people who have already faced this issue, will tell that it can not be solved. We have to manually resolve this.

Yes exactly, Project should be done with the customer requirements. No customer does like the rework.

Okay I come to point...

Before heading this issue we need to know about the "Replication conflict", "Replication", "Document Locking", "Developer's Responsibility [kidding]" :)

We have a lot of tool for handling this. But we are  third party for customer. If we purchased tool from third party then we have a third party for our tool. so sixth party for customer :) . No customer needs that relationship. And also the license period and other things may conflict with our agreement.

Again we come with document locking. We need to enable the Allow document locking in database property. And we have to enable the master server in ACL of the database.These are features of document locking.,

if the document is not locked, the method places the lock and returns True
if the document is locked and the current user is one of the lock holders, the method returns True
if the document is locked and the current user is not one of the lock holders, the method returns False
if the document is modified by another user before the lock can be placed, the method raises an error

But the user does not want the hard reworking. So I analyze for the solution on this issue.

But still I have not clear idea about this. But complex way is there, That is, we have to check all the replication servers and while user tries to edit the document for new document or sequence number creation we do not do it in replication server. Try to write a schedule agent for this.That will be the great idea. or Try to make a common sequence number format, Like Date + Location + Number , etc.,

For creating sequence number, funny this is too easy. Once fresher or new notes person needed, then reply me back


  1. Hey Ramkumar! Great blog!!

    I'm new to Xpages, so I'm looking for code. This will be a great spot to start.

    I've written a simple helpdesk database. I need a "submit" button that sends me an email with the doucment link (like the @sendmail function). Do you know where I can get that code?



  2. Okay Thanks for giving the feedback... :)

    And also you can go through the help database that normally resides in your data folder. Otherwise, Go File menu -> Help -> Help Topics., There you will find the help database.

    Else Please visit this,

    Both are same database, also having examples and parameter descriptions.