java - Generating Unique sequence number in mule -
i have requirement in project. want generate increasing unique sequence number mapped specific field(interchange id ) output xml file. customer wants generate alert around number. specific number should be
1. unique 2. increasing.
so have 2 approach case
- i generate sequence of oracle sequence. problem again not want unnecessarily hit database.
- will genearate in java of static variable. feel not full proof. think if application or server restarts static variable start form 0 again. in case number not unique.
so question is, if can in mulesoft or idea apreciated
tia.
use static field, grab value database. given there's no requirement numbers need consecutive, can increment database value f.e. 100 each time, need hit database every 100th number need produce.
Comments
Post a Comment