• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Data access ny multiple dao

 
marlajee Borstone
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My application is using java and Hibernate technologies. I have a separate class to open the session factory to work with database.

All my DAO acesses databases using :



My question is, how this code will solve the problem when there are 5000 users accessging different part of my web
application to view different set of data. (though i have declared 30 connection poolsize in hibernate.cfg.xml file)


HOw does hiberntae handbles this call? Will there be a request in waiting mode
mean while the fist request finished its job at sessionfactory ? I doubt if my desing approach is correct .

Need some input to clear mydoubts please.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depending on how you have implemented this, your users will get their own Session to access data through. The Session will use the connection pool to talk to the DB. The connection pool will have people wait if there are no available connections. The SessionFactory doesn't handle jobs, it supplies Sessions which do the DB work.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic