Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Question on sequencing using TableGenerator

Hi,

 

We have been using eclipselink and I have a question wrt eclipselink in clustered environment. We are using TableGenerator for generating primary keys and we use the same sequence for all the entities.

 

e.g.

 

      @GeneratedValue(strategy = GenerationType.TABLE, generator = "default")

      @TableGenerator(

            name = "default",

            table = "ID_GENERATOR",

            pkColumnName = "ID_NAME",

            valueColumnName = "ID_VALUE",

            pkColumnValue = "default",

            initialValue = 1,

            allocationSize = 50

      )

 

However I have found that the Select query is fired without “For Update” clause. Wouldn’t this cause issues due to dirty reads across multiple JVMs?

 

Kindly let me know how this is taken care.

 

Thanks,

Shashi


Back to the top