WebSphere Tutorial · Traditional WebSphere Application Server · Lesson 14 of 23

The Admin Console and wsadmin

Administering traditional WAS through the Integrated Solutions Console and by script with wsadmin and Jython.

Members can save this page, take notes and track progress. See membership · Sign in

The admin console

The Integrated Solutions Console runs on the Deployment Manager (by default https://dmgr-host:9043/ibm/console). It's good for exploring and one-off checks, but manual clicks are hard to repeat exactly in other environments.

wsadmin

wsadmin scripts everything the console can do, in Jython (or the older Jacl). Its objects:

Object Use
AdminConfig Read and change configuration objects
AdminControl Act on running processes (start, stop, invoke MBeans)
AdminApp Install, update and uninstall applications
AdminTask Higher-level commands (create data sources, clusters, servers)
# wsadmin.sh -lang jython -f set_heap.py
server = AdminConfig.getid('/Node:host-aNode01/Server:orders1/')
jvm = AdminConfig.list('JavaVirtualMachine', server)
AdminConfig.modify(jvm, [['initialHeapSize', '2048'], ['maximumHeapSize', '2048']])
AdminConfig.save()            # nothing is applied until you save

After saving, synchronise nodes (or let automatic synchronisation do it) and restart the affected servers if the change needs it. Keep scripts in Git and run them per environment with parameters: configuration as code.

Why AdminConfig.save() matters: changes stay in a workspace until savedTry it yourself
class Workspace:
    def __init__(self):
        self.repo = {"orders1.maxHeap": 1024}
        self.pending = {}

    def modify(self, key, value):
        self.pending[key] = value

    def save(self):
        self.repo.update(self.pending)
        self.pending.clear()

ws = Workspace()
ws.modify("orders1.maxHeap", 2048)
print("before save:", ws.repo)
ws.save()
print("after save: ", ws.repo)

Output

before save: {'orders1.maxHeap': 1024}
after save:  {'orders1.maxHeap': 2048}

Test yourself

Which wsadmin object installs and updates applications?

  1. AdminControl
  2. AdminApp
  3. AdminConfig
  4. AdminJvm
Show answer

Answer: AdminApp

AdminApp handles application install, update and removal.

Last reviewed · By the ByteCamel team · How we write content

Was this page helpful?

Report a mistake