Friday, April 10, 2009

Using Jython Script to Deploy and undeploy app in WebLogic 10

I have seen some instances where jython script to deploy web application in WebLogic 10.1 does not works.
Here is solution for that , just undeploy application before deploying.
I tested and it works even when application is not deployed or already deployed in WLS 10.1.

Here is part of script.

connect('username','password','adminURL')
edit()
startEdit()

warName='testAppName'
archiveLoc='archiveLocation'
time='timeout'
server= 'targetServer'

stopApplication('appName')
undeploy('appName')
save()
activate(block="true")
edit()
startEdit()
deploy('appName',archiveLocation),server, time)
save()
activate(block="true")
disconnect()

No comments:

Post a Comment

Post a Comment