I think you don't need all this! Just ask your ISP the hostname and build your war:
ant war -Ddatabase.host=localhost:5433 -Dhttp.port=80 -Ddatabase.name=bcoproducao Gilberto > Thanks again. I feel kind of stupid. I do use Tomcat and am familiar with > the doc link you sent. I think I should be more specific. I will be > developing on my work PC using Tomcat 5.x. I will be deploying to a GoDaddy > hosted account, and am not sure what j2ee container they use. So, I am > thinking I will have to set a couple of db data sources in web.xml and the > have my code select the appropriate db source based on the server the app is > on. Does this make sense? Again, thank you!! > > > > Michael Horwitz wrote: > >> Not sure which servlet container you use, but as an example take a look at >> this howto for Tomcat: >> >> http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html >> >> >> On 12/8/06, acate <[EMAIL PROTECTED]> wrote: >> >>> Thank you very much for this information!!! Could you recommend some >>> online >>> documentation might show me an example of how to do this? >>> >>> >>> Michael Horwitz 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] >>>>> >>>>> >>>>> >>>> >>> -- >>> View this message in context: >>> http://www.nabble.com/AppFuse---Spring-Question-tf2781685s2369.html#a7761213 >>> Sent from the AppFuse - User mailing list archive at Nabble.com. >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >>> >> > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
