cle_clock
Home > wikikonf >  was/actions/by kikonf > stops







Stops

print

Action : was.stops   (Category : was, Name : stops, By : kikonf)
Complete Name : was.stops.by.kikonf
Version : 5.0        License : Modified BSD License

Purpose of the was category :
Easy to customize. This category use in background the wsadmin command in jython mode (through AdminConfig, AdminControl and AdminTask), to drive WebSphere Application Server ® configuration.
You can use it to manage the whole WebSphere ® architecture.

Purpose of this stops plugin : Stop one Server

The following shows the main Source Code File for the Action : was.stops

Toggle lines
##  Copyright (c) 2008, Patrick Germain Placidoux
##  All rights reserved.
##
##  This file is part of Kikonf Public Software.
##
##  Kikonf Public Software is released under the modified BSD License,
##  which should accompany it or any part of it in the file "COPYING".
##  If you do not have this file you can access the license 
##  through the WWW at http://www.kikonf.org/license/bsd/license.txt.
## 
##  Home: http://www.kikonf.org
##  Contact: kikonf@gmx.com



from actions.was.tools import *


class Stops(wasAction):
    
    def run(self):
        self_funct='run'
        stops_node = self.getTop()        
        stops_attrs = stops_node.getAttrs()
        scope_id, scope_attrs, scope=self.getScope(parent_node=stops_node, indent=self.getIndent()) #-- Retreives scope
        self.verbose(scope_attrs)
        indent=self.getIndent() + 3*' '

        verbose('Node MBean retreiving.', level=self.getVerbose(), ifLevel=4, indent=indent, logFile=self.getLogFile())
        ps=AdminControl.queryNames('name=' + scope_attrs['server'] + ',process=' + scope_attrs['server'] + ',node=' + scope_attrs['node'] + ',type=Server,processType=ManagedProcess,*')
        
        verbose('Node MBean invoking stop', level=self.getVerbose(), ifLevel=4, indent=indent, logFile=self.getLogFile())
        AdminControl.invoke(ps, 'stop')
        verbose('Aplication Server:' + scope_attrs['server'] + ' stopped on node:' + scope_attrs['node'] + '.', level=self.getVerbose(), ifLevel=2, indent=indent)

    def verbose(self, scope_attrs):
        scope=str(scope_attrs).replace("'", '')[1:-1]
        
        verbose('Application Server at scope:' + scope + '.', level=self.getVerbose(), ifLevel=2, indent=self.getIndent())
							
(Source: <KIKONF_INSTALLATION_DIR>/plugins/actions/was/stops/by/kikonf/stops.py)


  • Line 1 to 3 say something , say something , say something
  • Line 10 to 17 say something , say something , say something , say something , say something
  • Line 20 to 25 say something



Trademarks :
  • "IBM", "WebSphere", "WebSphere Aplication Server", "WAS" are registred trademarks of International Business Machines Corporation.
  • "Java" and "JVM" are a registred trademarks of Oracle and/or its affiliates.
  • Other names may be trademarks of their respective owners.

Copyright © 2011 - Patrick Placidoux, Hélène Malamoud