Query the application state using scripting


 

+

Search Tips   |   Advanced Search

 

Use wsadmin and scripting to determine if an application is running.

There are two ways to complete this task. The example in this topic uses the AdminConfig object to create and configure a shared library. Alternatively, we can use the createSharedLibrary script in the AdminResources script library to configure shared libraries.

The scripting library provides a set of procedures to automate the most common administration functions. We can run each script procedure individually, or combine several procedures to quickly develop new scripts.

Jacl...

$AdminControl completeObjectName type=Application,name=SamplesGallery,*

Jython...

print AdminControl.completeObjectName('type=Application,name=SamplesGallery,*')

 

Results

If SamplesGallery is running, then an MBean is created. Otherwise, the command returns nothing. If SamplesGallery is running, the output would resemble the following:

WebSphere:cell=mycell,name=SamplesGallery,mbeanIdentifier=cells/mycell/applications/SamplesGallery.ear/ deployments/SamplesGallery/deployment.xml#ApplicationDeployment_1,type=Application,node=mynode,Server= dmgr,process=dmgr,J2EEName=SamplesGallery

 

Related tasks


Use AdminControl for scripted administration

 

Related


Commands for AdminControl