部署到Weblogic托管服务器

5

简单来说,在开发环境中,将一个应用程序(EAR)部署到两个Weblogic 10管理服务器的集群中,最快的方法是什么?我尝试过使用自动部署目录,但据我所知,那只能部署到管理员服务器。

3个回答

2

我已经在使用ant来构建项目,所以最有效的方式似乎是使用ANT部署脚本来部署到weblogic。唯一的问题是如何定义WLDeploy任务。我最初包含了weblogic服务器库中的所有jar文件,但在一些搜索后缩小到了你看到的这两个文件。我没有检查这两个文件是否都是必需的,但是这种方式可以工作。稍后我会回去再次检查。

<target name="deploy">
    <path id="wl.deploy.path">
        <fileset file="${env.WL_HOME}\server\lib\weblogic.jar" />
        <fileset file="${env.WL_HOME}\server\lib\webservices.jar" />
    </path>
    <taskdef name="wldeploy" classname="weblogic.ant.taskdefs.management.WLDeploy">
        <classpath refid="wl.deploy.path" />
    </taskdef>
    <wldeploy
        action="deploy" verbose="false" debug="false"
        name="${ear.name}" source="${deploy.dir}/goip.ear"
        user="weblogic" password="weblogic"
        adminurl="t3://localhost:7001" targets="GO_Cluster1">
    </wldeploy>
</target>   

我还尝试使用热部署目录,但据我所知该目录仅部署到管理服务器而非集群,因此不符合我的需求。


1

有可用的ant任务可以部署到WebLogic。

这篇文章有点过时,但据我所知,这些工具仍然适用于更现代的版本。

你知道有一个“管理器”应用程序(也称为WebLogic控制台)吗?ant任务基本上像Web服务一样使用它来执行与手动在(Web)控制台中执行相同类型的操作。


是的,那就是基本思路,详见下方我的解决方案。 - Matt

0

部署过程可以通过以下三种方式完成...

1.阶段 2.非阶段 3.外部阶段

这是WebLogic中阶段模式的解释:

阶段模式 -

     The Administration Server copies the archive files from their source location to a location on each of the targeted Managed Servers that deploy the archive. For example, if you deploy a J2EE Application to three servers in a cluster, the Administration Server copies the application archive files to each of the three servers. Each server then deploys the J2EE Application using its local copy of the archive files. 

当部署到多个WebLogic Server实例时,阶段模式是默认模式。

没有阶段模式-

     The Administration Server does not copy the archive files from their source location. Instead, each targeted server must access the archive files from a single source directory for deployment. For example, if you deploy a J2EE Application to three servers in a cluster, each server must be able to access the same application archive files (from a shared or network-mounted directory) to deploy the application. 

无阶段模式是仅部署到管理服务器时的默认模式(例如,在单服务器域中)。如果在同一台机器上运行一组服务器实例,则也可以选择无阶段模式。

External_stage 模式-

  External_stage mode is similar to stage mode, in that the deployment files must reside locally to each targeted server. However, the Administration Server does not automatically copy the deployment files to targeted servers in external_stage mode; instead, you must manually copy the files, or use a third-party application to copy the files for you. 

希望它能对你有所帮助。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接