0

I am trying to start all the appservers managed by a DMGR using Jython, I have come up with this script but it is not working. Can anyone guide me what could be wrong here.

server = AdminConfig.list( 'Server' );
mbean  = AdminConfig.getObjectName( server );
AdminControl.invoke( mbean, 'restart' );

# combined into a single statement, this would be:

AdminControl.invoke( AdminConfig.getObjectName( AdminConfig.list( 'Server' ) ), 'restart' );

1 Answer 1

0

There's a library of jython functions that probably handles it here https://github.com/wsadminlib/wsadminlib. Look for startAllServersInCluster

2
  • Hi Bruce, Thanks I got it. The very first method about getting CLUSTER Name is not working.
    – VikasB
    May 23, 2020 at 22:24
  • def getServerClusterByName( name ): 241 """Return the config object id for the named server cluster 242 TODO: get rid of either this or getClusterId""" 243 return getObjectByName( 'ServerCluster', name ) is this the right method to get Cluster name ?
    – VikasB
    May 23, 2020 at 22:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.