File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes Dynamic connection using Hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Dynamic connection using Hibernate" Watch "Dynamic connection using Hibernate" New topic
Author

Dynamic connection using Hibernate

Levi Mendes
Greenhorn

Joined: Oct 11, 2011
Posts: 4
Hello everybody,

Can anyone post some example showing dinamically how to connect the SQLServer with a java app using Hibernate?

Today, I'm using the simple hibernate.cfg.xml, in it I put the connection credentials hardcoded. Now the app need to connect the database according to the user credentials,
In other words I can't put the credentials fixed in this file.
How can I achieve it?


Thank so much.
 
 
subject: Dynamic connection using Hibernate
 
Similar Threads
How to change user credentials when accessing DB
How to secure the database credentials
How to connect to database without password using connection pooling
Hibernate and connection pooling
Tomcat Security