johnstok
johnstok

Reputation: 98280

Advice on handling multiple ear deployments into jBoss

We have a typical J2EE application:

We use jBoss as our J2EE container. The same application must be deployed multiple times into the same container (in order to support different independent customers). This is proving to be a troublesome and error prone task since a variety of settings must be changed; in multiple xml files; spread throughout the structure above.

Does anyone have any advice on how these repeat deployments can be simplified?

Upvotes: 3

Views: 1646

Answers (1)

Michael Sharek
Michael Sharek

Reputation: 5069

For each of the EARs that you need to deploy separately, create a set of property/configuration files.

For example, if you have customer A and customer B, create (as examples):

  • customerADatabase.properties
  • customerBDatabase.properties
  • customerASomeOtherConfig.xml
  • customerBSomeOtherConfig.xml
  • etc.

Then use ant or maven to script the creation of separate ear files for customer A and B, using the different properties files. You should be able to script it so that at the end of your build process, you have

  • customerA.ear - with customerADatabase.properties and customerASomeOtherConfig.xml
  • customerB.ear - with customerBDatabase.properties and customerBSomeOtherConfig.xml

As @Yuval A points out, however, this may not be the best solution...now if you have some changes to make to properties/configuration, you have to change a lot of files...

Upvotes: 2

Related Questions