Hrithik khurana wrote:I am working on a project using servlets and hibernate which will be deployed on jboss 6 server.
For a request to my application I want to connect to DB only one time and load couple of tables data into java Bean/Map. I do not want to connect to DB for every internal request of one request.
Hrithik khurana wrote:I have a couple of tables which are used in many methods like above, how do I load them into a Map/Bean at the very first time and use them for all the consecutive calls.
Hrithik khurana wrote:Also a period refresh of data should happen, I was planning to go with the 'Timer' .
Hrithik khurana wrote:I am planning to do like below...
Is this good approach?