I'm using Hibernate for database access in my web app project. I'm trying to make a shared session because of i want to share only one connection for all user view my website.
MyClass{
static Session singleton;
synchronized static Session getSharedSession(){
return singleton; }
But.
some problem occur, the shared session seem not refresh object on it cache. When i delete a object, it ok, but when i update a object, object state not change.
Could you help me ? How to share connection ? how to use connection
efficiently .
Thank you very much.
|