tags:

views:

135

answers:

1

I have an EAR that I deploy as production, in context "/". I'd like to deploy a test version of the application on the server, the same Glassfish instance.

Is it possible to deploy the application under a different context and port in the same instance?

If so, beside changing the context in application.xml, do I need to change anything else?

+1  A: 

Usually you can deploy a test version of the application by altering the context root, and deploying it as a whole new application.

However, you must take the application's design into consideration. If the application utilizes a database, more often that not, you'll need a test database instance. All JNDI names (this includes datasources and EJBs, if any) that the test and production applications use, must not have any conflicts. It is an ill-advised move to run multiple instances of the same application, all of which reference the same JNDI names.

Finally, it is a standard accepted practice to separate your test and production environments, and even have separate machines for the same, in the case of mission critical apps and the like. This is done usually to prevent accidental overwriting of one environment (usually the production one) by another.

Vineet Reynolds

related questions