Friday, October 23, 2009

How to print applications names currently deployed

Recently one of my friend posted question in Oracle forums, how to print all applications deployed to an environment. Obviously we have Admin console, but he wanted to know application names from command prompt.

There are two ways to do this.

1) Using weblogic.Admin utility :- java weblogic.Admin -adminurl t3://vasserver:port -username vas -password vas -listapps

2) Below is the WLST script to print application names. I tried to write this script as simple as possible, so didn't follow coding standard

connect('adminusername','adminpassword','t3://vasserver:9999')
domainConfig()
vasApps=cmo.getAppDeployments()
for app in vasApps:
#tab print app.getName()

Note :- Please make sure you insert "tab" where ever you see "#tab" in code. When I post the code with tabs the tabs are being removed, this may me fateful when the code is directly copied and executed with out tabs.

Hope you liked my post, have a great day.

Vijay Bheemineni.


0 comments: