javabuddy wrote:
I am a user of Hibernate for quite some time. Everything is goign smoothly untill our DBA came in rised the question of having password naked in hibernate.cfg.xml.
Couple of questions.
1. Is there a way to inject a JdbCConnection from an outside api into Hibernate runtime. (Say we need to have all the connection to be datasourced from a Apache dbcp). So I shouldnt have any of my connection parameters in my xml file.
2. If point 1 can't be done, how can I get a encrypted password in my hibernate.cfg.xml.
Thanks for your help in advance.
Thanks
- javabuddy
You can configure hibernate to use an external datasource by giving a datasource jndi name. Look at Table 3.2. Hibernate Datasource Properties in the documentation.
Farzad-