Hibernate UnknownServiceException :Unknown service requested as transaction completed

后端 未结 4 1631
滥情空心
滥情空心 2021-02-13 12:40

I have a simple class which starts 3 threads and saves a new object in each thread. But I am getting exception which i cannot understand. Can anyone help me understand why the e

4条回答
  •  悲哀的现实
    2021-02-13 13:11

    Session object in Hibernate is not thread safe, you should not use the same session in different threads, unless you synchornize access to Session object.

提交回复
热议问题