• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

session factory - singleton

 
Gireesh Mulage
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI All,
Depending on user inputs my application needs to connect to database.

How should i make sessionfactory creation a singleton ? (can't write static block )
how to bind / lookup sessionFactory to/from JNDI ?

Please help me on this

Thanks in advance ..
 
Anantha Sharma
Ranch Hand
Posts: 43
Android Hibernate jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this might help, if you are looking for a standalone implementation.

http://docs.jboss.org/hibernate/core/3.3/reference/en/html/tutorial.html#tutorial-firstapp-helpers

if you are looking to use spring then please refer to

http://static.springsource.org/spring/docs/2.5.x/reference/orm.html

Regards,
Anantha Sharma
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic