Maarten Smeets, 06-12-2015
WebLogic Scripting Tool made Cool!
Introduction
• About AMIS
– Located in the Netherlands
– Oracle Award winning partner
• Maarten Smeets
– Senior Oracle Integration Consultant
– Experience with Oracle SOA Suite since 2007
– Well certified (SOA, BPM, Java, SQL,
PL/SQL among others)
– Author of 100+ blog articles (http://javaoraclesoa.blogspot.com)
– Working @ AMIS since 2014
@MaartenSmeetsNL
https://nl.linkedin.com/in/smeetsm
Agenda
• Introduction
• Using Java within WLST
• Using WLST as Jython module
• A look into the future
• Summary
Agenda
• Introduction
• Using Java within WLST
• Using WLST as Jython module
• A look into the future
• Summary
Introduction
WebLogic Scripting Tool
http://www.oracle.com/technetwork/middleware/weblogic/overview/weblogic-server-12-1-3-datasheet-2227036.pdf
Introduction
Based on popular languages
• WLST is based on Jython. Jython is an implementation of the Python
language for the Java platform
Python ranks as 5th most
popular programming
languageJava ranks as most popular
programming language
TIOBE index 2015
Introduction
3 interaction modes
Interactive Script Embedded
Introduction
Mbean trees
• domainConfig
– configuration hierarchy of the entire domain; represents the configuration MBeans in
RuntimeMBeanServer
– read only
• serverConfig
– configuration hierarchy (configuration MBeans) of the server your are connected to
– read only
• domainRuntime
– hierarchy of runtime MBeans for the entire domain
– read only
• serverRuntime
– hierarchy of runtime MBeans for the server you are connected to
– read only
• edit
– writable domain configuration with pending changes; represents the configuration MBeans in the
EditMBeanServer
• jndi
– read-only JNDI tree for the server you are connected to
• custom
– list of custom MBeans
– can be hierarchical/grouped if MBeans use namespaces appropriately
http://www.slideshare.net/jambay/weblogic-scripting-tool-overview
9
Introduction
What can you do with WLST?
Configuration DeploymentManagement Monitoring
Introduction
WLST Configuration
http://stackoverflow.com/questions/18105396/wlst-command-to-update-jdbc-datasource-url
Introduction
WLST Management
http://wlstbyexamples.blogspot.nl/2009/10/dynamic-domain-creation-with-wlst.html#.VmGRnnYvdD8
Introduction
WLST Deployment
Introduction
WLST Monitoring
http://wlstbyexamples.blogspot.nl/2010/02/server-state-using-wlst.html#.VmGYinYvdD8
Agenda
• Introduction
• Using Java within WLST
• Using WLST as Jython module
• A look into the future
• Summary
Using Java within WLST
Why?
• Extend WLST with Java API’s
– Unleash the power of Java API’s on your WLST scripts!
• Rewrite Java as WLST
– WLST can easily be executed by operations on an application server
Using Java with WLST
Some differences
Import ArrayMethodInstance
Using Java with WLST
Imports
Java WLST
import java.util.Hashtable; from java.util import Hashtable
Using Java with WLST
Creating instances
Java WLST
Hashtable jndiProps = new Hashtable(); jndiProps = Hashtable()
Types are determined by inference
Using Java with WLST
Methods
Java WLST
private String
getDNToUndeploy(CompositeData[]
compositeData) throws Exception
def getDNToUndeploy(compositeData):
Python has no true private methods
Exceptions are determined by inference
Using Java with WLST
Arrays
Java WLST
int[] intArray = { 1, 2, 3};
from jarray import array
intArray = array ([1, 2, 3],’i’)
Java primitives arrays can be created
in Jython with the jarray module
Using Java with WLST
Example: Java
http://javaoraclesoa.blogspot.co.uk/2015/05/unleash-power-of-java-apis-on-your-wlst.html
Using Java with WLST
Example: WLST
Agenda
• Introduction
• Using Java with WLST
• Using WLST as Jython module
• A look into the future
• Summary
Using WLST as Jython module
Why?
• WLST uses Jython 2.2.1 (2007)
• Current version of Jython is 2.7 (2015)
• Jython 2.7 has many nice things, for example;
– Package management: pip install logging
– XML API’s: ElementTree
– Easy multithreading: multiprocessing
– Easy argument parsing: argparse
Using WLST as Jython module
Argument parsing in WLST
import getopt
url = None
user = None
password = None
opts, args =
getopt.getopt(sys.argv[1:], "e:u:p:")
for opt, arg in opts:
print opt, arg
if opt in "-e":
env = arg
if opt in "-p":
password = arg
if opt in "-u":
user = arg
print "URL: "+url
print "Username: "+username
print "Password: "+password
import sys;
print "URL: "+sys.argv[1]
print "Username: "+sys.argv[2]
print "Password: "+sys.argv[3]
Manual argument checking
and processing!
Using WLST as Jython module
Argument parsing in Jython 2.7
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("username", type=string, help="username")
parser.add_argument("password", type=string, help="password")
parser.add_argument("url", type=string, help="url")
args = parser.parse_args()
print "URL: "+args.url
print "Username: "+args.username
print "Password: "+args.password
Type checking
Optional/required arguments
Help generation
Minimal coding
Using WLST as Jython module
Module installation
WLST (Jython 2.2.1) Jython 2.7
Find and download a
Jython 2.2.1 compatible module
Copy the module to
WL_HOME/common/wlst/modules
pip install <module name>
Using WLST as Jython module
How?
• You need the classpath
• You need the Jython module path
• You need a WLST Jython module
Using WLST as Jython module
How?
• You need the classpath
• You need the Jython module path
• You need a WLST Jython module
Using WLST as Jython module
Classpath
• Start wlst.sh / wlst.cmd
– import os
– print os.environ[‘CLASSPATH’]
• Add the wlfullclient.jar and <WLS_HOME>/oracle_common/modules/*
• Done 
Using WLST as Jython module
How?
• You need the classpath
• You need the Jython module path
• You need a WLST Jython module
Using WLST as Jython module
Jython module path
• Start wlst.sh or wlst.cmd
– print sys.path
• Done 
Using WLST as Jython module
How?
• You need the classpath
• You need the Jython module path
• You need a WLST Jython module
Using WLST as Jython module
• Start wlst.sh or wlst.cmd
– writeIniFile("wl.py")
• Replace ‘origPrompt = sys.ps1’ with ‘origPrompt = ">>>“’
• Done 
Using WLST as Jython module
• Create a startjython.sh script to set the CLASSPATH and JYTHONPATH
• Ready to roll!
import wl
wl.connect("weblogic","Welcome01", "t3://localhost:7101")
mbServers= wl.getMBean("Servers")
servers= mbServers.getServers()
for server in servers :
print( "Server Name: " + server.getName() )
print( "Done." )
Agenda
• Introduction
• Using Java with WLST
• Using WLST as Jython module
• A look into the future
• Summary
A look into the future
Cloud Application Foundation
A look into the future
New WLST features in 12c
• WLST 12c introduces Jline integration
– use up and down arrows to browse command history
• WebLogic Server 12c provides a Maven plugin to allow execution of
WLST scripts in for example Continuous Delivery pipelines
– https://docs.oracle.com/cd/E24329_01/web.1211/e24368/maven.htm#WLPRG700
• SOA Suite 12.2.1 instance patching only supported with WLST (not Ant or
Maven)
• WLST 12.2.1 offline mode does not support partitions (yet?) . WLST
12.2.1 online does support partitions (multitenancy)
A look into the future
However…
• wlfullclient.jar is deprecated since 12.2.1 (related to multitenancy?)
– http://docs.oracle.com/middleware/1221/wls/NOTES/whatsnew.htm#NOTES155
• RESTful Management Services replacing WLST in the cloud?
– http://docs.oracle.com/middleware/1221/wls/NOTES/whatsnew.htm#NOTES353
• WLST has not seen a new Jython version since 11g
Agenda
• Introduction
• Using Java with WLST
• Using WLST as Jython module
• A look into the future
• Summary
Summary
• WebLogic Scripting Tool is based on popular programming languages
• WebLogic Scripting Tool has many uses
• WebLogic Scripting Tool is very flexible
– can be extended with Java API’s
– can be used as Jython module
• WebLogic Server is changing because of Oracle Cloud requirements
Questions
@MaartenSmeetsNL
https://nl.linkedin.com/in/smeetsm Download the presentation at http://bit.ly/1jH5ywP
WebLogic Scripting Tool made Cool!

More Related Content

PPT
Oracle WebLogic Server Basic Concepts
PPTX
PPTX
OpenStack Keystone
PDF
Polyglot Applications with GraalVM
PDF
IBM MQ - High Availability and Disaster Recovery
PPTX
Building IAM for OpenStack
PDF
IBM WebSphere application server
Oracle WebLogic Server Basic Concepts
OpenStack Keystone
Polyglot Applications with GraalVM
IBM MQ - High Availability and Disaster Recovery
Building IAM for OpenStack
IBM WebSphere application server

What's hot (20)

PDF
Logs/Metrics Gathering With OpenShift EFK Stack
PPTX
Weblogic application server
PPT
Weblogic Server Overview Weblogic Scripting Tool
PDF
PDF
Administration Linux ( PDFDrive ).pdf
PDF
Connecting Connect with Spring Boot
PDF
Docker Tutorial.pdf
PDF
Performance Tuning Oracle Weblogic Server 12c
PDF
Alphorm.com Formation Active Directory 2019 : Optimisation et Sécurisation av...
ODP
Introduction to Ansible
PDF
DataPower Security Hardening
PDF
Ansible 101
PDF
Ansible
PDF
Keystone at openstack multi sites
PDF
Ansible - Introduction
PPT
Nagios
PPTX
Ansible presentation
PDF
IT エンジニアのための 流し読み Windows 10 - 入門!Windows Server Update Services (WSUS)
PDF
[OpenInfra Days Korea 2018] (Track 4) - Grafana를 이용한 OpenStack 클라우드 성능 모니터링
PDF
OSB130 Patch Management Best Practices
Logs/Metrics Gathering With OpenShift EFK Stack
Weblogic application server
Weblogic Server Overview Weblogic Scripting Tool
Administration Linux ( PDFDrive ).pdf
Connecting Connect with Spring Boot
Docker Tutorial.pdf
Performance Tuning Oracle Weblogic Server 12c
Alphorm.com Formation Active Directory 2019 : Optimisation et Sécurisation av...
Introduction to Ansible
DataPower Security Hardening
Ansible 101
Ansible
Keystone at openstack multi sites
Ansible - Introduction
Nagios
Ansible presentation
IT エンジニアのための 流し読み Windows 10 - 入門!Windows Server Update Services (WSUS)
[OpenInfra Days Korea 2018] (Track 4) - Grafana를 이용한 OpenStack 클라우드 성능 모니터링
OSB130 Patch Management Best Practices
Ad

Viewers also liked (18)

PDF
Weblogic configuration
PDF
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...
PPT
WebLogic Scripting Tool Overview
PDF
Easy oracle & weblogic provisioning and deployment
PPTX
Oracle WebLogic 12.2.1.1 Kurulum, Domain Oluşturma, Upgrade Notları
PPTX
Dynamicly Scale Weblogic in the private Cloud clusters
PDF
REST mit ADF
PPTX
WebLogic authentication debugging
PDF
Learn Oracle WebLogic Server 12c Administration
PDF
What should I do now?! JCS for WebLogic Admins
PPTX
AMIS Beyond the Horizon - High density deployments using weblogic multitenancy
PPTX
Creativity into Action
PPT
Cuoc song tuoi dep
PPTX
Tik bab 3 kelas 9
PDF
Technology Meet Humanity - Opus Interactive
DOCX
Gemma Flannery 2015 CV September
PDF
Sunquchakuqkunas (INDIVIDUAL)
PPTX
Weblogic configuration
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...
WebLogic Scripting Tool Overview
Easy oracle & weblogic provisioning and deployment
Oracle WebLogic 12.2.1.1 Kurulum, Domain Oluşturma, Upgrade Notları
Dynamicly Scale Weblogic in the private Cloud clusters
REST mit ADF
WebLogic authentication debugging
Learn Oracle WebLogic Server 12c Administration
What should I do now?! JCS for WebLogic Admins
AMIS Beyond the Horizon - High density deployments using weblogic multitenancy
Creativity into Action
Cuoc song tuoi dep
Tik bab 3 kelas 9
Technology Meet Humanity - Opus Interactive
Gemma Flannery 2015 CV September
Sunquchakuqkunas (INDIVIDUAL)
Ad

Similar to WebLogic Scripting Tool made Cool! (20)

DOCX
PPTX
Building WebLogic Domains With WLST
PPT
Weblogic server-overview-weblogic-scripting-tool0-1228252752844434-9
PDF
12 Things About WebLogic 12.1.3 #oow2014 #otnla15
PDF
Weblogic scripting LVOUG meetup #11
PDF
12 Things about Oracle WebLogic Server 12c
PDF
Enterprise Java Hosting in a Cloud Environment
PPTX
Weblogic 101 for dba
PDF
Changes in WebLogic 12.1.3 Every Administrator Must Know
PDF
Changes in weblogic12c_every_administrator_must_know-140812141929
PPT
What's New in WebLogic 12.1.3 and Beyond
PPT
Ugf9796 weblogic for ebs and obiee
PDF
JavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško Vukmanović
PDF
Oracle WebLogic: Feature Timeline from WLS9 to WLS 12c
PPTX
Continuous Integration Fundamentals: Maven - OFM Canberra July 2014
PPT
Oracle Weblogic for EBS and obiee (R12.2)
PPTX
Amis conference soa deployment. the dirty tricks using bamboo, nexus and xl ...
PDF
Wp100963 jython scripting with wsadmin tutorial
PPT
WebLogic 12c - OMF Canberra June 2014
ODP
Large Scale Migration from WebLogic to JBoss
Building WebLogic Domains With WLST
Weblogic server-overview-weblogic-scripting-tool0-1228252752844434-9
12 Things About WebLogic 12.1.3 #oow2014 #otnla15
Weblogic scripting LVOUG meetup #11
12 Things about Oracle WebLogic Server 12c
Enterprise Java Hosting in a Cloud Environment
Weblogic 101 for dba
Changes in WebLogic 12.1.3 Every Administrator Must Know
Changes in weblogic12c_every_administrator_must_know-140812141929
What's New in WebLogic 12.1.3 and Beyond
Ugf9796 weblogic for ebs and obiee
JavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško Vukmanović
Oracle WebLogic: Feature Timeline from WLS9 to WLS 12c
Continuous Integration Fundamentals: Maven - OFM Canberra July 2014
Oracle Weblogic for EBS and obiee (R12.2)
Amis conference soa deployment. the dirty tricks using bamboo, nexus and xl ...
Wp100963 jython scripting with wsadmin tutorial
WebLogic 12c - OMF Canberra June 2014
Large Scale Migration from WebLogic to JBoss

More from Maarten Smeets (15)

PPTX
Google jib: Building Java containers without Docker
PPTX
Introduction to Anchore Engine
PPTX
R2DBC Reactive Relational Database Connectivity
PPTX
Performance Issue? Machine Learning to the rescue!
PPTX
Performance of Microservice Frameworks on different JVMs
PPTX
Performance of Microservice frameworks on different JVMs
PPTX
VirtualBox networking explained
PPTX
Microservices on Application Container Cloud Service
PPTX
WebLogic Stability; Detect and Analyse Stuck Threads
PPTX
Introduction to Redis
PPTX
All you need to know about transport layer security
PPTX
Webservice security considerations and measures
PPTX
Machine learning with R
PPTX
Oracle SOA Suite 12.2.1 new features
PPTX
How to build a cloud adapter
Google jib: Building Java containers without Docker
Introduction to Anchore Engine
R2DBC Reactive Relational Database Connectivity
Performance Issue? Machine Learning to the rescue!
Performance of Microservice Frameworks on different JVMs
Performance of Microservice frameworks on different JVMs
VirtualBox networking explained
Microservices on Application Container Cloud Service
WebLogic Stability; Detect and Analyse Stuck Threads
Introduction to Redis
All you need to know about transport layer security
Webservice security considerations and measures
Machine learning with R
Oracle SOA Suite 12.2.1 new features
How to build a cloud adapter

Recently uploaded (20)

PDF
Domain-specific knowledge and context in large language models: challenges, c...
PPTX
From Curiosity to ROI — Cost-Benefit Analysis of Agentic Automation [3/6]
PDF
“Introduction to Designing with AI Agents,” a Presentation from Amazon Web Se...
PDF
ELLIE29.pdfWETWETAWTAWETAETAETERTRTERTER
PPTX
CRM(Customer Relationship Managmnet) Presentation
PPTX
Report in SIP_Distance_Learning_Technology_Impact.pptx
PDF
Addressing the challenges of harmonizing law and artificial intelligence tech...
PDF
【AI論文解説】高速・高品質な生成を実現するFlow Map Models(Part 1~3)
PDF
CCUS-as-the-Missing-Link-to-Net-Zero_AksCurious.pdf
PDF
Gestión Unificada de los Riegos Externos
PDF
Examining Bias in AI Generated News Content.pdf
PDF
Revolutionizing recommendations a survey: a comprehensive exploration of mode...
PDF
Secure Java Applications against Quantum Threats
PPTX
Rise of the Digital Control Grid Zeee Media and Hope and Tivon FTWProject.com
PDF
Applying Agentic AI in Enterprise Automation
PPTX
maintenance powerrpoint for adaprive and preventive
PDF
TrustArc Webinar - Data Minimization in Practice_ Reducing Risk, Enhancing Co...
PPTX
AQUEEL MUSHTAQUE FAKIH COMPUTER CENTER .
PDF
Ebook - The Future of AI A Comprehensive Guide.pdf
PDF
ment.tech-How to Develop an AI Agent Healthcare App like Sully AI (1).pdf
Domain-specific knowledge and context in large language models: challenges, c...
From Curiosity to ROI — Cost-Benefit Analysis of Agentic Automation [3/6]
“Introduction to Designing with AI Agents,” a Presentation from Amazon Web Se...
ELLIE29.pdfWETWETAWTAWETAETAETERTRTERTER
CRM(Customer Relationship Managmnet) Presentation
Report in SIP_Distance_Learning_Technology_Impact.pptx
Addressing the challenges of harmonizing law and artificial intelligence tech...
【AI論文解説】高速・高品質な生成を実現するFlow Map Models(Part 1~3)
CCUS-as-the-Missing-Link-to-Net-Zero_AksCurious.pdf
Gestión Unificada de los Riegos Externos
Examining Bias in AI Generated News Content.pdf
Revolutionizing recommendations a survey: a comprehensive exploration of mode...
Secure Java Applications against Quantum Threats
Rise of the Digital Control Grid Zeee Media and Hope and Tivon FTWProject.com
Applying Agentic AI in Enterprise Automation
maintenance powerrpoint for adaprive and preventive
TrustArc Webinar - Data Minimization in Practice_ Reducing Risk, Enhancing Co...
AQUEEL MUSHTAQUE FAKIH COMPUTER CENTER .
Ebook - The Future of AI A Comprehensive Guide.pdf
ment.tech-How to Develop an AI Agent Healthcare App like Sully AI (1).pdf

WebLogic Scripting Tool made Cool!

  • 1. Maarten Smeets, 06-12-2015 WebLogic Scripting Tool made Cool!
  • 2. Introduction • About AMIS – Located in the Netherlands – Oracle Award winning partner • Maarten Smeets – Senior Oracle Integration Consultant – Experience with Oracle SOA Suite since 2007 – Well certified (SOA, BPM, Java, SQL, PL/SQL among others) – Author of 100+ blog articles (http://javaoraclesoa.blogspot.com) – Working @ AMIS since 2014 @MaartenSmeetsNL https://nl.linkedin.com/in/smeetsm
  • 3. Agenda • Introduction • Using Java within WLST • Using WLST as Jython module • A look into the future • Summary
  • 4. Agenda • Introduction • Using Java within WLST • Using WLST as Jython module • A look into the future • Summary
  • 6. Introduction Based on popular languages • WLST is based on Jython. Jython is an implementation of the Python language for the Java platform Python ranks as 5th most popular programming languageJava ranks as most popular programming language TIOBE index 2015
  • 8. Introduction Mbean trees • domainConfig – configuration hierarchy of the entire domain; represents the configuration MBeans in RuntimeMBeanServer – read only • serverConfig – configuration hierarchy (configuration MBeans) of the server your are connected to – read only • domainRuntime – hierarchy of runtime MBeans for the entire domain – read only • serverRuntime – hierarchy of runtime MBeans for the server you are connected to – read only • edit – writable domain configuration with pending changes; represents the configuration MBeans in the EditMBeanServer • jndi – read-only JNDI tree for the server you are connected to • custom – list of custom MBeans – can be hierarchical/grouped if MBeans use namespaces appropriately http://www.slideshare.net/jambay/weblogic-scripting-tool-overview
  • 9. 9 Introduction What can you do with WLST? Configuration DeploymentManagement Monitoring
  • 14. Agenda • Introduction • Using Java within WLST • Using WLST as Jython module • A look into the future • Summary
  • 15. Using Java within WLST Why? • Extend WLST with Java API’s – Unleash the power of Java API’s on your WLST scripts! • Rewrite Java as WLST – WLST can easily be executed by operations on an application server
  • 16. Using Java with WLST Some differences Import ArrayMethodInstance
  • 17. Using Java with WLST Imports Java WLST import java.util.Hashtable; from java.util import Hashtable
  • 18. Using Java with WLST Creating instances Java WLST Hashtable jndiProps = new Hashtable(); jndiProps = Hashtable() Types are determined by inference
  • 19. Using Java with WLST Methods Java WLST private String getDNToUndeploy(CompositeData[] compositeData) throws Exception def getDNToUndeploy(compositeData): Python has no true private methods Exceptions are determined by inference
  • 20. Using Java with WLST Arrays Java WLST int[] intArray = { 1, 2, 3}; from jarray import array intArray = array ([1, 2, 3],’i’) Java primitives arrays can be created in Jython with the jarray module
  • 21. Using Java with WLST Example: Java http://javaoraclesoa.blogspot.co.uk/2015/05/unleash-power-of-java-apis-on-your-wlst.html
  • 22. Using Java with WLST Example: WLST
  • 23. Agenda • Introduction • Using Java with WLST • Using WLST as Jython module • A look into the future • Summary
  • 24. Using WLST as Jython module Why? • WLST uses Jython 2.2.1 (2007) • Current version of Jython is 2.7 (2015) • Jython 2.7 has many nice things, for example; – Package management: pip install logging – XML API’s: ElementTree – Easy multithreading: multiprocessing – Easy argument parsing: argparse
  • 25. Using WLST as Jython module Argument parsing in WLST import getopt url = None user = None password = None opts, args = getopt.getopt(sys.argv[1:], "e:u:p:") for opt, arg in opts: print opt, arg if opt in "-e": env = arg if opt in "-p": password = arg if opt in "-u": user = arg print "URL: "+url print "Username: "+username print "Password: "+password import sys; print "URL: "+sys.argv[1] print "Username: "+sys.argv[2] print "Password: "+sys.argv[3] Manual argument checking and processing!
  • 26. Using WLST as Jython module Argument parsing in Jython 2.7 import argparse parser = argparse.ArgumentParser() parser.add_argument("username", type=string, help="username") parser.add_argument("password", type=string, help="password") parser.add_argument("url", type=string, help="url") args = parser.parse_args() print "URL: "+args.url print "Username: "+args.username print "Password: "+args.password Type checking Optional/required arguments Help generation Minimal coding
  • 27. Using WLST as Jython module Module installation WLST (Jython 2.2.1) Jython 2.7 Find and download a Jython 2.2.1 compatible module Copy the module to WL_HOME/common/wlst/modules pip install <module name>
  • 28. Using WLST as Jython module How? • You need the classpath • You need the Jython module path • You need a WLST Jython module
  • 29. Using WLST as Jython module How? • You need the classpath • You need the Jython module path • You need a WLST Jython module
  • 30. Using WLST as Jython module Classpath • Start wlst.sh / wlst.cmd – import os – print os.environ[‘CLASSPATH’] • Add the wlfullclient.jar and <WLS_HOME>/oracle_common/modules/* • Done 
  • 31. Using WLST as Jython module How? • You need the classpath • You need the Jython module path • You need a WLST Jython module
  • 32. Using WLST as Jython module Jython module path • Start wlst.sh or wlst.cmd – print sys.path • Done 
  • 33. Using WLST as Jython module How? • You need the classpath • You need the Jython module path • You need a WLST Jython module
  • 34. Using WLST as Jython module • Start wlst.sh or wlst.cmd – writeIniFile("wl.py") • Replace ‘origPrompt = sys.ps1’ with ‘origPrompt = ">>>“’ • Done 
  • 35. Using WLST as Jython module • Create a startjython.sh script to set the CLASSPATH and JYTHONPATH • Ready to roll! import wl wl.connect("weblogic","Welcome01", "t3://localhost:7101") mbServers= wl.getMBean("Servers") servers= mbServers.getServers() for server in servers : print( "Server Name: " + server.getName() ) print( "Done." )
  • 36. Agenda • Introduction • Using Java with WLST • Using WLST as Jython module • A look into the future • Summary
  • 37. A look into the future Cloud Application Foundation
  • 38. A look into the future New WLST features in 12c • WLST 12c introduces Jline integration – use up and down arrows to browse command history • WebLogic Server 12c provides a Maven plugin to allow execution of WLST scripts in for example Continuous Delivery pipelines – https://docs.oracle.com/cd/E24329_01/web.1211/e24368/maven.htm#WLPRG700 • SOA Suite 12.2.1 instance patching only supported with WLST (not Ant or Maven) • WLST 12.2.1 offline mode does not support partitions (yet?) . WLST 12.2.1 online does support partitions (multitenancy)
  • 39. A look into the future However… • wlfullclient.jar is deprecated since 12.2.1 (related to multitenancy?) – http://docs.oracle.com/middleware/1221/wls/NOTES/whatsnew.htm#NOTES155 • RESTful Management Services replacing WLST in the cloud? – http://docs.oracle.com/middleware/1221/wls/NOTES/whatsnew.htm#NOTES353 • WLST has not seen a new Jython version since 11g
  • 40. Agenda • Introduction • Using Java with WLST • Using WLST as Jython module • A look into the future • Summary
  • 41. Summary • WebLogic Scripting Tool is based on popular programming languages • WebLogic Scripting Tool has many uses • WebLogic Scripting Tool is very flexible – can be extended with Java API’s – can be used as Jython module • WebLogic Server is changing because of Oracle Cloud requirements
  • 42. Questions @MaartenSmeetsNL https://nl.linkedin.com/in/smeetsm Download the presentation at http://bit.ly/1jH5ywP

Editor's Notes

  • #3: Recent awards: Oracle EMEA Middleware Partner of the Year, 3 times Oracle Netherlands Middleware partner of the year. One of the rare moments in the Netherlands when it isn’t raining.
  • #8: In interactive mode, the shell managed a persistent connection to the server A script can be executed setWLSEnv.sh and “java weblogic.WLST <script>” or wlst.sh / wlst.cmd. java –cp wlfullclient.jar weblogic.WLST Embedded mode allows running WLST directly from Java using an Interpreter (weblogic.management.scripting.utils.WLSTInterpreter) http://www.qualogy.com/starting-wlst-scripts/ and http://www.slideshare.net/jambay/weblogic-scripting-tool-overview have useful suggestions
  • #12: Configuration wizard uses this
  • #26: Interactive and script are not called separate interaction patterns for nothing.
  • #31: Notice differences between 11g, 12.1.3 and 12.2.1. 12.2.1 includes a single JAR which contains a manifest file containing the classpath (WLS_HOME\wlserver\modules\features\wlst.wls.classpath)
  • #36: Different from executing directly from WLST!
  • #39: Ant plugin at least in WLS 8.1. Not deprecated