Content Services (ECM)
Process Services (BPM)
Application Development Framework
Digital Business Platform
Announcements & Opportunities
Alfresco Ambassador Program
Alfresco Content Services (ECM)
to create and rate content, and to follow, bookmark, and share content with other members. Not a member?
Thread safe unique sequence generation
Question asked by
on Jun 19, 2014
on Jun 20, 2014 by kaynezhang
Show 0 Likes
Please let me know what is the best and simple thread safe unique sequence generation approach.
Appreciate response with links/sample code.
No one else has this question
Mark as assumed answered
This content has been marked as final.
Show 1 comment
(Required, will not be published)
Jun 20, 2014 7:08 AM
If you want your sequence generation class to be survived between server restart ,you can consider to use db seqence(oracle sequence,mysql LAST_INSERT_ID() ..)
If not,You can use Atomic Integer ,it is thread safe.you can define a singleton class and use AtomicInteger 's getAndIncrement() method to generate sequence number.
Show 0 Likes
Retrieving data ...
mail task config(activiti rest)
Can't make Record Management work
archive element in content model
Restrict to upload in new version with different file name and extension.
Usuarios conectados en alfresco