Hi,
This problem might be encountered if you decide to use a 'Pessimistic
Locking' approach to prevent 2 processes from accessing the same set of
data. This problem is applicable for batch as well as online processing.
In case of an online processing you might want to lock a sensitive data
that is being updated so that it can not be updated by any other user
accessing the system but here too the problem is that the data remains
locked even if the user session is expired. Hence next time whenever any
user tries to update the data the 'Updation' fails because the data is
locked. Only way to avoid this problem is that you should have a built in
timer which would ensure that data set is not locked permanently ( if user
session expires). After a pre-deterimed time timer would be invoked so
that lock is released.
The same strategy can be thought for batch processing as well.
Regards,
Milind Kulkarni
Skandia - Apollo I
Tata Consultancy Services
SDF VII IT 11. SEEPZ. Andheri (East),
Mumbai 400 096. India.
Cherry
<[EMAIL PROTECTED] To: [EMAIL PROTECTED]
> cc:
Sent by: A Subject: Clustering and batch
processing
mailing list for
Enterprise
JavaBeans
development
<[EMAIL PROTECTED]
A.SUN.COM>
03/04/2003 07:28
PM
Please respond to
Cherry
Hi,
In my application I need to lock ( using a flag ) a
set of rows, so that another thread is not allowed to
access the same rows for processing.
I plan to use a flag for locking the rows, which my
thread is accessing for processing and releasing the
lock once the processing is done. I plan to put a
unique Id of the request( session bean ) which started
the processing as the lock flag.
My problem is about the releasing the lock flag. if
one of the servers which locked the rows goes down,
How will i release the lock. I cant put all the
processing ( around 1 million rows) in the same
transaction.
I need to know of a strategy which can be used in a
Clustered environment. I cant risk processing being
done on same row by two different threads at the same
time. Is there a way I will know when a server which
is part of the cluster goes down. I'am using Weblogic
6.1 , ejb2.0 and Oracle. I will prefer If i dont have
to use any feature which will tie down my application
to any of these.
Can I give an id to the servers which participates in
the cluster ?. If yes how will I get this Id in my
session beans. Can I access the properties which are
passed to the application server at startup?.
--
Cherry
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
===========================================================================
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".