• Post Reply Bookmark Topic Watch Topic
  • New Topic

Create hibernate session dynamically  RSS feed

Anusha Gurumurthy
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have a spring-hibernate GUI application where I show a login screen for user to enter his user-name & password. I have to use this credentials to connect to my database.

My database related details are present in hibernate.cfg.xml. My applicationContext.xml has the following entry

<bean id="sessionFactory" lazy-init = "true"
<property name="configLocation"

The sessionFactory is autowired to all my DAOs. How can I pass my username & password dynamically to my session factory from my code?

Anusha Gurumurthy
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!