File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Dynamic connection using Hibernate

Levi Mendes

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 agree. Here's the link:
subject: Dynamic connection using Hibernate
jQuery in Action, 3rd edition