Bo's blog

Saturday, November 14, 2009

Weblogic Deployer tool

 

1. Maven weblogic plugin 

2. Use the weblogic’s deployer

[root@ve1sapi1 domain]# java -classpath /home/bea/wlserver_10.3/server/lib/weblogic.jar weblogic.Deployer
weblogic.Deployer invoked with options:  -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.

Deploy the first application version on admin server:
java weblogic.Deployer -adminurl url -username username -password password
-name myapp -deploy c:/myapps/myapp_v1.ear

Perform Production Redeployment of a new application version on admin server:
java weblogic.Deployer -adminurl url -username username -password password
-name myapp -redeploy -source c:/myapps/myapp_v2.ear

Deploy application to administration mode on admin server:
java weblogic.Deployer -adminurl url -username username -password password
-name myapp -deploy c:/myapps/myapp.ear -adminmode

Transition application from administration mode to running on admin server:
java weblogic.Deployer -adminurl url -username username -password password
-name myapp -start

Transition application from running to administration mode on admin server:
java weblogic.Deployer -adminurl url -username username -password password
-name myapp -stop -adminmode

Deploy a library on admin server:
java weblogic.Deployer -adminurl url -username username -password password
-name mylib -library -libspecver 1.0 -libimplver 2.0 -deploy c:/myapps/mylib.jar

Deploy an application on admin server with a deployment plan:
java weblogic.Deployer -adminurl url -username username -password password
-plan c:/myapps/myapp/plan/plan.xml -deploy c:/myapps/myapp/app/myapp.jar

Update an application configuration:
java weblogic.Deployer -adminurl url -username username -password password
-plan c:/myapps/myapp/plan/newplan.xml -name myapp -update

Deploy a queue to a specific JMS server
java weblogic.Deployer -adminurl url -username username -password password
-submoduletargets myqueue@myjmsmodule@JMSServer
-deploy c:/myapps/myapp/app/myapp.ear

0 Comments:

Post a Comment

<< Home