WLST

35,225
-1

Published on

Published in: Technology
2 Comments
11 Likes
Statistics
Notes
No Downloads
Views
Total Views
35,225
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
1,602
Comments
2
Likes
11
Embeds 0
No embeds

No notes for slide
  • WLST

    1. 1. WLST Bhavya Siddappa May 30, 2008
    2. 2. Topics of Discussion <ul><ul><ul><li>What is WLST? </li></ul></ul></ul><ul><ul><ul><li>Modes of Operation </li></ul></ul></ul><ul><ul><ul><li>Features </li></ul></ul></ul><ul><ul><ul><li>Online and Offline WLST </li></ul></ul></ul><ul><ul><ul><li>Advantages of WLST </li></ul></ul></ul><ul><ul><ul><li>MBean </li></ul></ul></ul><ul><ul><ul><li>Create Domain through WLST </li></ul></ul></ul><ul><ul><ul><li>Demo </li></ul></ul></ul><ul><ul><ul><li>FAQs </li></ul></ul></ul>
    3. 3. Puzzle <ul><li>WLST </li></ul><ul><li>Python </li></ul><ul><li>Jython </li></ul><ul><li>Mode of WLST Interaction </li></ul><ul><li>Is WLST Case Sensitive </li></ul><ul><li>Interactive, Scripting </li></ul><ul><li>OOPS Language </li></ul><ul><li>True </li></ul><ul><li>Weblogic Scripting Tool </li></ul><ul><li>Embedded, Script, Interactive </li></ul>Match the Following:
    4. 4. Let’s Check out what's right and what's wrong! <ul><li>WLST - Weblogic Scripting Tool </li></ul><ul><li>Python - OOPS Language </li></ul><ul><li>Jython - Embedded scripting language </li></ul><ul><li>Mode of WLST Interaction - Interactive, Scripting and Embedded </li></ul><ul><li>WLST Case Sensitive - true </li></ul>
    5. 5. What is WLST? <ul><li>Monitor, Manage & Configure WebLogic Server (online/offline) </li></ul><ul><li>Based on Jython </li></ul><ul><li>Similar to any programming language </li></ul><ul><li>Built on Jython 2.1 </li></ul><ul><ul><ul><ul><li>Simple & clear syntax </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Use jython libraries </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Fast in performance </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Platform Independent </li></ul></ul></ul></ul><ul><li>Includes capabilities of </li></ul><ul><ul><ul><ul><li>weblogic.Admin </li></ul></ul></ul></ul><ul><ul><ul><ul><li>weblogic.Deployer </li></ul></ul></ul></ul><ul><ul><ul><ul><li>wlconfig Ant Tasks </li></ul></ul></ul></ul><ul><ul><ul><ul><li>config wizard(silent mode) </li></ul></ul></ul></ul>
    6. 6. Modes of Operation <ul><li>1. Interactive </li></ul><ul><ul><li>Navigation/Interrogation </li></ul></ul><ul><ul><li>Prototyping command syntax </li></ul></ul><ul><ul><li>Record Interactions to a script to play it later </li></ul></ul>
    7. 7. Modes of Operation <ul><li>2. Script </li></ul><ul><ul><li>Sequence of commands via file </li></ul></ul><ul><ul><li>Use loops, flow control, conditional statements, variables </li></ul></ul>
    8. 8. Modes of Operation <ul><li>3. Embedded </li></ul><ul><ul><li>Uses Jython libraries </li></ul></ul><ul><ul><li>Able to Call WLST interpreter from within your Java code </li></ul></ul>
    9. 9. Executing WLST Script File <ul><li>Different ways: </li></ul><ul><ul><li>1. java weblogic.WLST filePath.py </li></ul></ul><ul><ul><li>2. execfile (filePath.py) </li></ul></ul>c:> java weblogic.WLST c:/temp/example.py c:> java weblogic.WLST Initializing WebLogic Scripting Tool (WLST) ... ... ... wls:/(offline)> execfile('c:/temp/example.py') starting the script ...
    10. 10. Using WLST- Online <ul><li>WLST is a JMX client </li></ul><ul><li>Access to Managed Beans (MBeans). </li></ul><ul><li>Navigate and interrogate MBeans </li></ul><ul><li>Browsing the MBean hierarchy on connecting to a Server instance </li></ul><ul><li>BEA Systems recommends changes in the values of configuration MBeans on the Administration Server but not on Managed Server </li></ul>
    11. 11. Using WLST- Offline <ul><ul><li>Create a new domain or update an existing domain </li></ul></ul><ul><ul><li>You can create new config info., and retrieve and change existing config info from config.xml </li></ul></ul>
    12. 12. WLST Syntax Restrictions <ul><ul><li>Control Commands - connect, disconnect, exit </li></ul></ul><ul><ul><li>Commands and arguments are case sensitive </li></ul></ul><ul><ul><li>Use only forward slash (/) in a file pathname: </li></ul></ul><ul><ul><li>Following characters are not valid in object names: </li></ul></ul><ul><ul><ul><li>(.), (/), () </li></ul></ul></ul><ul><ul><li>cd (‘c:/temp/mytemplate.jar') </li></ul></ul>
    13. 13. Using WLST- Help <ul><li>Display help information for WLST commands by entering the help command: </li></ul><ul><li>help(‘online’) </li></ul><ul><li>help(‘offline’) </li></ul><ul><li>help('get*') </li></ul>wls:/mydomain/serverConfig> help('disconnect')
    14. 14. Features -Advantages <ul><li>Easily move resources from one Domain to another </li></ul><ul><li>Make reliable changes to config.xml without a running server </li></ul><ul><li>Use WLST in conjunction with any java utility tools (e.g. ant, jython scripts) </li></ul><ul><li>Extend WLST to add any Custom commands </li></ul><ul><li>WLST helps in retrieving MBeans names in a similar fashion to navigating </li></ul><ul><li>hierarchy of files in a file system. </li></ul>
    15. 15. Configuration MBean Hierarchy <ul><li>Configuration MBean Hierarchy </li></ul><ul><li>Domain MBean (root) </li></ul><ul><li>|- - - MBean type (LogMBean) </li></ul><ul><li>|- - - MBean instance (medrec) </li></ul><ul><li>|- - - MBean attributes & operations (e.g. FileName) </li></ul><ul><li>|- - - MBean type (SecurityConfigurationMBean) </li></ul><ul><li>|- - - MBean type (ServerMBean) </li></ul><ul><li>|- - - MBean instance (ManagedServer1) </li></ul><ul><li>|- - - MBean attributes & operations (e.g.AutoRestart) </li></ul>
    16. 16. Current Management Object <ul><li>When WLST first connects to an instance of WebLogic Server, cmo is initialized to the root of all configuration management objects: DomainMBean. </li></ul><ul><ul><li>MBean type, the value of cmo reflects the parent MBean. </li></ul></ul><ul><ul><li>MBean name, gives the name of the mbean object </li></ul></ul>
    17. 17. Edit Configuration MBeans <ul><li>DomainMBean root contains editable copy of all configuration MBeans in the domain. The “ change management process” controls distributing configuration changes in a domain representing a DB transaction </li></ul><ul><ul><li>edit()- used to create, delete, get, set, invoke </li></ul></ul><ul><ul><li>startEdit() - initiates modifications that are treated as a part of a batch change that is not committed to the repository until you enter the save command. </li></ul></ul><ul><ul><li>validate() - ensures that changes are valid before saving </li></ul></ul><ul><ul><li>save() - saves your changes to a pending version </li></ul></ul><ul><ul><li>activate() - initiates the distribution of the changes and releases the loc </li></ul></ul><ul><ul><li>stopEdit() - stops the current editing session and releases edit lock. </li></ul></ul><ul><ul><li>isRestartRequired(‘true’) - determines if a change made to an MBean attribute requires re-start </li></ul></ul>
    18. 18. Feature – Create/Configure Domain <ul><li>WLST enables creating a new domain or updating an existing domain without connecting to a running WebLogic Server </li></ul><ul><li>Creating a Domain (Offline) </li></ul><ul><ul><li>Create a new domain using a specified template - createDomain (domainTemplate,domainDir, user, password) </li></ul></ul><ul><ul><li>Open an existing domain template for domain creation - readTemplate (templateFileName) </li></ul></ul><ul><ul><li>writeDomain (domainDirName) </li></ul></ul><ul><ul><li>closeTemplate () </li></ul></ul><ul><li>Updating an Existing Domain (Offline) </li></ul><ul><ul><li>Open an existing domain for update - readDomain (domainDirName) </li></ul></ul><ul><ul><li>Extend the current domain - addTemplate (templateFileName) </li></ul></ul><ul><ul><li>Save the domain - updateDomain () </li></ul></ul>
    19. 19. Sample Code – Create a Domain <ul><li>readTemplate(‘ d:/bea_9.2/weblogic92/common/templates/domains ') </li></ul><ul><li>// Create Admin server with SSL enabled </li></ul><ul><li>cd('Servers/AdminServer') </li></ul><ul><li>set('ListenAddress','') </li></ul><ul><li>set('ListenPort', 7001) </li></ul><ul><li>//Setting password </li></ul><ul><li>cd('/') </li></ul><ul><li>cd('Security/base_domain/User/weblogic') </li></ul><ul><li>cmo.setPassword('weblogic') </li></ul><ul><li>CONTD.. </li></ul>
    20. 20. Sample Code – Create a Domain <ul><li>//Creating JMS Server </li></ul><ul><li>cd('/') </li></ul><ul><li>create('myJMSServer', 'JMSServer') </li></ul><ul><li>cd('/') </li></ul><ul><li>create('myJmsSystemResource', 'JMSSystemResource') </li></ul><ul><li>cd('JMSSystemResource/myJmsSystemResource/JmsResource/NO_NAME_0') </li></ul><ul><li>//Creating JMS Queue </li></ul><ul><li>myq=create('myQueue','Queue') </li></ul><ul><li>myq.setJNDIName('jms/myqueue') </li></ul><ul><li>myq.setSubDeploymentName('myQueueSubDeployment') </li></ul><ul><li>cd('/') </li></ul><ul><li>cd('JMSSystemResource/myJmsSystemResource') </li></ul><ul><li>create('myQueueSubDeployment', 'SubDeployment') </li></ul><ul><li>CONTD.. </li></ul>
    21. 21. Sample Code – Create a Domain <ul><li>// Creating Datasource </li></ul><ul><li>cd('/') </li></ul><ul><li>create('myDataSource', 'JDBCSystemResource') </li></ul><ul><li>cd('JDBCSystemResource/myDataSource/JdbcResource/myDataSource') </li></ul><ul><li>create('myJdbcDriverParams','JDBCDriverParams') </li></ul><ul><li>cd('JDBCDriverParams/NO_NAME_0') </li></ul><ul><li>set('DriverName','com.pointbase.jdbc.jdbcUniversalDriver') </li></ul><ul><li>set('URL','jdbc:pointbase:server://localhost/demo') </li></ul><ul><li>set('PasswordEncrypted', 'PBPUBLIC') </li></ul><ul><li>set('UseXADataSourceInterface', 'false') </li></ul><ul><li>create('myProps','Properties') </li></ul><ul><li>cd('Properties/NO_NAME_0') </li></ul><ul><li>create('user', 'Property') </li></ul><ul><li>cd('Property/user') </li></ul><ul><li>cmo.setValue('PBPUBLIC') </li></ul><ul><li>CONTD.. </li></ul>
    22. 22. Sample Code – Create a Domain <ul><li>//Creating JDBC Pool </li></ul><ul><li>cd('/JDBCSystemResource/myDataSource/JdbcResource/myDataSource') </li></ul><ul><li>create('myJdbcDataSourceParams','JDBCDataSourceParams') </li></ul><ul><li>cd('JDBCDataSourceParams/NO_NAME_0') </li></ul><ul><li>set('JNDIName', java.lang.String(&quot;myDataSource_jndi&quot;)) </li></ul><ul><li>cd('/JDBCSystemResource/myDataSource/JdbcResource/myDataSource') </li></ul><ul><li>create('myJdbcConnectionPoolParams','JDBCConnectionPoolParams') </li></ul><ul><li>cd('JDBCConnectionPoolParams/NO_NAME_0') </li></ul><ul><li>set('TestTableName','SYSTABLES') </li></ul><ul><li>CONTD.. </li></ul>
    23. 23. Sample Code – Create a Domain <ul><li>//Targetiing JMS and JDBC to AS </li></ul><ul><li>cd('/') </li></ul><ul><li>assign('JMSServer', 'myJMSServer', 'Target', 'AdminServer') </li></ul><ul><li>assign('JMSSystemResource.SubDeployment', 'myJmsSystemResource.myQueueSubDeployment', 'Target', 'myJMSServer') </li></ul><ul><li>assign('JDBCSystemResource', 'myDataSource', 'Target', 'AdminServer') </li></ul><ul><li>//Giving a name to the Domain </li></ul><ul><li>setOption('OverwriteDomain', 'true') </li></ul><ul><li>writeDomain('C:/bea_9.2.2/user_projects/domains/Bhavya') </li></ul><ul><li>closeTemplate() </li></ul><ul><li>exit() </li></ul>
    24. 24. Feature – Control Servers & Server Lifecycle <ul><li>Starting an Administration Server Without Node Manager </li></ul><ul><li>Server name > Domain name > URL > username > password > path of the domain directory > block user interaction while server startup > server log > system properties > jvm arguments </li></ul>wls:offline/> startServer('AdminServer','mydomain','t3://localhost:7001', 'weblogic','weblogic','c:/bea/user_projects/domains/mydomain','true’)
    25. 25. Feature – Control Servers & Server Lifecycle <ul><li>Using Node Manager to start the Admin Server helps starting, stopping and restarting it if it fails </li></ul><ul><li>Starting Managed Servers and Clusters With Node Manager </li></ul><ul><li>startNodeManager(verbose='true', </li></ul><ul><li>NodeManagerHome='D:/bea10.2/wlserver_10.0/common/nodemanager', ListenPort=‘5556') </li></ul><ul><li>Connect(‘weblogic’,’weblogic’,’t3://localhost:7001’) </li></ul><ul><li>wls:/mydomain/serverConfig>start('managed1','Server','t3://localhost:7701') </li></ul>
    26. 26. Feature – Control Servers & Server Lifecycle <ul><li>Using WLST and Node Manager to Manage Servers </li></ul><ul><ul><li>Start Node Manager </li></ul></ul><ul><ul><li>Connect WLST to Node Manager </li></ul></ul><ul><ul><li>Start an Administration Server </li></ul></ul><ul><ul><li>Monitor the status of the server you started by entering the nmServerStatus command. </li></ul></ul><ul><ul><li>Stop the server </li></ul></ul>nmConnect('weblogic', 'weblogic', 'localhost', '5556','mydomain', 'c:/bea/user_projects/domains/mydomain') <ul><ul><li>wls:/nm/mydomain>nmStart('serverName') </li></ul></ul><ul><ul><li>wls:/nm/mydomain>nmServerStatus('serverName') </li></ul></ul><ul><ul><li>wls:/nm/mydomain>nmKill('serverName') </li></ul></ul>
    27. 27. Feature – Deploying Applications <ul><li>WLST deploys application to a WebLogic Server instance similar to weblogic.Deployer utility. The deploy command returns a WLSTProgress object that can be used to check the status. </li></ul><ul><ul><li>Deploy </li></ul></ul><ul><li>application name </li></ul><ul><li>path of the ear or war file </li></ul><ul><li>target </li></ul><ul><li>plan path (deployment plan file ) </li></ul><ul><li>options </li></ul>wls:/mydomain/serverConfig/Servers> deploy('demoApp', 'c:/myapps/demos/app/demoApp.ear', targets='myserver', planPath='c:/myapps/demos/app/plan/plan.xml', timeout=120000)
    28. 28. Feature – Deploying Applications <ul><ul><li>Redeploy </li></ul></ul><ul><li>application name </li></ul><ul><li>path of the ear or war file </li></ul><ul><li>returns progress state (completed) </li></ul><ul><ul><li>Undeploy: </li></ul></ul>wls:/mydomain/serverConfig> progress = redeploy('myApp' 'c:/myapps/plan.xml') wls:/mydomain/serverConfig/Servers> progress.getState() wls:/mydomain/serverConfig> undeploy('businessApp', timeout=60000)
    29. 29. Demo 1 – Check the status of WLS Instances <ul><ul><li>connect('weblogic','weblogic','t3://localhost:7010'); </li></ul></ul><ul><ul><li>print 'Status',state('AdminServer','Server'); </li></ul></ul><ul><ul><li>print 'Status',state('MS1','Server'); </li></ul></ul><ul><ul><li>print 'Status',state('MS2','Server'); </li></ul></ul><ul><ul><li>print 'Status',state('MS3','Server'); </li></ul></ul><ul><ul><li>print 'Status',state('MS4','Server'); </li></ul></ul><ul><ul><li>disconnect(); </li></ul></ul>
    30. 30. Demo 2 – Deploy a jar file on Managed Server <ul><ul><li>appPath='D:/WLST/netuix_common.jar' </li></ul></ul><ul><ul><li>appName='netuix_common.jar' </li></ul></ul><ul><ul><li>targets='MS1' </li></ul></ul><ul><ul><li>username=’weblogic' </li></ul></ul><ul><ul><li>password=’weblogic' </li></ul></ul><ul><ul><li>serverURL='t3://localhost:7010' </li></ul></ul><ul><ul><li>connect(username,password,serverURL) </li></ul></ul><ul><ul><li>edit() </li></ul></ul><ul><ul><li>startEdit() </li></ul></ul><ul><ul><li>deploy(appName=appName, path=appPath, targets=targets) </li></ul></ul><ul><ul><li>save() </li></ul></ul><ul><ul><li>activate() </li></ul></ul>
    31. 31. Demo 3 – Edit the attribute of Running Server <ul><ul><li>connect(‘weblogic’,’weblogic’,’t3://localhost:7010’) </li></ul></ul><ul><ul><li>ls() </li></ul></ul><ul><ul><li>cd(’Servers’) </li></ul></ul><ul><ul><li>cd(‘MS1’) </li></ul></ul><ul><ul><li>ls() </li></ul></ul><ul><ul><li>edit() </li></ul></ul><ul><ul><li>startEdit() </li></ul></ul><ul><ul><li>set (‘ IdlePeriodsUntilTimeout ‘,10) </li></ul></ul><ul><ul><li>save() </li></ul></ul><ul><ul><li>activate() </li></ul></ul>
    32. 32. Demo 4 – Changing the Current Management Object <ul><ul><li>connect('username','password') </li></ul></ul><ul><ul><li>cmo </li></ul></ul><ul><ul><li>cd('Servers') </li></ul></ul><ul><ul><li>cmo </li></ul></ul><ul><ul><li>cd('myserver') </li></ul></ul><ul><ul><li>cmo </li></ul></ul>
    33. 33. Demo 5 – Navigating and Displaying Configuration MBeans <ul><ul><li>connect('username','password') </li></ul></ul><ul><ul><li>ls() </li></ul></ul><ul><ul><li>cd('Servers') </li></ul></ul><ul><ul><li>ls() </li></ul></ul><ul><ul><li>cd('myserver') </li></ul></ul><ul><ul><li>ls() </li></ul></ul>
    34. 34. Demo 6 – Fire GC for a specific server <ul><ul><li>cd('/ServerRuntimes/'+sname+'/JVMRuntime/'+sname) </li></ul></ul><ul><ul><li>cmo.runGC() </li></ul></ul>
    35. 35. Demo 7 – Edit the DataSource database password <ul><ul><li>connect() // connect to the domain </li></ul></ul><ul><ul><li>cd(‘Servers/MS1’) </li></ul></ul><ul><ul><li>edit() </li></ul></ul><ul><ul><li>cd(‘JDBCSystemResources’) </li></ul></ul><ul><ul><li>cd(‘samplesDataSource’) </li></ul></ul><ul><ul><li>cd(‘JDBCResource’) </li></ul></ul><ul><ul><li>cd(‘samplesDataSource’) </li></ul></ul><ul><ul><li>cd(‘JDBCDriverParams’) </li></ul></ul><ul><ul><li>cd(‘samplesDataSource’) </li></ul></ul><ul><ul><li>set('PasswordEncrypted', 'PBPUBLIC') </li></ul></ul><ul><ul><li>Save() </li></ul></ul><ul><ul><li>Activate() </li></ul></ul>
    36. 36. Demo 8 – Script to monitor threads <ul><ul><li>connect() // connect to the domain domainRuntime() cd('ServerRuntimes/AdminServer/ThreadPoolRuntime/ </li></ul></ul><ul><ul><li>ThreadPoolRuntime') ls() // it will list all the thread pool information </li></ul></ul>
    37. 37. Demo 9 – Script to get the count of stuck threads <ul><ul><li>Retrieivng the StuckThreadCount using WLST. </li></ul></ul><ul><ul><li>Can be retrieved using WLST from the path </li></ul></ul><ul><ul><li>connect() // connect to the domain domainRuntime() cd(' ServerRuntimes/SERVERNAME/WorkManagerRuntimes/ </li></ul></ul><ul><ul><li>DataRetirementWorkManager/ StuckThreadCount ') </li></ul></ul>
    38. 38. Demo 10 – Start the server <ul><ul><li>startServer('AdminServer', 'mydomain', </li></ul></ul><ul><ul><li>username='weblogic', password='weblogic', block='true', timeout=300000, </li></ul></ul><ul><ul><li>serverLog='./test-right.log', </li></ul></ul><ul><ul><li>systemProperties='weblogic.ListenPort=14521', </li></ul></ul><ul><ul><li>jvmArgs='-Xms256m -Xmx512m -XX:MaxPermSize=128m') </li></ul></ul><ul><ul><li>To summarize, </li></ul></ul><ul><ul><li>You should specify url in the startServer command </li></ul></ul><ul><ul><li>OR </li></ul></ul><ul><ul><li>You should specify weblogic.ListenPort in the systemProperties of the startServer() command. </li></ul></ul>
    39. 39. Check server state and start if not running <ul><li># Connect WLST to the running server </li></ul><ul><li>connect('weblogic','weblogic','t3://localhost:7010'); </li></ul><ul><li>#The following command willl print the state of the servers </li></ul><ul><li>print 'Status',state('AdminServer','Server'); </li></ul><ul><li>serverRuntime() </li></ul><ul><li>a = get('State') </li></ul><ul><li>if a == 'RUNNING' </li></ul><ul><li>print 'Status',state('MS1','Server'); </li></ul><ul><li>print 'Status',state('MS2','Server'); </li></ul><ul><li>print 'Status',state('MS3','Server'); </li></ul><ul><li>print 'Status',state('MS4','Server'); </li></ul><ul><li>startServer('AdminServer','mydomain','t3://localhost:7001', </li></ul><ul><li>'weblogic','weblogic','c:/bea/user_projects/domains/mydomain','true’) </li></ul><ul><li># Disconnect the WLST from Adminserver </li></ul><ul><li>disconnect(); </li></ul>
    40. 40. <ul><li># Node Manager needs to be running to run this script. </li></ul><ul><li>connect('weblogic','weblogic','t3://localhost:7010') </li></ul><ul><li>domainRuntime() </li></ul><ul><li>slrBean = cmo.lookupServerLifeCycleRuntime('MS1') </li></ul><ul><li>status = slrBean.getState() </li></ul><ul><li>print 'Status of Managed Server is '+status </li></ul><ul><li>if status != &quot;RUNNING&quot;: </li></ul><ul><li>start('MS1', block=&quot;true&quot;) </li></ul><ul><li>print 'Starting server MS1' </li></ul>
    41. 41. <ul><li>nmConnect('weblogic', 'weblogic', 'localhost','5556','WLST','D:/bea10.2/user_projects/domains/WLST') </li></ul><ul><li>a = nmServerStatus('AdminServer') </li></ul><ul><li>print a </li></ul><ul><li>b = 1 </li></ul><ul><li>while b == 1: </li></ul><ul><li>if a == &quot;RUNNING&quot;: </li></ul><ul><li>b = 0 </li></ul><ul><li>connect('weblogic','weblogic','t3://localhost:7010') </li></ul><ul><li>print 'Successfully connected' </li></ul><ul><li>else: </li></ul><ul><li>a = nmServerStatus('AdminServer') </li></ul><ul><li>print 'Starting Admin Server' </li></ul>
    42. 42. Reorder Authentication Providers WLST Script <ul><li>edit() startEdit(-1,-1,'false') </li></ul><ul><li>cd('/SecurityConfiguration/WLST_Machine/Realms/myrealm') </li></ul><ul><li>set('AuthenticationProviders',jarray.array([ObjectName('Security:Name=myrealmDefaultIdentityAsserter'), ObjectName('Security:Name=myrealmDefaultAuthenticator')], ObjectName)) </li></ul><ul><li>save() activate() </li></ul><ul><li>cd('/Security/ domainname /User/ username ') cmo.setPassword(' password ') </li></ul>
    43. 43. Edit WLS password <ul><li>Connect(‘weblogic’,’weblogic’,’t3://loclahost:7001’) </li></ul><ul><li>from weblogic.management.security.authentication import UserPasswordEditorMBean </li></ul><ul><li>print &quot;Changing password ...&quot; </li></ul><ul><li>atnr=cmo.getSecurityConfiguration().getDefaultRealm().lookupAuthenticationProvider(&quot;DefaultAuthenticator&quot;) </li></ul><ul><li>atnr.changeUserPassword('weblogic','weblogic','weblogic123') </li></ul>
    44. 44. Set the server mode to production while creating a domain <ul><li># read the domain template </li></ul><ul><li>readTemplate(&quot;D:/bea10.2/wlserver_10.0/common/templates/domains/wls.jar&quot;) </li></ul><ul><li>setOption(‘ServerStartMode’, ‘prod’) </li></ul><ul><li># create a domain </li></ul><ul><li>writeDomain('D:/bea10.2/user_projects/domains/basicWLSDomain') </li></ul><ul><li># close the template </li></ul><ul><li>closeTemplate() </li></ul>
    45. 45. For More Information … <ul><li>Documentation (for WLS 10.0) at: </li></ul><ul><ul><li>http://e-docs.bea.com/wls/docs90/config_scripting/using_WLST.html </li></ul></ul><ul><ul><li>UseFul Links </li></ul></ul><ul><ul><li>http://www.jython.org – download Jython </li></ul></ul><ul><ul><li>FQA </li></ul></ul><ul><ul><li>http://edocs.bea.com/wls/docs92/config_scripting/wlst_faq.html </li></ul></ul>
    46. 46. Thank You Quest Time
    1. ¿Le ha llamado la atención una diapositiva en particular?

      Recortar diapositivas es una manera útil de recopilar información importante para consultarla más tarde.

    ×