Does jpa manages lock at db level?

Does jpa manages transaction locks at db level? If so, what happen if my app lock some rows and before commiting suddenly goes down. Will these locks remain till db's lock timeout expire?