Originally posted by vasu maj:
Matt,
This application runs in Spring framework with Hessian used for remote calls.
We are still following the database look up just the way I have posted above. Are you suggesting that I should replace it with a spring context file instead where I have better management of individual properties? IS there no way of doing it leaving it in the tomcat as it is?
Yes. If you want to put your settings in another file, then I'd suggest you move your database settings into a spring context file. You mentioned that you don't want to keep these settings in a Tomcat context file. Unless there's a way to do it in Tomcat - putting these settings in a Spring context file seems like a reasonable solution.
You could then use the
PropertyPlaceHolderConfigurer class to move database driver, url, username and password settings into a properties file.
Learn More...
Matt<br /> <br />Author: <a href="http://springlive.com" target="_blank" rel="nofollow">Spring Live</a> and <a href="http://www.apress.com/book/bookDisplay.html?bID=256" target="_blank" rel="nofollow">Pro JSP</a><br />Weblogs: <a href="http://raibledesigns.com" target="_blank" rel="nofollow">Raible Designs</a> <a href="http://jroller.com/page/raible" target="_blank" rel="nofollow">Spring Live Blog</a>