Hi guys,

     I got some doubts in allocationSize. My project is a multi-application
environment. I'm giving SequenceGenerator with allocationSize=10. 

@Id
@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="myseq")
@SequenceGenerator(name="myseq",sequenceName="MY_SEQ",allocationSize=10)
private long id;

Suppose my first application say app1 will access the DB and got 10
available id's. My second application say aap2 will also get same id. when
app1 will insert it insert id 100 by the time app2 will insert it also tries
to insert 100. it will cause problem. 

What is the use of allocationSize then.


-- 
View this message in context: 
http://n2.nabble.com/%40SequenceGenerator-allocationSize-tp3212122p3212122.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to