0

My goal is to install only one WAR file but to use test or production settings (for example to point to different databases) depending on the context root.

  • mydomain.com/MyWebApp will use production settings
  • mydomain.com/MyWebAppTEST will use test settings

Internally the application then should check if the context name ends with TEST to control the configuration.

Is this possible with JBoss 4?

Edit: after rethinking the problem it looks like using a dedicated test / staging server installation of JBoss is much safer. Installing two copies of the same web application on one server would require a lot of additional logic. For example, if the web application needs to use a different database, it has to pass a test/production mode flag to the server at the start of a session. The server must not load the database data in advance but has to wait until the client tells him which database to use.

mjn
  • 36,362
  • 28
  • 176
  • 378

2 Answers2

1

Deploy two identical copies of the same WAR file, one called MyWebApp.war, the other called MyWebAppTEST.war?

skaffman
  • 398,947
  • 96
  • 818
  • 769
0

Why would you do that instead of building and deploying two WARs from the same code base but with different settings?

Pascal Thivent
  • 562,542
  • 136
  • 1,062
  • 1,124