2

I use following wlst command in order to check if application was already deployed before:

oldApplication = find(name=d['name'], type='AppDeployment')

But it does not show that application was deployed on a specific server.
How can I find that application was deployed on a specific managed server?

Volodymyr Bezuglyy
  • 16,295
  • 33
  • 103
  • 133

2 Answers2

1

oldApplication will be an AppDeployment MBean, which has the "targets" attribute. http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e13951/mbeans/AppDeploymentMBean.html

oldApplication.targets will return an array of "TargetMBean", which will be the list of servers on which the application is targeted/deployed.

matt.nguyen
  • 396
  • 2
  • 5
0

It works for me and might help you:

print 'stopping and undeploying ...'

try:
    stopApplication('WebApplication')
    undeploy('WebApplication')
    print 'Redeploying...'

except Exception:
    print 'Deploy...'

deploy('WebApplication', '/home/saeed/project/test/WebApplication/dist/WebApplication.war')
startApplication('WebApplication2')
Saeed Zarinfam
  • 9,818
  • 7
  • 59
  • 72