• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate JDBC connections

 
p hasini
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am a little bit confused with the following.Please clarify.

1. Where do we specify the JDBC connection properties like JDBC driver class,url,username and password.Is it the hibernate.cfg.xml file or hibernate.properties file.

2. Is org.hibernate.SessionFactory used to obtain and pool connections
 
Girish Wakure
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Either in hibernate.cfg.xml or in your .properties file.
if you are using .properties file then hibernate.cfg.xml file will contain corresponding keys.


I didnt understand your second question.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Girish Wakure wrote:Either in hibernate.cfg.xml or in your .properties file.
if you are using .properties file then hibernate.cfg.xml file will contain corresponding keys.


... or in your DataSource, if you are using one.

The answer to question two is no.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic