在 WebSphere Application Server V6.0 上自动安装应
用程序
自动安装
配置创建单个“已监视”目录,它侦听完整组合的 EAR 文件或应用程序模块,例如,
WAR 文件、EJB JAR 文件或独立资源适配器归档(RAR)文件。
如果将 EAR 文件放到“已监视”目录中,则自动将此 EAR 文件部署至该服务器。 如果从“已监
视”目录中删除 EAR 文件,则会从服务器卸载此应用程序。如果将 WAR 文件或 EJB JAR 文
件放到“已监视”目录中,则快速部署工具生成需要的 EAR 包装器,然后在服务器上发布此
EAR 文件。对于 RAR 文件,不会创建包装器,而是将独立的 RAR 文件发布至服务器。
限制
快速部署工具不会自动为应用程序配置特定于服务器的功能。您需要通过
WebSphere
®
管理控制台创建和管理特定于服务器的配置。特定于服务器配置的示例
包括设置端口、安全角色或数据源。
如果没有生成企业 bean 的部署代码或包含企业 bean 的企业应用程序的部署代码,
则快速部署工具会使用缺省 EJBDeploy 设置(例如,设置为 DB2UDB_V72 的后端
选项)来生成部署代码。如果要设置另外一个后端选项,则在将 EAR 文件放到自动安
装项目之前对此 EAR 文件运行 EJB 部署工具(ejbdeploy.bat)。
要在 WebSphere Application Server V6.0 上自动安装应用程序:
1. 设置 WebSphere 快速部署环境
您可从命令行运行快速部署批处理工具以使用 IBM
®
WebSphere V6.0 运行时环境
来创建、配置和启动快速部署项目。从命令行运行的非图形用户界面方式支持快速部
署工具。
2. 在工作空间中创建自动安装项目
自动安装
项目在服务器上自动安装、修改和卸载 J2EE 兼容应用程序(EAR 文件)或
模块(WAR 文件、JAR 文件或 RAR 文件)。自动应用程序安装使您避免了在服务器
上管理应用程序的复杂性。
3. 启动 WebSphere 快速部署会话
您可启动快速部署会话来启动对应用程序构件的侦听,这些构件放到配置为自由格式
方法或自动安装方法的文件夹中。 使用 wrd命令来启动快速部署会话。如果要监视快
速部署活动,您可指定控制台输出。
4. 管理自动安装项目中的 EAR 或模块文件
您可将 J2EE 兼容应用程序(EAR 文件)或应用程序模块(例如,WAR 文件、EJB
JAR 文件或独立的 RAR 文件)放到自动应用程序安装项目中,并使用快速部署工具
将此应用程序部署至目标服务器。