java - Is there any way to rebuild a sessionFactory? -
we building application connect multiple database schemas. first schema contains schema name , other details of second schema. application runs fine first time. pops error when login again. error :
org.hibernate.service.unknownserviceexception: unknown service requested [org.hibernate.engine.jdbc.connections.spi.connectionprovider]
i have 2 sessionfactories,one each database. properties change according logs in.
i understand it's because sessionfactory not getting built again.is there way rebuild sessionfactory? here.. in advance..
edit
so figured need use multi tenancy in hibernate. on how that? kind of examples links.. etc appreciated.. thanks.
you should use two session factories. once created session factories immutable.
Comments
Post a Comment