Session management using Hibernate in a Swing application

前端 未结 4 1833
天涯浪人
天涯浪人 2020-12-23 23:46

How do you do your Hibernate session management in a Java Desktop Swing application? Do you use a single session? Multiple sessions?

Here are a few references on the

4条回答
  •  别那么骄傲
    2020-12-24 00:22

    Problem with "''session per thread''" is good Swing applications do the database access outside the EDT, usually in newly created SwingWorker threads. This way, "''session per thread''" quickly becomes "''session per click''".

提交回复
热议问题