隨筆-193  評論-715  文章-1  trackbacks-0

          沒有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 閱讀(8521) 評論(1)  編輯  收藏 所屬分類: Javaweblogic

          評論:
          # re: WebLogic通過命令部署應用 2007-12-27 20:17 | 問道官網
          支持下你。如果可以做個鏈接。謝謝
          http://www.shaduruanjian8.cn
          問道官網  回復  更多評論
            
          主站蜘蛛池模板: 甘德县| 施甸县| 贡嘎县| 思茅市| 郸城县| 淮北市| 岳普湖县| 永德县| 台江县| 渭源县| 霍城县| 闻喜县| 兰西县| 涡阳县| 集贤县| 耒阳市| 彭泽县| 长沙市| 涪陵区| 黑水县| 西平县| 林西县| 唐山市| 沈丘县| 金平| 南召县| 西乌珠穆沁旗| 扎赉特旗| 永靖县| 北安市| 乐陵市| 淮安市| 容城县| 长汀县| 木兰县| 鹤壁市| 师宗县| 冕宁县| 盐源县| 鹤山市| 浦县|