开发者

Deploy web app on a server but pointing to many database schemas

I have a web service app that has an xml file with Oracle connection properties i.e. DEVFOOBAR schema. I will create a war file of this and deploy to Tomcat on our test server - however we only have this one server but we want the ability to test the webservice against a few different schemas e.g.

  • DEVFOOBAR
  • TESTFOOBAR
  • UATFOOBAR
  • LIVETESTFOOBAR

Initial thoughts...

Ideally we don't want to be digging about and changing the XML files in the depoloyed app on the server. I think we want 4 webservices all pointing to their own db schemas, so I was wondering what I have to do in order to achieve this.

Is it something to do with web.xml file, but then again I'm confused because if you have 4 webservices all doing the exact same thing, (except pointing to different databases), surely things would get confusing if a request comes in to the server for a partic开发者_Go百科ular url (e.g http:\testserver:8080\myresource) - how will Tomcat decide which web service should respond, and if they all respond that's just crazy! It's safe to say I'm a little confused here!


You could, as part of your build process, create 4 differently named WAR files, each with the relevant DB configuration for a particular schema.

Once deployed to Tomcat, each WAR will be accessed by http://testserver:8080/WAR_name, so you will not have the conflict you describe.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜