我正在寻找一个 Java Web 容器(如 jetty 和 tomcat)或一个可以通过管理控制台创建/删除服务器实例的工具。
问题是我的组织需要创建测试服务器的不同实例以进行质量控制测试(针对不同的数据库配置)。目前,我必须手动复制 Tomcat“catalina_base”模板目录并进行运行测试所需的任何更改。如果有一个统一的界面,我可以单击一个按钮来创建一个新实例(然后单击另一个按钮来删除它),那就太好了。
编辑 1
必须能够在 Windows Server 2003 上运行。
编辑 2
我得到了很多与构建有关的答案,因此我将添加一些有关该应用程序的额外信息。该应用程序是使用 ANT 脚本构建的标准 Java EE Web 应用程序。我们使用容器管理的 JNDI 数据源来连接到数据库。我们的程序是 20 多年前遗留下来的,它规定每个新的数据库更改都需要采用新的模式。
假设客户报告我们的应用程序显示计算错误 - 我们要做的第一件事是创建一个新的数据库模式,然后为所有数据库对象运行创建脚本,最后将数据从生产环境复制到测试环境新架构。当我们修复了错误(应用程序端或数据库端)后,我们的质量控制人员需要修复应用程序并将数据源中的模式更改为新的“测试环境”的模式。当他们完成测试后,我们将代码暂存到下一个计划版本中。
问题是,这个过程需要大量的开发人员、修复的并发错误和添加的功能。目前,有超过 20 个 Tomcat 实例管理着不同版本的应用程序和数据库对象。随着功能的添加和质量控制的完成,我经常需要创建新的 Tomcat 实例并删除旧的实例。
I'm looking for a Java Web Container (like jetty and tomcat) or a tool in which I can create/remove server instances through a management console.
The problem is that my organization needs to create different instances of a test server for quality control testing (against different database configurations). Currently, I'm having to manually copy a Tomcat "catalina_base" template directory and make any changes needed for the test being run. It would be nice to have a unified interface where I could click a button to create a new instance (and click another to remove it).
Edit 1
Must be able to run on Windows Server 2003.
Edit 2
I'm getting a lot of answers that have to do with build, so I'm going to add some extra information about the application. The application is a standard Java EE web application that is built using an ANT script. We use a container managed JNDI DataSource for connecting to the database. Our procedures, which are hold overs from 20+ years ago, have dictated that every new database change needs to be in a new schema.
So say a customer reports that our application is displaying a calculation wrong - the first thing we do is create a new database schema, then we run the create script for all of the database objects, and lastly copy the data from production for testing to that new schema. When we've fixed the bug (either application side or database side), our quality control person, needs the fixed application and the schema within the DataSource changed to that of the new "test environment". When they've completed their testing, we stage the code to be included in the next scheduled release.
The catch is, this process is multiplied by a number of developers and a number of concurrent bugs fixed and features added. Currently, there are over 20+ Tomcat instances managing different versions of the application and database objects. I'm constantly having to create new Tomcat instances and remove old ones, as features are added and quality control has completed.
发布评论
评论(4)
听起来您真正需要的是构建一个部署工具,例如 Continuum
it sounds like what you really need is a build a deployment tool like Continuum
您可以使用 jetty 来完成此操作。您可以使用指定的配置创建自己的 Java 类作为嵌入式服务器,并从提示符或通过某些 Web 界面运行它。
你可以看看这个
http://docs.codehaus.org/display/JETTY/Embedding+Jetty
You can do so with jetty.You can create your own Java Class with the specified configuration as an embedded server and run it from the prompt or through some web interface.
you can check this out
http://docs.codehaus.org/display/JETTY/Embedding+Jetty
您是否考虑过像 Chef 这样的配置管理工具?
Have you thought about a configuration management tool like Chef?
听起来您应该只更新应用程序的构建脚本,以便能够接受“使用 test1.properties 进行数据库设置”或“使用 prod2.properties”等不同参数,然后部署重建的应用程序。
It sounds like you should just update your application's build script to be able to accept different parameters for things like "use test1.properties for database settings" or "use prod2.properties", and then deploy that rebuilt application.