This quistion has been raised several times. Every such issue is answered in relation
with database . How do i implement this simple locking in EJB 2.x
Stateless Session bean
My EJB is not intended to run in Cluster. Can i voilate the EJB spec by defining static
field and synchronized block in EJB.
My Hypothetical stateless session bean.
Bean {
private static Object LOCK = new Object();
public void abcDef(){
synchronized(LOCK) {
... // Nothing to do with database
}
}
}
Thanks for your pointer or suggestion.
Regards,
Anil Pathak