Restart EAR Application with WSadmin script

At my company e-office, we were working on a customization in
Lotus Connections for one of our customers.

Because every change regarding the lay-out ( editing a *.HTML,*.CSS,*.JS file )
requires a restart of the specific EAR ( Activities , Blogs, etc ) I made
a script in WSadmin python so we could simplify this process.

Now we can restart an EAR file with a single command line instead
of clicking yourself senseless through the WASadmin web interface :-).

FILE restart_activities.py

appName=’Activities’
server=’server1′

cell=AdminConfig.list(‘Cell’)
cellname=AdminConfig.showAttribute(cell,’name’)
nodes=AdminConfig.list(‘Node’,cell)
nodename=AdminConfig.showAttribute(nodes,’name’)
appManager=AdminControl.queryNames(‘type=ApplicationManager,cell=’+cellname+’,node=’+nodename+’,process=’+server+’,*’)

AdminControl.invoke(appManager, ‘stopApplication’,appName)
AdminControl.invoke(appManager, ‘startApplication’,appName)

!FILE

wsadmin.bat -lang jython -user wasadmin -password ***** -port 8880 -f .\wsadmin_scripts\restart_activities.py

Create a *.py for every part of Lotus Connections.

This entry was posted in lotus connections and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

Please leave these two fields as-is:

Protected by Invisible Defender. Showed 403 to 807,335 bad guys.