What is the best practices to store database connection related information?
I want to know wh开发者_运维问答at is the best practices to store database connection related information? What i know is ResourceBundle which uses a properties file is used for localization and is not suitable for storing database connection related information. What could be the other best way to store this information in java?
- Property Files.
- web.xml (Relevant read - Context XML File)
- System class's jdbc.drivers property
- Specify it on the server settings with JNDI (Application server/Web container, Tomcat Connection pooling relevant read - JNDI DBCP Connection Pool)
you can also get those info from xml
精彩评论