Multiple Projects on the Same Server

Parent Previous Next

If you are publishing multiple projects to a single server, you have two options for deployment:

    1. Run all projects under a single instance of the WAS, or
    2. Run each project under separate instances of the WAS


Each of these options are explained below:

Option 1: Run all projects under a single instance of the WAS


Running multiple applications under the same instance can result in problems because all applications will share session variables. For example, if you login to App1 and this sets some session variables, those same variables will automatically exist on App2, populated with values set in App1. This is even though the applications were published to separate folders.

For this reason, running multiple applications under one instance is best for demos, testing, product staging and such. Your commercial applications should each run under a different instance of the WAS.

If you run multiple applications under one WAS Instance, they will all be in the same "document root". If your document root is c:\a5webroot, and you have projects published to c:\a5webroot\project1 and c:\a5webroot\project2, then the URL to each application will be mydomain.com/project1 and mydomain.com/project2, respectively (or xxx.xxx.xxx.xxx/project1, etc.)


Project

Document Root

Publishing Folder

Application URL

Project 1

c:\a5webroot

c:\a5webroot\project1

www.mydomain.com/project1

Project 2

c:\a5webroot

c:\a5webroot\project2

www.mydomain.com/project2

Option 2: Run each project under a separate instances of the WAS


If you run multiple instances of the WAS, each will have a different document root, one instance pointing to each web application.

Each instance must have a unique configuration projectname.xml file, stored in c:\a5\configs.


Project

Document Root

Publishing Folder

Application URL

Project 3

c:\a5webroot\project3

c:\a5webroot\project3

www.mydomain3.com

Project 4

c:\a5webroot\project4

c:\a5webroot\project4

www.mydomain4.com