没有IE的日子现在真是不方便,看看Mouse&Window给我们带来的便利。不扯蛋了,说正题。
WebLogic为我们提供了weblogic.Deployer这个Class来进行deploy的工作,即使在我们没有browser的情况下也可以发布程序,当然我上一篇BLOG中有讲text browser--Lynx,发现还真的不是很好用,有些功能还不知道怎么用,比如核对框就不知道怎么选中。
先来看个实例,我发布时用到的具体命令如下:
wlslib=/export/home/bea/weblogic/weblogic81/server/lib
export wlslib
java -cp $wlslib/weblogic.jar:$wlslib/wlepool.jar:$wlslib/wleorb.jar weblogic.Deployer -adminurl iiop://localhost:7001/ -username weblogic -password weblogic -targets CMSServer -deploy /export/home/bea/weblogic/user_projects/domains/mydomain/cms
当然你也可以不像我这样,只要确保weblogic.jar,wlepool.jar,wleorb.jar在classpath中即可。
看到了吧,其实很简单,下面来看看这个命令的参数:
Usage: java weblogic.Deployer [options] [actions] [File(s)]
where options include:
-adminurl <<protocol>://<server>:<port>> Administration server URL:
default iiop://localhost:7001
-username <username> user name
-password <password> password for the user
-examples Displays example usage of this tool.
-name <application name> Defaults to the basename of the deployment
file or directory.
-targets <<target(s)>> A comma separated list of targets for the
current operation. If not specified, all
configured targets are used. For a new
application, the default target is the
administration server.
-deploy Make an application available for service.
-redeploy Replace a running application partially or
entirely.
-undeploy Take an application out of service.
再来看看一些官方的examples吧:
(执行如下命令可得:java -cp $wlslib/weblogic.jar:$wlslib/wlepool.jar:$wlslib/wleorb.jar weblogic.Deployer -examples)
Deploy application on admin server:
java weblogic.Deployer -adminurl url -username username -password password
-name myapp -deploy c:/myapps/myapp.ear
Deploy individual modules in application to different targets:
java weblogic.Deployer -adminurl url -username username -password password
-name myapp -targets mywar@webserver,myjar@ejbserver -deploy
c:/myapps/myapp.ear
Undeploy application from specified targets:
java weblogic.Deployer -adminurl url -username username -password password
-name myapp -undeploy -targets server1,server2..
Redeploy application on current targets:
java weblogic.Deployer -adminurl url -username username -password password
-name myapp -redeploy
Redeploy individual module in an application:
java weblogic.Deployer -adminurl url -username username -password password
-name myapp -redeploy -targets moduleA@serverA,moduleA@serverB
Partially redeploy, for example, to update a JSP in a exploded webapp:
java weblogic.Deployer -adminurl url -username username -password password
-name myapp -redeploy mywar/index.jsp
The path of JSP to be updated is relative to the root of the
application. If a directory is specified the entire subtree is updated.
Multiple servers sharing the same physical deployment:
java weblogic.Deployer -adminurl url -username username -password password
-name myapp -targets server1,server2 -nostage -deploy c:/myapps/myapp.ear
The -nostage option indicates that the application is available
on all target servers at the same path and hence server should not copy
files to the managed servers.
这些英文都很简单,相信不用再多说了。
附:
1、你可能在发布时遇到这个问题:
<Error> <Management> <BEA-141150> <An error occurred while preparing application component of application Adquira:Location=ServerDC1,Name=adquira,Type=ApplicationConfig with HTTP response 500: Internal Server Error ).>
出现此问题的原因是因为发布的对象超过了200M.
2、这几天用Solaris的命令行用太多了,没办法,现在在Windows下BackSpace键都习惯性的去按Delete键了。嘻嘻 :)
以上所用版本为WLS8.1SP5。
posted on 2007-12-27 17:17
Robin's Programming World 阅读(8498)
评论(1) 编辑 收藏 所属分类:
Java 、
weblogic