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' );
VikasB
  • 1

1 Answers1

0

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

Bruce T.
  • 992
  • 4
  • 5
  • Hi Bruce, Thanks I got it. The very first method about getting CLUSTER Name is not working. – VikasB May 23 '20 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 '20 at 22:25