Dear All,
 
I am using ejb (statelss session bean), and using bean managed transaction processing.
I have one method which includes inserts in one table (min. 8 rows) and then select
statements and one select includes max() +1 value of one column from table, using that
value makes insert into one table say 'A'. finally at the end of method, commiting the transaction.
 
The database data for table 'A' is becoming inconsistent as many users are firing the same method
and 2 or 3 users get same max+1 value as insert is done for that value.
 
I can not create a sequence due to some business function limitation.
 
One solution that we are thinking of is :
On server, create one class, having sync. get and set methods using one flag  and in ejb
check that flag and then get max+1 value in order to control max+1 value conflict.
 
Is this solution right ?
 
Please mail me the solutions that u all can provide me as soon as possible on JDJ List.

Thanks & Regards,
Krunal Shimpi.
Passenger Solutions Group,
Airlines division,
Kale Consultants Ltd.

Tel : 8259580 - 89  Extn : 322

http://www.kaleconsultants.com

Work is worship.

To change your membership options, refer to:
http://www.sys-con.com/java/list.cfm

Reply via email to