api improvement with explict locking on hibernate layer