<aside> 💡 세션 객체는 동시에 하나의 스레드의 한 트랜잭션 안에서만 공유되고 닫히는 방식으로 사용되어야 한다.

</aside>

Is the session thread-safe?

'The Session is very much intended to be used in a non-concurrent fashion, which usually means in only one thread at a time.

The Session should be used in such a way that one instance exists for a single series of operations within a single transaction. One expedient way to get this effect is by associating a Session with the current thread (see Contextual/Thread-local Sessions for background). Another is to use a pattern where the Session is passed between functions and is otherwise not shared with other threads.