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.