cancel
Showing results for 
Search instead for 
Did you mean: 

DbIdGenerator vs. Clustering

theastax
Champ in-the-making
Champ in-the-making
Hi there,

my question is kinda follow-up to
http://forums.activiti.org/content/clustering

Digging through the Activiti sources i tried and failed to unterstand how cluster compatibility is achieved in regards of the default id generator. I need to ensure our setup will not lead to any duplicate primary keys being assigned (currently: 2 servers with 2 workers on each and a shared database (Mysql > 5.6)).

I would be happy if someone could give me a hint how uniqueness is ensured.

Many thanks in advance

Thomas
1 REPLY 1

jbarrez
Star Contributor
Star Contributor
The DbIdGenerator is implemented exactly for clustering: each nodes locks a block of ids in the database. If the block is used up, a new block is used.

Very much like the Table id generator from JPA