|
First, the referenced tutorial is not written, maintained nor in any way associated with the Hibernate team. There is not much we can do with tutorials written by other people.
That being said... I have seen code hang against MySQL specifically in a few different situations using Hibernate. The reference of trouble dropping a foreign key is usually a problem with data remaining. I am not sure of the exact parameters, but generally cleaning up the data allows the FK to be dropped. I have also seen this in cases where transactions are left un-completed. The "stray" transaction still locks the data and attempts to drop the tables, fks, etc hang. A lot of times this second situation is caused by attempts to access the Session (or EntityManager) non-transactionally (auto-commit mode) without the connection pool and Hibernate being properly set up for auto-commit access.
Neither of these cases is a bug in Hibernate. I have yet to see a problem where accessing MySQL hangs being caused by anything other than an error in code using Hibernate.
|