Skip to content

Tag: hibernate

program using hibernate does not terminate

I created a program using Hibernate. The program reaches the main function end, nevertheless the program is running. I wonder if it happens when SessionFactory is configured using Hibernate Version 4.x. Is the way to configure wrong? manual1_1_first_hibernate_apps.java Util.java The following console log snip…

Override transactional method

I have method M with @Transactional in service A. I have service B extends A with overrided method M. Will be overrided method M still transactional? Or I should add there @Transactional? Answer What you are actually asking : is the @Transactional annotation on the method inherited. Short answer : no. Annotat…

Hibernate SaveOrUpdate – multiple workthreads

While I have been able to find information on how Hibernate’s transaction work, so the database doesn’t corrupted, it has been harder to understand how Hibernate treats an object which is shared between threads, and each thread tries to save it to the database. This is my theoretical question: 1) …