• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

user id and password in hibernate config

 
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I am learning hibernate. I want to know how can we check user id and password at run time [upon user login credentials]

rather than hardcoding in hibernate.cfg.xml
<session-factory>
<property name="connection.username">test</property>
<property name="connection.password">password123</property>
 
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

sudarsan tettu wrote:Hi
I am learning hibernate. I want to know how can we check user id and password at run time [upon user login credentials]

rather than hardcoding in hibernate.cfg.xml
<session-factory>
<property name="connection.username">test</property>
<property name="connection.password">password123</property>


hardcoding?
IMO, hibernate.cfg.xml is a configuration file, providing credentials in a configuration file is not hard coding.
If you provide credentials in .Java file it is called hard coding.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic