Numerous GlassFish EARs

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

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

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

+2


source to share


1 answer


You can usually deploy a test version of your application by changing the context root and deploying it as a completely new application.

However, you must consider the design of the application. If your application uses a database, most often it is not, you will need a test database instance. All JNDI names (including data sources and EJBs, if any) that test and production applications use should not conflict. It is an ill-conceived step to run multiple instances of the same application, all of which refer to the same JNDI names.



Finally, the standard accepted practice is to separate test and production environments and even have separate machines for the same, in the case of mission-critical applications and the like. This is usually done to prevent accidentally overwriting one environment (usually production) with another.

+3


source







All Articles