I
Ian Semmel
I don't know if this is the correct ng for this but ..
How do you programatically set the password for a hibernate connection ?
I have tried something like
configuration = new Configuration ();
configuration.configure ( configFile );
Properties p = configuration.getProperties ();
p.setProperty ( "connection.username", "user" );
p.setProperty ( "connection.password", "password" );
configuration.setProperties ( p );
sessionFactory = configuration.buildSessionFactory ();
This seems to have no effect and it uses the password in the config file.
If I delete the user and password fields from the config file the connection cannot be made.
How do you programatically set the password for a hibernate connection ?
I have tried something like
configuration = new Configuration ();
configuration.configure ( configFile );
Properties p = configuration.getProperties ();
p.setProperty ( "connection.username", "user" );
p.setProperty ( "connection.password", "password" );
configuration.setProperties ( p );
sessionFactory = configuration.buildSessionFactory ();
This seems to have no effect and it uses the password in the config file.
If I delete the user and password fields from the config file the connection cannot be made.