Skip to main content

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

In table sequence case, update precedes select and both are executed in the same transaction - so no dirty reads can happen.

On 20/07/2010 12:49 PM, Shashikant Kale wrote:

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


_______________________________________________ eclipselink-users mailing list eclipselink-users@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Back to the top