GlassFish多个EAR [英] GlassFish multiple EARs

查看:107
本文介绍了GlassFish多个EAR的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将EAR部署为生产环境/。
我想在服务器上部署应用程序的测试版本,即相同的Glassfish实例。



是否可以在不同的应用程序上下文和端口在同一个实例中?



如果是这样,除了更改application.xml中的上下文外,还需要更改其他任何东西吗?$ b $通常情况下,您可以通过更改上下文根来部署应用程序的测试版本,并将其作为整个新应用程序部署。



但是,您必须考虑应用程序的设计。如果应用程序使用数据库,更常见的是,您将需要一个测试数据库实例。测试和生产应用程序使用的所有JNDI名称(包括数据源和EJB,如果有的话)不得有任何冲突。运行同一个应用程序的多个实例是一个不明智的举动,所有这些实例都引用相同的JNDI名称。



最后,这是一种标准的接受实践你的测试和生产环境,甚至在任务关键型应用等情况下也有相同的独立机器。这通常是为了防止一个环境(通常是生产环境)被另一个环境意外覆盖。


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?

解决方案

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.

这篇关于GlassFish多个EAR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆