Hi Udara,

I would think  it should work similar to cartridge deployment (to follow apache 
stratos paradigms), you have to undeploy first before redeploy, but in general 
you should be able to redeploy a composite application.

Btw, this code for sure needs some rework as the application name / alias is 
hardcoded and only allows a single application to be deployed.


Thanks

Martin

From: Udara Liyanage [mailto:[email protected]]
Sent: Tuesday, July 08, 2014 2:19 AM
To: dev
Cc: Isuru Haththotuwa; Martin Eppel (meppel)
Subject: Composite application redeployment

Hi Isuru, Martin


I came across the following code snippet in 
CompositeApplicationCreatedMessageProcessor. According to that a 
CompositeApplication is ignored if a composite application exist with the same 
alias. Then a composite application can not be modified after deploying, 
basically composite app can not be re deployed.
Is this the expected behavior or do we allow to redeploy the composite App?


1.  if (topology.compositeApplicationExists(event.getApplicationAlias())) {

2.                  if (log.isWarnEnabled()) {

3.                      log.warn(String.format("CompositeApplication already 
created: [com app] %s", event.getApplicationAlias()));

4.                  }

5.              } else {

6.

7.                  ConfigCompositeApplication configApp = 
event.getCompositeApplication();

8.                  String alias = "compositeApplicationAlias";

9.                  if (log.isInfoEnabled()) {

10.                         log.info("adding ConfigCompositeApplication with 
alias " + alias + " to topology");

11.                 }

12.                 topology.addConfigCompositeApplication(alias, configApp);

13.             }

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com<http://wso2.com/>
lean. enterprise. middleware
web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897

Reply via email to