openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MiƂosz Tylenda <>
Subject Re: How to set 'ordered' in SequenceGenerator
Date Sat, 06 Nov 2010 20:57:20 GMT
Hi Angelo,

I don't think you can specify "ordered" by using annotations. That can be done by extending
OracleDictionary, overriding the getCreateSequenceSQL method and telling OpenJPA to use your
dictionary [1].



> In our system, one field uses Oracle Sequence to generate sequence number as
> key. The DB we are using is Oracle in RAC environment. But there is one
> issue when using sequence in RAC. The sequence order is not guaranteed. From
> this article (,
> we can set 'ordered' to enforce global lock on the Oracle sequence among the
> RAC nodes. But I can't find any documents talking about the attribute
> 'ordered' for  SequenceGenerator. Here is how we define the sequence.
>     @GeneratedValue(strategy = GenerationType.SEQUENCE, generator =
>     @SequenceGenerator(name = "EVENT_SEQ", sequenceName = "EVENT_SEQ",
> allocationSize = 50)
> Does anyone have same issue?

View raw message