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

          沒有IE的日子現(xiàn)在真是不方便,看看Mouse&Window給我們帶來的便利。不扯蛋了,說正題。

          WebLogic為我們提供了weblogic.Deployer這個Class來進(jìn)行deploy的工作,即使在我們沒有browser的情況下也可以發(fā)布程序,當(dāng)然我上一篇BLOG中有講text browser--Lynx,發(fā)現(xiàn)還真的不是很好用,有些功能還不知道怎么用,比如核對框就不知道怎么選中。

          先來看個實例,我發(fā)布時用到的具體命令如下:
          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

          當(dāng)然你也可以不像我這樣,只要確保weblogic.jar,wlepool.jar,wleorb.jar在classpath中即可。
          看到了吧,其實很簡單,下面來看看這個命令的參數(shù):
          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吧:
          (執(zhí)行如下命令可得: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、你可能在發(fā)布時遇到這個問題:
          ?<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 ).>
          出現(xiàn)此問題的原因是因為發(fā)布的對象超過了200M.
          2、這幾天用Solaris的命令行用太多了,沒辦法,現(xiàn)在在Windows下BackSpace鍵都習(xí)慣性的去按Delete鍵了。嘻嘻??:)
          以上所用版本為WLS8.1SP5。

          posted on 2007-12-27 17:17 Robin's Programming World 閱讀(8521) 評論(1)  編輯  收藏 所屬分類: Javaweblogic

          評論:
          # re: WebLogic通過命令部署應(yīng)用 2007-12-27 20:17 | 問道官網(wǎng)
          支持下你。如果可以做個鏈接。謝謝
          http://www.shaduruanjian8.cn
          問道官網(wǎng)  回復(fù)  更多評論
            
          主站蜘蛛池模板: 科技| 濮阳县| 攀枝花市| 盐池县| 丁青县| 潼南县| 合肥市| 应城市| 阿合奇县| 洞头县| 阳谷县| 云浮市| 蒙阴县| 黑龙江省| 康平县| 大城县| 比如县| 泽普县| 潜江市| 赤城县| 望谟县| 阜南县| 古浪县| 高唐县| 昆明市| 榆树市| 双桥区| 克什克腾旗| 宁夏| 拉萨市| 乌兰察布市| 肇庆市| 韩城市| 遵化市| 金坛市| 息烽县| 嘉禾县| 南召县| 临颍县| 蚌埠市| 徐水县|