May be a simple question... but i am struggling for the answer.!!
I have a stateless session bean that has a method that simply inserts a record using a DAO class into the oracle database. This method should return the last inserted record's sequence number(autogenerated by oracle).In a multi-user real time environment, if i dont synchronize the access to "insert and fetch" block of code, there is a possibility of my code retrieving the sequence number of some one else' record.
I need to avoid such a situation. Is there any other way achieving this functionality?
Need help urgently.. got stuck badly at this moment!!