This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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


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.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Dynamic connection using Hibernate
 
jQuery in Action, 3rd edition