• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

database connect in hibernate config file

 
Raj Ohadi
Ranch Hand
Posts: 316
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I saw soem book specify

connection.driver_class, connection.url, connection.username, connection.password,

then why do we need

connection.datasource ??

1. Is it because the first set uses standard JDBC connection, and the "connection.datasource" uses the JNDI lookup for a container managed datasource ? i.e. we configure the datasource somewhere else and specifies in this config file ?

2. Can I say that if we use the second approach, then we do NOT have to include the "password" in our config file, but if we go with JDBC connection, we have to include that password in this hibernate config file ?

Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic