This is not the right way to generate serial number. Please use database
SEQUENCE object to accomplish the same.
Thanks
Sami
"SUBSCRIBE
EJB-INTEREST
Mohan.Raj" To
<[EMAIL PROTECTED] [EMAIL PROTECTED]
COM> cc
Sent by: A
mailing list for Subject
Enterprise Mechod Synchronisation in EntiyBean
JavaBeans
development
<[EMAIL PROTECTED]
A.SUN.COM>
07/04/2003 10:20
AM
Please respond to
"SUBSCRIBE
EJB-INTEREST
Mohan.Raj"
<[EMAIL PROTECTED]
COM>
Hi
I have 50 EntityBeans instances.
I want to insert a record into the database..
Before inserting a record i have to get ther maximum serial no. from the
database and then increment it and insert the record into the database.
My question is what if the 50 clients try to access the bean instance and
same method in it and try to insert the record into the database.
How the sychronisation is taken care........?
there is a possibility that more that one client can get the same serial
no. before inserting into the database.
Is there any way...to synchronise the method in Entitybean ....?
If the client is accessing the entitybean instance Method..what if the
other clients try to access the same method but different instance...?
The other client will wait until the first client finishes accessing the
method in different instance.........?
Please let me know
Regards
Mohan
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".