Hi,
Here is a Simple JMX code to deploy our applications on WebLogic Server. This JMX Code uses some very important WLS Deployment API like:
WebLogicDeploymentManager, SesionHelper, DeploymentOptions, TargetModuleID, ProgressObject etc…
When u will try the following program to deploy your applications then please replace “ModuleType.WAR” to ModuleType.EAR -> If u want to deploy EAR Application And Similarly replace “ModuleType.WAR” to ModuleType.JAR -> If u want to deploy JAR (EJB)Application
import java.io.*; import weblogic.deploy.api.tools.*; //SesionHelper import weblogic.deploy.api.spi .*; //WebLogicDeploymentManager import weblogic.deploy.api.spi.DeploymentOptions; import javax.enterprise.deploy.spi.TargetModuleID; import javax.enterprise.deploy.spi.status.ProgressObject; import javax.enterprise.deploy.spi.status.DeploymentStatus; import javax.enterprise.deploy.shared.ModuleType; import javax.enterprise.deploy.spi.Target; import javax.enterprise.deploy.shared.*; public class ApplicationDeployment { public static void main(String ar[]) throws Exception { ApplicationDeployment appDeploy=new ApplicationDeployment(); String protocol="t3"; String hostName="localhost"; String portString="7001"; String adminUser="weblogic"; String adminPassword="weblogic"; WebLogicDeploymentManager deployManager=SessionHelper.getRemoteDeploymentManager( protocol,hostName,portString,adminUser,adminPassword); System.out.println("nt WebLogicDeploymentManager: "+deployManager); DeploymentOptions options = new DeploymentOptions(); System.out.println("nt DeploymentOptions: "+options); Target targets[]=deployManager.getTargets(); System.out.println("------------------------------------------------------------"); System.out.println("t Application Can be Deployed in the Following targets:"); int i=0; for (i=0;i<targets.length;i++) { System.out.println("nt "+targets[i]); } System.out.println("-----------Above We need to write our Logic to Choose the Deploy target---------nn"); Target deployTargets[]=new Target[1]; //SUPPOSE WE WAANT TO DEPLOY IT ON AdminServer ... deployTargets[0]=targets[0]; //-------------DEPLOYING FIRST APPLICATION-------------// String applicationDisplayName="FirstEARApplication"; options.setName(applicationDisplayName); ProgressObject processStatus=deployManager.distribute(deployTargets, new File("FirstEAR.ear"), null,options); processStatus=deployManager.deploy(deployTargets, new File("FirstEAR.ear"), null,options); DeploymentStatus deploymentStatus=processStatus.getDeploymentStatus() ; System.out.println("nnt For FirstEAR.ear DeploymentStayus.getState(): "+deploymentStatus.getState() +"nn"); System.out.println("Sleeping for atleast 5-Seconds. Sothat the Deployment Activation gets Completed Successfully."); Thread.sleep(5000); //-------------DEPLOYING SECOND APPLICATION-------------// deployManager=null; deployManager=SessionHelper.getRemoteDeploymentManager( protocol,hostName,portString,adminUser,adminPassword); applicationDisplayName="SecondEARApplication"; options.setName(applicationDisplayName); processStatus=deployManager.distribute(deployTargets, new File("SecondEAR.ear"), null,options); Thread.sleep(5000); processStatus=deployManager.deploy(deployTargets, new File("SecondEAR.ear"), null,options); deploymentStatus=processStatus.getDeploymentStatus() ; System.out.println("nnt For SecondEAR.ear DeploymentStayus.getState(): "+deploymentStatus.getState() +"nn"); } }
(Based on the comment http://middlewaremagic.com/weblogic/?p=483#comment-4189 we have updated the JMX Deployment Code)
In the above Updated JMX Code You will get following kind of Output:
C:JMX_Notification>javac ApplicationDeployment.java Note: ApplicationDeployment.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. C:JMX_Notification>java ApplicationDeployment WebLogicDeploymentManager: weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl@1dd7ed DeploymentOptions: {isRetireGracefully=true,isGracefulProductionToAdmin=false,isGracefulIgnoreSessions=false,rmiGracePeriod=-1,reti reTimeoutSecs=-1,undeployAllVersions=false,archiveVersion=null,planVersion=null,isLibrary=false,libSpecVersion=null,libImplVersion=null,stag eMode=null,clusterTimeout=3600000,altDD=null,altWlsDD=null,name=null,securityModel=null,securityValidationEnabled=false,versionIdentifier=nu ll,isTestMode=false,forceUndeployTimeout=0,defaultSubmoduleTargets=true,timeout=0deploymentPrincipalName=null} ------------------------------------------------------------ Application Can be Deployed in the Following targets: AdminServer/server MyJMSServer/JMS server -----------Above We need to write our Logic to Choose the Deploy target--------- <Jun 4, 2011 6:37:17 PM IST> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating distribute operation for application, FirstEARApplication [archive: C:JMX_NotificationFirstEAR.ear], to AdminServer .> <Jun 4, 2011 6:37:41 PM IST> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating deploy operation for application, FirstEARApplication [ar chive: C:JMX_NotificationFirstEAR.ear], to AdminServer .> For FirstEAR.ear DeploymentStayus.getState(): running Sleeping for atleast 5-Seconds. Sothat the Deployment Activation gets Completed Successfully. <Jun 4, 2011 6:38:14 PM IST> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating distribute operation for application, SecondEARApplicatio n [archive: C:JMX_NotificationSecondEAR.ear], to AdminServer .> <Jun 4, 2011 6:38:19 PM IST> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating deploy operation for application, SecondEARApplication [a rchive: C:JMX_NotificationSecondEAR.ear], to AdminServer .> For SecondEAR.ear DeploymentStayus.getState(): running <Jun 4, 2011 6:38:21 PM IST> <Warning> <JNDI> <BEA-050001> <WLContext.close() was called in a different thread than the one in which it was created.> <Jun 4, 2011 6:38:21 PM IST> <Warning> <JNDI> <BEA-050001> <WLContext.close() was called in a different thread than the one in which it was created.>
.
.
Thanks
Jay SenSharma
January 21st, 2010 on 5:59 pm
Hi, Jay!
I could not do deploy in my application like you did in this code…
I have here an “EAR” apllication, with two modules: one “EJB” and one “WEB”.
I’ve been trying deply each module separated, but I could not.
Can you help me?
Thank you!
January 21st, 2010 on 6:31 pm
Hi Carolina,
Can you Please specify what error you are getting while deploying the Application…
Note: In the Application you need to make a small change … In the following Line:
TargetModuleID[] targetModuleIDs=deployManager.getAvailableModules(ModuleType.WAR, deployTargets);
Just replace “ModuleType.WAR” to ModuleType.EAR -> If u want to deploy EAR Application
replace “ModuleType.WAR” to ModuleType.JAR -> If u want to deploy JAR (EJB)Application
The application should work fine…if you can provide me the Exception/Error which u are getting while deploying your application..then that will be really helpful.
Thanks
Jay SenSharma
January 26th, 2010 on 1:10 pm
Hi, Jay!
So, I did the deploy on server, but the status of application is “Prepared”.
How can I turn to “Active”?
The method acitvate is deprecated, so I don’t know how to do…
=]
January 26th, 2010 on 1:38 pm
Hi Carolina,
It seems that the “start()” is not functioning properly….
Keep Posting 🙂
Thanks
Jay SenSharma
January 26th, 2010 on 3:02 pm
Hi Carolina,
Please ignore My previous response…I have found the reason why the “start()”was not functioning properly…. The application takes some time to get distributed …Before that “start()” should not be invoked…so Please put some Thread.sleep() there….
Target deployTargets[]=new Target[1];
deployTargets[0]=targets[0];
ProgressObject processStatus=deployManager.distribute(deployTargets, new File(applicationLocation), null,options);
DeploymentStatus deploymentStatus=processStatus.getDeploymentStatus() ;
System.out.println(“UnDeploymentStayus.getMessage(): “+deploymentStatus.getMessage() );
////////////////////////HERE WE NEED To SLEEP Sothat APPLICATION GETS DISTRIBUTED SUCCESSFULLY////////
Thread.sleep(5000);
/////////////////////////////////////////////////////////////
TargetModuleID[] targetModuleIDs=deployManager.getAvailableModules(ModuleType.WAR, deployTargets);
System.out.println(“nt targetModuleIDs [] = “+targetModuleIDs);
for (int j=0;j<targetModuleIDs.length;j++)
{
System.out.println("nt "+targetModuleIDs[j]);
deployManager.start(targetModuleIDs);
deployManager.start(targetModuleIDs);
}
Thanks
Jay SenSharma
January 26th, 2010 on 4:25 pm
Thanks Jay!
I finally got do remote deploy and undeploy in my application!
I’m sorry if I bother you too much… =}
Thank you sooo much!
April 27th, 2010 on 11:42 am
The new distribute() api does not have parameter to set the options for the application such as setting the application name.
New API:
public abstract javax.enterprise.deploy.spi.status.ProgressObject distribute(javax.enterprise.deploy.spi.Target[] arg0, java.io.File arg1, java.io.File arg2) throws java.lang.IllegalStateException
If this is the case then how to set the application name for the application while deploying.
July 10th, 2010 on 1:15 am
Hi Jay,
I have gone thru your site and it is good. had a query how to deploy compiled artifacts to osb console from the build server directly or thru script on to a cluster. Out configuration is adminserver, managed servers. while selecting the ports should we need to select managed server and its port number for deploying.
regards
prashanth
July 10th, 2010 on 10:20 pm
Hi Prashanth,
Deployment Task is always Initiated By the AdminServer. So in the Code u must always provide the AdminServer Host & Port details. Because Only AdminServer can make the <app-deployment> in the “config.xml”.
If you want to deploy the Application On Managed Server then in the above JMX code …you need to change the following code:
Target deployTargets[]=new Target[1];
//SUPPOSE WE WAANT TO DEPLOY IT ON AdminServer …
deployTargets[0]=targets[0];
.
.
Keep Posting 🙂
Thanks
Jay SenSharma
October 22nd, 2010 on 12:05 pm
Hi, Jay!
Thanks a lot for the post. But I m also facing the same issue of status of application is “Prepared”. I tried with Thread.sleep(5000) as u have suggested. still no luck. also i tried with increasing the sleep time. still status is not changed to Active. Could please suggest something!!
October 26th, 2010 on 6:50 pm
Hi Jay,
I have one more doubt with the code provided above :
why do we need the .start twice like
deployManager.start(targetModuleIDs);
deployManager.start(targetModuleIDs);
????
Also It tries to start all the applications in the server. And it actually starts only one application which it gets first, and rest it keeps in prepared state.
I tried with something like :
TargetModuleID[] targetModuleID = new TargetModuleID[1];
for(int i = 0; i < targetModuleIDs.length ; i++)
{
// if(targetModuleIDs[i].getModuleID())
if(targetModuleIDs[i].getModuleID() != null &&
targetModuleIDs[i].getModuleID().equals(sAppName))
{
targetModuleID[0] = targetModuleIDs[i];
break;
}
}
if(targetModuleID[0] != null)
{
deployManager.start(targetModuleIDs);
}
to deploy only the application I want. But no luck 🙁
It does not even deploy the application. Status says "Failed". Even worse.
Could you please suggest something why or how I can make only one application deploy ?? it will be very helpful.
Thanks in advance,
Swagatika
October 26th, 2010 on 11:02 pm
Hi Swagatika,
Duplicate Lines for “deployManager.start(targetModuleIDs);” is IDEALLY not needed …but when i was writing this code i found that writing this line once was giving me failure results. So i added duplicate lines there. As there is no document available on this perticular MBean on Net or in EDocs so i had no other option / workaround to get rid of it.
If you are getting Application Deployment FAILED after running the JMX code …you must check the Log…because there we will get more details of deployment Failure. Better if you can post the Complete stack Trace of Server Log …which tells the reason of Failure. Because Above JMX code is just a different way of deploying applications…and it should not cause any Failure…So if the application is Failing to deploy the Logs will really help us to debug the issue.
.
.
Keep Posting 🙂
Thanks
Jay SenSharma
January 10th, 2011 on 4:33 pm
Hi Jay
I like this way for deployment. But is it possible to connect on t3s server too with SessionHelper.getRemoteDeploymentManager()?
Many thanks in advance
Coquina
January 10th, 2011 on 7:30 pm
Hi Coquina,
You can use the “t3s” protoclo as well but in that case you need to run the Program like below:
java -Dweblogic.security.SSL.ignoreHostnameVerification=true -Dweblogic.security.TrustKeyStore=DemoTrust ApplicationDeployment
There DemoTrust is the Default weblogic KeyStore alias. You can use your own.
.
.
Keep Posting 🙂
Thanks
Jay SenSharma
January 11th, 2011 on 4:55 pm
Hi Jay
Many thanks for the post. I tried this but my server doesnt like ApplicationDeployment :-(.
Here is the Exception. I set the set SERVER_START_ARGUMENTS=-Dweblogic.security.SSL.ignoreHostnameVerification=true before. The server is running in production mode.
Thanks
Coquina
January 11th, 2011 on 5:14 pm
Exception:
Certificate chain received from myserver – 192.168.254.215 was not trusted causing SSL handshake failure.
We are using trust demo certificates.
January 11th, 2011 on 5:16 pm
We are using trust demo certificates.
Exception: Certificate chain received from myserver – 192.168.254.215 was not trusted causing SSL handshake failure.
January 11th, 2011 on 5:18 pm
Sorry. Chrome browser gives some waits and errors. Now I take IE 🙁
January 11th, 2011 on 10:15 pm
Hi Coquina,
Can u please post the complete StackTrace of the Error which you are getting while running your JMX application like following:
java -Dweblogic.security.SSL.ignoreHostnameVerification=true -Dweblogic.security.TrustKeyStore=DemoTrust ApplicationDeployment
Also please let us know the exact version of the JDK which ou are using at Client end and at the Server end.
NOTE: in case if you are facing an difficulty in pasting the Stack Trace then you can refer to the following image: http://middlewaremagic.com/weblogic/wp-content/uploads/2009/08/How_to_Post_Comments.jpg
.
.
Keep Posting 🙂
Thanks
Jay SenSharma
January 12th, 2011 on 12:16 pm
Hi Jay
Thank you so much. Server end we use JRockit 1.6.14. Client side we using JDK 1.6.0.22.
Thanks
Coquina
January 12th, 2011 on 1:28 pm
There are two exception in the trace:
a.) java.net.ConnectException: t3s://myserver:38200: Destination unreachable; nested exception is:
b.) javax.net.ssl.SSLKeyException: [Security:090542]Certificate chain received from myserver – 192.168.254.215 was not trusted causing SSL handshake failure. ….
I am pretty sure that you have make sure that the Server is up and running and accessible over the wire.
So ruling out the Destination unreachable exception
Now jumping to the SSLKeyException
the client side(JDK 1.6) is sending the request over to the Server(JRockit)over SSL.
* Try using the same cacerts in both the instance.
* Is the WLS enabled to listen on SSL ?
Please let me know.
Regards,
Tariq Khan
January 12th, 2011 on 4:47 pm
Hi Coquina,
If you are using Demo Certificates on WLS server then you can also follow the below steps:
1: Go to the %BEA_HOME%wlserver_10.3serverlib directory.
2: Find the demo.cer file in this directory.
3: copy this file on the client machine where you are trying to execute the above code in the JAVA_HOME/jre/lib/security/ dir.
4: Let us say JAVA_HOME on client machine is :
c:/program files/java/jdk1.6_22/
Then copy the demo.cer file from WLS machine to client machine in C:/program files/java/jdk1.6_22/jre/lib/security/ dir
5: Open a cmd prompt and set the java home on this prompt and then execute the below command to import the demo.cer file in the cacerts file.
keytool -importcert -trustcacert -alias demo -file “C:/Program files/java/jdk1.6_22/jre/lib/security/demo.cer” -keystore “C:/Program files/java/jdk1.6_22/jre/lib/security/cacerts” -storepass changeit
6: now try to deploy the application using the above code.
Thanks,
sandeep
January 14th, 2011 on 1:04 pm
Hi Tariq and Sandeep
First I am sorry. Was very busy the last two days.
@Tariq: Sure. The Server runs and WLS is enabled to listen SSL. We are using some WLST Scripts with the same demotrusts without problems.
@Sandeep: I import the demo.crt. I cant find demo.cer? I try this with JDK 1.6 and JRE6. I run under Ecplise and as executable JAR. But I have it send the same Exception :-(.
I found this sample code for LDAP. Is it possible thats we need it too?
Many thanks
Coquina
January 14th, 2011 on 2:24 pm
Hi Coquina,
The problem in your case is the Server JVM is using a Cacert which is not present in clients cert. So as sandeep suggested you need to import the ServerJVMs certs to the Clients JVM.
And regarding “javax.net.ssl.keyStore” u can use it without changing anything inside the code…like following:
java -Djavax.net.ssl.keyStore=C:jdk1.6_21libsecuritycacerts -Djavax.net.ssl.trustStore=C:jdk1.6_21libsecuritycacerts DeployApplication
.
.
Keep Posting 🙂
Thanks
Jay SenSharma
January 14th, 2011 on 7:08 pm
Hi Jay
Thanks again. I try this:
and this:
But the Exception is always the same ;-(.
Coquina
January 14th, 2011 on 7:41 pm
Hi Coquina,
U have placed the System property After the Jar name which will be ignored and even the command u are typing is wrong…..try this:
java -Djavax.net.ssl.keyStore=C:jdk1.6.0_21libsecuritycacerts -Djavax.net.ssl.trustStore=C:jdk1.6.0_21libsecuritycacerts -Dweblogic.security.TrustKeyStore=DemoTrust DeployApplication
or
java -Djavax.net.ssl.keyStore=C:jdk1.6.0_21libsecuritycacerts -Djavax.net.ssl.trustStore=C:jdk1.6.0_21libsecuritycacerts -Dweblogic.security.TrustKeyStore=DemoTrust -jar ApplicationDeployment.jar
.
.
Keep Posting 🙂
Thanks
Jay SenSharma
May 28th, 2011 on 1:26 am
Hi Jay,
I am trying to deploy multiple applications in weblogic using JMX deployment code you mentioned in this blog. I have placed couple of applications in 1 directory and trying to read it from java code and trying to deploy each application in weblogic.
After the deployment is done. i See one application status is fail and the other one in prepared state. I don’t know why they are in that state. Can you just try your deployment program with multiple applications and can you post that java class to me.
By the way the applications that i try to deploy are working fine in the other weblogic domains.
appreciate your help.
May 28th, 2011 on 6:14 pm
Hi Timmaraju,
Can you try using the WLST script for recursive deployment and see if that works fine for you
Topic: Recursive Deployment Using WLST
http://middlewaremagic.com/weblogic/?p=303
Regards,
Ravish Mody
May 29th, 2011 on 5:20 pm
Hey Ravish,
Thanks for providing me the alternative. Previously i use to deploy through the unix scritt. But this time for our project i am looking to deploy the applications with the java code. So that all the code will be java and will be like one bundle and the user cannot see the coding of it.
I am interested to know why that JMX is not working. I can appeciate it if you can provide me that.
Thanks in advance.
May 30th, 2011 on 4:04 pm
Hi Timmaraju,
As you mentioned that you are trying to deploy multiple applications using JMX code and 1 Application is Failing where as other applications are in Prepared State. So first we need to check whether One by One (At a time only one) applications deployment is becoming successful or not ?
Once we will confirm that At a Time One Application Deployment is Successful then we can check why recursive application deployment is failing…. Usually every application takes little time so in between if the JMX Code will start another deployment then there are huge chances that those applications will not be activated properly and will move to the Prepared State.
.
.
Keep Posting 🙂
Thanks
Jay SenSharma
May 31st, 2011 on 9:16 am
Yes Jay you are right. When i tru to deploy for the single application, itz able to deploy, but when i try to deploy a big application like UI application, the jmx program is not consistent. Sometimes it is able to deploy and some times it is failing.
June 3rd, 2011 on 1:15 am
Hey Guys,
Did you get some time to look into my issue ?
Appreciate if you guys can help me.
Thank you
June 3rd, 2011 on 6:22 am
Hi Jay & Ravish,
I am able to deploy the applications in the weblogic, but i am facing the problem that the JMX code is not starting the applicatons deployed. Every time it is trying to start the 1st distributed application only. So the remaining applications are left in the prepared state.
In this step
TargetModuleID[] targetModuleIDs = deployManager.getAvailableModules( ModuleType.EAR,deployTargets );
it was taking all the distributed modules from weblogic
but it was only trying to start the 1st distributed application with the below code.
deployManager.start( targetModuleIDs );
Can you guys help me ?
June 4th, 2011 on 5:01 pm
Hi Timmaraju,
I have updated the JMX Code in the following link: http://middlewaremagic.com/weblogic/?p=483
Using above JMX Code i tested to deploy few applications at once and it worked. 🙂
.
.
Keep Posting 🙂
Thanks
Jay SenSharma
June 17th, 2011 on 5:28 pm
Hi Jay,
I have a problem with depolying application on managed server on weblogic.I am not able to deploy it through the code.Your java code for deploying ear on Admin server working fine but i need logic to depoly it on Managed server.
Can u please help me out for deploying ear on Managed server?
Wating for response i am really stuck at some point.
June 21st, 2011 on 5:35 pm
Hi Ram,
Please check the below article which is the enhanced version of deploying applications using JMX for Managed Servers: http://middlewaremagic.com/weblogic/?p=6923
Also please check the NOTE mentioned in the article regarding the “Lock & Edit” button which may cause issues if it is disabled.
.
Keep Posting 🙂
Thanks
Jay SenSharma
August 19th, 2011 on 12:32 pm
Hi Jay,
Does this code for deploying application also results in update of config.xml
August 19th, 2011 on 12:38 pm
Hi Sanjeev,
Sorry for delay in response … Please let us know which version of WLS are you using so that i will give it a try.
I did not try it so far (to change the deployment target for a Shared library using JMX) because If The Shared Libraries are referenced by an application deployed on certain target then first we will neecd to undeploy all those applications which are referencing to the Shared Library then only we can change the target of a Shared Library.
.
.
Keep Posting 🙂
Thanks
Jay SenSharma
August 26th, 2011 on 9:17 pm
Hi Jay
Thanks for the response. We are able to deploy all the required ears/shared libraries.
Answer to your question
————————
Weblogic server version is weblogic 10.3.3 and 10.3.5
Regarding Shared Libraries
—————————
We are not changing the deployment targets for shared library instead we are adding a new target to the list i.e. share library “shared.jar” is initially deployed/targeted to “server1” and “server2”. As part of our change we want it to be additionally targeted to “server3”. So I don’t think we really need to undeploy all application referring to this library “shared.jar”
We are able to target it to server3 as per steps below:
1)we undeployed shared.jar from server1 and server2
2)we deployed shared.jar to all servers i.e. server1, server2 and server3.
New Issue
———-
Now the new issue is with the path that is reflected in the config.xml after we successfully deploy all the ears/jars.
I have my ears/jars at location say “/root/sanjeev/deploybleitems/.ear/jar
Now when I deploy it with the below code
=================================================
ProgressObject processStatus=deployManager.distribute(deployTargets, new File(“/root/sanjeev/deploybleitems/test.ear”), null,options);
processStatus=deployManager.deploy(deployTargets, new File(“/root/sanjeev/deploybleitems/test.ear”), null,options);
================================================
the element in config.xml doesn’t show above path instead it shows some path local to domain/admin server.
My requirement is to keep the path to whatever I am supplying as part of deploy()/distribute() method.
Also there is no setter method available as part of DeploymentOption class to support this
Need your expertise on fixing this issue. An earlier possible response will really help
Thanks again!
Sanjeev
August 26th, 2011 on 9:19 pm
Please read “the element in config.xml”
as “the element in config.xml”
Thanks,
Sanjeev Sharma
January 21st, 2012 on 3:14 am
Hi Jay,
Thanks for all your earlier replies. One more question:
This code works perfect on individual servers.
Just wanted to check if the same code works if I want to deploy an application on cluster consisting of say node1 and node2. More details below:
Details:
========
The method of finding server/target is very plain. If I have an application say “app1” targeted on “server1” then my code looks for all the targets and find out which target “app1” is deployed. Thus get the names of the server/target.
Can I use the same code to deploy it on a cluster. suppose I have created a cluster say “mw_cluster” consisting of two nodes “node1” and “node2”.
My Application say “app1” is deployed on “mw_cluster”. Now I will be looking for the node where target “app1” is deployed and the for this search will result “mw_cluster”.
Now if I use below code for setting target:
Target deployTargets[]=new Target[1];
//SUPPOSE WE WAANT TO DEPLOY IT ON mw_cluster…
deployTargets[0]=targets[0]; // target[0] would be mw_cluster in this case
In my code assume that target[0] would be referring to “mw_cluster”. Just wanted to check if i replace actual managed server name with the clustername “mw_cluster”, will it result in deployment of my “app1” to both the nodes comprising the cluster.
October 11th, 2012 on 10:21 pm
Hi Jay,
I have a simple query.
I am looking for a code to deploy an application to the managed servers however is it possible that we can deploy it without the adminserver running.
I have seen several posts however could not find a way to do it.
Regards
Keshav Agarwal
November 1st, 2012 on 1:39 am
Hi Jay,
How do we use external stage deployments using this code.
Regards
Ravi