Tutorial :Deploying to Weblogic Managed Servers


Simply, what's the best (quickest) way to deploy an application (EAR), in a development environment, to two Weblogic 10 managed servers that are part of a cluster? I've tried the autodeploy directory, but as I understand it that only deploys to the admin server.


I was already using ant for building the project so the most efficient thing seemed to be using the ANT deployment scripts for weblogic. The only issue I had was getting the WLDeploy task to be defined. I originally include all the jars in the weblogic server library, but then after some googling narrowed it down to the two you see. I'm didn't check to see if both are actually necessary, but it's working this way. I'll go back and double check later.

<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>     

I also tried using the hotdeploy directory, but as I understand it that directory only deploys to the admin server, not to a cluster, so it didn't fit my needs.


There are ant tasks available to deploy to WebLogic.

This article is a bit dated but the tools still exist for more modern versions as far as I know.

You know there's a "manager" application (aka the WebLogic Console)? The ant task basically uses that like a Web Service to do the same kind of operations you'd do by hand in the (Web) Console.


Deployments process can be done in three ways...

1.Stage 2.Nostage 3.ExtenalStage

This is an explanation of the staging modes in WebLogic:

Stage modeâ€"

     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.   

Stage mode is the default mode when deploying to more than one WebLogic Server instance.

Nostage modeâ€"

     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.   

Nostage mode is the default mode when deploying only to the Administration Server (for example, in a single-server domain). You can also select nostage mode if you run a cluster of server instances on the same machine.

External_stage modeâ€"

  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.   

Hope it helps you.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »