There are several side effects that you should beware of.
First of all, the extended persistence context that you use to store this user-defined object should not be used for others, since it automatically caches everything as it relates (L1 cache).
If you need to use this permanently connected user object in some other operation related to some other persistence context, you need to get a new instance instead of using the instance in the session area.
. , . , , - , "". , JPA. , , .
, . , , . , , , , .
, stateful beans CDI (, , , , , HTTP- ) . CDI , , .