Work around Hibernate's errors in multithreaded applications
问题 Because of all the problems we can meet when trying to use Hibernate in a multithreaded application (1st clue, 2nd clue, 3rd clue, etc.), I was thinking of another solution: implementing the logical part within a classic Controller , and simply call it from my thread using URL.openConnection() . In other words, instead of doing something like this: MyThread.java public class MyThread implements Runnable { @Override public void run() { // do some great stuff with Hibernate } } Anywhere.java