That's an interesting constraint I hadn't thought about. One could follow the same approach as I describe but instead of rebundling the generated config settings into the war, they can be generated into a "config" directory and the startup script can add the config directory to the web containers classpath at startup. Would this meet the requirements of your environment?
Sanjiv On 12/9/06, Michael Horwitz <[EMAIL PROTECTED]> wrote:
100% agreed! Unfortunately I, like many other I know, work in an environment where we are strictly forbidden from making any modifications to the binary after we release to test. The application still has to go to QA, staging and production environments post test, and a war file is seen by the deployment team as a binary artifact. JNDI is the path of least resistance for us. The other approach we are toying with is bundling all the configuration into the war upfront, and getting the application to intelligently detect its environment and configure itself accordingly. Very much a proprietary solution at this stage, but it works rather well. Mike On 12/9/06, Sanjiv Jivan <[EMAIL PROTECTED]> wrote: > > I know that this is approach suggested by some but I really don't like > the JNDI configuration piece. I prefer having and maintaining all the > settings of my app in just one place. > > Here's the approach I use : > http://jroller.com/page/sjivan?entry=spring_updating_settings_of_a > > Sanjiv > > On 12/8/06, Michael Horwitz < [EMAIL PROTECTED]> wrote: > > > > The usual approach is to configure resources such as databases as part > > of the servlet container, and then reference these via JNDI. It requires a > > small change to the applicationContext-resources.xml file to point to > > the correct JNDI name, and then some servlet container specific > > configuration to set up the database connection. This allows you to create a > > single binary package and deploy it to several different environments ( > > e.g. dev, test, qa, etc). > > > > Mike > > > > On 12/8/06, acate <[EMAIL PROTECTED]> wrote: > > > > > > > > > Please re-read my question. The server names will not be the same. > > > > > > > > > Fadi Samara wrote: > > > > > > > > well it depends where your database is located. It is on the same > > > machine > > > > you are deploying to, you should be fine with *localost* > > > > > > > > On 12/8/06, acate < [EMAIL PROTECTED]> wrote: > > > >> > > > >> > > > >> I am new to AppFuse and Spring, but need to build an app that has > > > a mysql > > > >> connection. I can build the app locally and use "localhost" as > > > part of > > > >> the > > > >> mysql connection parameters. However, when I deliver the app to > > > the > > > >> designated server the host name "localhost" will be > > > different. What is > > > >> the > > > >> appropriate strategy to take so that I can build and deploy and > > > >> automatically account for the mysql host name? Thanks for any > > > help. > > > >> -- > > > >> View this message in context: > > > >> > > > http://www.nabble.com/AppFuse---Spring-Question-tf2781685s2369.html#a7760891 > > > >> Sent from the AppFuse - User mailing list archive at Nabble.com. > > > >> > > > >> > > > --------------------------------------------------------------------- > > > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > > > >> For additional commands, e-mail: [EMAIL PROTECTED] > > > >> > > > >> > > > > > > > > > > > > > > -- > > > View this message in context: http://www.nabble.com/AppFuse---Spring-Question-tf2781685s2369.html#a7761021 > > > > > > Sent from the AppFuse - User mailing list archive at Nabble.com. > > > > > > --------------------------------------------------------------------- > > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > >
