Hi, Krunal. I think that synchronization is the easiest way with sequence unavailability.
You wrote Thursday, May 30, 2002, 11:07:44: KS> Dear All, KS> I am using ejb (statelss session bean), and using bean managed transaction KS> processing. KS> I have one method which includes inserts in one table (min. 8 rows) and then KS> select KS> statements and one select includes max() +1 value of one column from table, KS> using that KS> value makes insert into one table say 'A'. finally at the end of method, KS> commiting the transaction. KS> The database data for table 'A' is becoming inconsistent as many users are KS> firing the same method KS> and 2 or 3 users get same max+1 value as insert is done for that value. KS> I can not create a sequence due to some business function limitation. KS> One solution that we are thinking of is : KS> On server, create one class, having sync. get and set methods using one flag KS> and in ejb KS> check that flag and then get max+1 value in order to control max+1 value KS> conflict. KS> Is this solution right ? -- Regards, Mike mailto:[EMAIL PROTECTED] To change your membership options, refer to: http://www.sys-con.com/java/list.cfm