Merge of all UI clustering changes originally applied to 2.2

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8292 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2008-02-15 14:59:11 +00:00
parent 2bde146829
commit 0eaa1f5ba9
11 changed files with 628 additions and 569 deletions

View File

@@ -72,6 +72,21 @@ public class Issuer
* After the database is up, get our value.
*/
public void initialize()
{
getNextId();
}
/**
* Issue the next number.
* @return A serial number.
*/
public synchronized long issue()
{
return getNextId();
}
private long getNextId()
{
class TxnWork implements RetryingTransactionCallback<Long>
{
@@ -89,14 +104,6 @@ public class Issuer
{
fNext = result + 1L;
}
}
/**
* Issue the next number.
* @return A serial number.
*/
public synchronized long issue()
{
return fNext++;
return fNext;
}
}