WebSphere Application Server Administration Using Jython

Hardcover
from $0.00

Author: Robert A. Gibson

ISBN-10: 0137009526

ISBN-13: 9780137009527

Category: General & Miscellaneous Networking & Telecommunications

Search in google:

Save Time and Money: Streamline WebSphere Application Server Management with Jython Scripting!Utilizing Jython scripting, you can dramatically reduce the effort, resources, and expense associated with managing WebSphere Application Server. WebSphere Application Server Administration Using Jython will show you how. The first start-to-finish guide to Jython scripting for WebSphere administration, this book’s practical techniques and downloadable scripts can help you improve efficiency, repeatability, and automation in any WebSphere environment.This book’s expert authors begin with practical introductions to both WebSphere Application Server administration and Jython, today’s powerful, Java implementation of Python. Next, they cover a broad spectrum of WebSphere management tasks and techniques, presenting real, easy-to-adapt solutions for everything from server configuration and security to database management. These are powerful solutions you can begin using immediately–whether you’re running WebSphere in production, development, or test environments.Coverage includes Mastering the Jython rules, characteristics, and properties that are most valuable in WebSphere scripting Viewing and manipulating WebSphere configuration and run-time details Making the most of the wsadmin scripting engine and objects–including rarely-used wsadmin parameters that can simplify administration Adjusting wsadmin properties to reflect your needs and environment Using the AdminApp scripting object to list, view, install, uninstall, and modify AppServer applications Using the AdminTask object to manipulate WebSphere Application Server at a high level Configuring the WebSphere Application Server with AdminConfig Manipulating active AppServer objects (MBeans) with AdminControl Controlling security, including aliases, roles, administrative and application security, and multiple security domains

Acknowledgments . . . xxiAbout the Authors . . . xxiiiChapter 1 Introduction . . . 1Why Is This Book Necessary? . . . 1About the Websphere Application Server Product . . . 2This Book and Its Organization . . . 2Chapter 2 Jython Fundamentals . . . 5Introduction . . . 6Data Types . . . 6Numbers . . . 7Strings . . . 8Tuples . . . 11Lists . . . 12Accessing Sequence Elements . . . 12Dictionaries . . . 14Additional Information Types . . . 15Literals (Constants) . . . 15Variables Names (Identifiers) . . . 15Variables . . . 16Expressions . . . 18String Operators . . . 19Statement Separator . . . 25Comments . . . 26Coding Conventions . . . 26Summary . . . 26Chapter 3 Jython Statements . . . 27Expression Statements . . . 27The print Statement . . . 27Assignment Statements . . . 28Packing and Unpacking . . . 30Augmented Assignment . . . 32Slices . . . 32Simple Statements . . . 35The assert Statement . . . 35The break Statement . . . 36The continue Statement . . . 36The del Statement . . . 36The exec Statement . . . 38The import Statement . . . 39The pass Statement . . . 39The raise Statement . . . 39Control Flow . . . 39Compound Statements . . . 42The if Statement . . . 42loop Statements . . . 42The while Statement . . . 43The for Statement . . . 44The try Statement . . . 47Functions . . . 49Function Definitions . . . 50Namespaces . . . 51The global Statement . . . 51Function Parameters . . . 53The return Statement . . . 58Default Parameter Evaluation . . . 60Summary . . . 62Chapter 4 Jython Classes . . . 63Class Statement . . . 63Example class Definition . . . 64Object Instantiation . . . 66Built-in Constants . . . 66Built-in Data Types . . . 67List Methods . . . 67Dictionary Methods . . . 69String Methods . . . 71String Formatting . . . 74Built-in Functions . . . 77Summary . . . 86Chapter 5 Jython Modules . . . 87Jython Module Basics . . . 87The import Statement . . . 88nested_scopes . . . 90Packages . . . 92Errors and Exceptions . . . 92Built-in Exceptions . . . 93Functional Programming . . . 94Using Java Objects and Libraries . . . 95Jython Standard Library . . . 97getopt() Module . . . 100Regular Expressions (RegExp) . . . 107Summary . . . 112Chapter 6 wsadmin . . . 113wsadmin Options . . . 115Usage Information . . . 116The Java Virtual Machine Initialization Phase . . . 116The wsadmin Environment Initialization Phase . . . 116The Connection Phase . . . 120Defining the Scripting Language . . . 122Trace-Related Options . . . 122wsadmin Profile Script Files . . . 123Commands and Script Files . . . 126Interactive/Interpretive wsadmin Session . . . 128Summary . . . 128Chapter 7 Introduction to Admin Objects . . . 129The Administrative Scripting Objects . . . 129Help for the Help Object . . . 134Help for MBeans . . . 136Help for MBean Attributes . . . 138Help for MBean Operations . . . 140Help for Additional MBean Information . . . 142Help for Other Administrative Objects . . . 144Help for WebSphere Messages . . . 145Useful Information . . . 145Summary . . . 147Chapter 8 The AdminConfig Object . . . 149AdminConfig Overview . . . 149Configuration Identifier (config ID) . . . 150Containment Path . . . 151Configuration Types . . . 152Using a config ID . . . 153Show and Tell Methods . . . 155Create and Modify Methods . . . 160Configuration Verification/Validation . . . 162Document Manipulation Methods . . . 164Miscellaneous Methods . . . 164Summary . . . 165Chapter 9 The AdminControl Object . . . 167Environment Information and Manipulation . . . 167MBean Support Methods . . . 172Objects, Names, and Instances . . . 173Attribute-Related Methods . . . 174Miscellaneous Methods . . . 181*_jmx Methods . . . 183Summary . . . 184Chapter 10 The AdminApp Object . . . 185Application Informational Methods . . . 185Application Installation Methods . . . 190Edit, Update, and Uninstall . . . 194Miscellaneous AdminApp Methods . . . 196Summary . . . 198Chapter 11 The AdminTask Object–Server Management . . . 199Introduction 199Simple One-Line Examples . . . 201ServerType-Related Methods . . . 202Creating Servers and Clusters . . . 205Server-Related Commands . . . 209create*Server Optional and Required Steps . . . 212Server Template-Related Commands . . . 214JVM-Related Methods . . . 216JVM System Properties . . . 217JVM Properties . . . 218z/OS-Specific Methods . . . 220Miscellaneous ServerManagement Methods . . . 220Reference Section . . . 223Node Group Command Group and Core Group Command Group . . . 224AdminReports Command Group . . . 226ClusterConfigCommands Command Group . . . 226ConfigArchiveOperations Command Group . . . 231GenerateSecurityConfigCommand Command Group . . . 232PortManagement Command Group . . . 232ServerManagement Command Group . . . 233Server Management Methods that Do Not Belong to Any Command Group . . . 238Summary . . . 239Chapter 12 Scripting and Security . . . 241WebSphere Security Basics . . . 241JAAS (J2C) Aliases . . . 242Create a J2C (JAAS) Alias . . . 242Viewing JAAS Aliases . . . 244Modify a JAAS Alias . . . 245Delete a JAAS Alias . . . 246Configuring Application Security . . . 249Enabling/Disabling Administrative and Application Security . . . 249Mapping Java EE Roles . . . 250Review the Current and Available Mappings . . . 251Mapping Roles to Users and/or Groups . . . 251Enable/Disable Java 2 Security . . . 253LDAP Failover . . . 255Viewing the Hosts . . . 257Adding Additional LDAP Hosts . . . 258Setting the Host List . . . 258Removing LDAP Hosts . . . 259Federated Registries (and Other Essentially Undocumented Scripting Areas) . . . 260Multiple Security Domains (WebSphere V7) . . . 261Additional Security Topics . . . 263Bus Security . . . 263Datasources . . . 263Web Services . . . 264AdminTask Security Reference . . . 264SecurityConfigurationCommands Group . . . 264SecurityDomainCommands Group . . . 270SecurityRealmInfoCommands . . . 272WIMManagementCommands . . . 273WizardCommands . . . 274JACCUtilityCommands . . . 275IdMgrRepositoryConfig . . . 275Chapter 13 Databases and Authorization . . . 277Database Basics . . . 277Terminology . . . 278A Simple Example . . . 278Troubleshooting Configuration Problems . . . 280Advanced Settings . . . 284Databases Reference Section . . . 291JDBCProviderManagement Group . . . 291VariableConfiguration Group . . . 294Useful MBeans . . . 296Summary . . . 300Chapter 14 Messaging . . . 301An Introduction to Messaging . . . 301Messaging Basics . . . 302Terminology . . . 303Example: Creating a Bus . . . 303Example: Deleting a Bus . . . 308Security . . . 310Enabling Bus Security . . . 311Example: Enabling Bus Access Security . . . 312Example: Enabling Transport Security . . . 314Reference Section . . . 317Creating Message Buses . . . 317Deleting a Bus and Bus Components . . . 326Modifying a Bus and Bus Components . . . 329Displaying Buses and Bus Components . . . 334Bus Security . . . 337Summary . . . 344Chapter 15 Administering Web Services . . . 345Web Services Basics . . . 346WS-I Profiles . . . 346WSDL and SOAP . . . 347A Web Service Example . . . 348Web Services Runtimes . . . 351Managing Web Services . . . 352Exploring Web Services . . . 353Listing Web Services . . . 353Listing Web Services Information . . . 354Exporting the WSDL for a Web Service . . . 355Web Service Policy Sets . . . 355Policy Set Bindings . . . 362Policy Set Attachment . . . 368Policy Topics Summary . . . 371Additional Topics . . . 371Enable/Disable Endpoints . . . 371WS-Notification . . . 371Web Services and the Service Integration Bus . . . 372Mediations . . . 372Web Services Gateway . . . 372Online References . . . 372AdminTask Web Services Reference . . . 373SIBWebServices Group . . . 374KeyManagerCommands . . . 377KeyStoreCommands . . . 378KeySetCommands . . . 381PolicySetManagement Group . . . 382WebServicesAdmin Group . . . 390Chapter 16 Version 7.0 Scripting Libraries . . . 393Library Organization . . . 393Scripting Library Help . . . 397Default Failure Action . . . 398AdminApplication Script Library Module . . . 399AdminApplication Group 1–Install and Uninstall Applications . . . 400AdminApplication Group 2–Query Application Configurations . . . 403AdminApplication Group 3–Update Applications . . . 404AdminApplication Group 4–Export Applications . . . 406AdminApplication Group 5–Configure Application Deployment . . . 407AdminApplication Group 6–Start/Stop Applications . . . 408Business-Level Applications (AdminBLA) . . . 409Java 2 Connector (AdminJ2C) Library Module . . . 412AdminJDBC Library Module . . . 414AdminJMS Library Module . . . 416AdminResources Library Module . . . 423AdminAuthorizations Library Module . . . 428AdminClusterManagement Library Module . . . 430AdminServerManagement Library Module . . . 432AdminServerManagement: Group 1–Server Configuration . . . 433AdminServerManagement: Group 2–ServerTracingAndLogging Configuration . . . 437AdminServerManagement: Group 3–OtherServicesConfiguration . . . 439AdminNodeGroupManagement Library Module . . . 445AdminNodeManagement Library Module . . . 446AdminLibHelp and AdminUtilities Library Modules . . . 447Summary . . . 447Index . . . 449