Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to obtain an application display-name using wsadmin jython scripting

116 views
Skip to first unread message

Gary Waugaman

unread,
Nov 16, 2007, 2:00:32 PM11/16/07
to
Can anyone show me a way to obtain the "display-name" for an application
that has just been installed from an EAR file. I'm trying to obtain the
display-name as it is found in the EAR file directory under the META-INF
application.xml file, but I need to be able to get it from WAS using
Jython scripting. Essentially, when given only the EAR file name used
to install the application (AdminApp.install("earFileName")), I'd like
to have the display-name for the app. TIA.

tonyumcp

unread,
Dec 5, 2007, 5:35:48 PM12/5/07
to
Are you interested in getting this information for purposes of reporting? if you do not pass in an appName to the AdminApp.install() then whatever the display-name is set to within the application.xml in the ear file will be used. In order to get the target display name from an ear file prior to running the AdminApp.intall() you might want to write a helper python script that extracts that information directly from the raw ear file. before I became proficient in python I wrote a java program to do this with Java ZIP file processing API. If you are still in search of that particular solution let me know....<br />
<br />
Cheers

grflanagan

unread,
Dec 6, 2007, 6:43:11 AM12/6/07
to


Relatively new to WebSphere but I use this:

[code jython]
before = AdminApp.list().split(eol)
AdminApp.install(earfile, installoptions)
after = AdminApp.list().split(eol)
appname = ""
for app in after:
if app not in before:
appname = app
break
log.info("Done installing.")
log.info("Application name is: " + appname)
return appname
[/code]

HTH

Gerard

0 new messages