WebLogic JMX for DevOps

F
WebLogic JMX for DevOps
Oracle WebLogic Devcast
Series: JMX for DevOps
Dr. Frank Munz
Oracle Technologist of the Year, Cloud

ORACLE
PRODUCT
LOGO
The following is intended to outline our general product direction. It is intended
for information purposes only, and may not be incorporated into any contract.
It is not a commitment to deliver any material, code, or functionality, and should
not be relied upon in making purchasing decisions. The development, release,
and timing of any features or functionality described for Oracle s products
remains at the sole discretion of Oracle.
Who is this guy?
•  Frank Munz
•  Founded munz & more in 2007
•  12+ years WebLogic Server and
Oracle Fusion Middleware
•  Consulting and High-End Training
•  NEW book:
“WebLogic 12c: Advanced Recipes”
WebLogic 12c: JMX For DevOps

•  Download NetBeans projects and
additional links at the end
•  “JMX for DevOps” ?

Frank Munz / www.munzandmore.com / Oracle DevCast

Slide #5
Agenda
1. Basics
2. Tools / Clients
3. Programming
4. Wrap-up

Frank Munz / www.munzandmore.com / Oracle DevCast

Slide #6
JMX BASICS
JMX
•  Java Management Extensions
(JSR-003)
+ JMX Remote API
(JSR-160)
•  Supported from Java 5
•  JMX 1.2 supported since WLS 9.x
•  WebLogic 12c: RESTful access
Frank Munz / www.munzandmore.com / Oracle DevCast

Slide #8
MBeans
MBeans have attributes, operations, use
notifications
WebLogic MBeans encapsulate
–  Configuration Data
–  Runtime Values
Frank Munz / www.munzandmore.com / Oracle DevCast

Slide #9
MBean Servers
Oracle	
  WebLogic	
  JVM	
  
JMX	
  

JVM	
  Pla<orm	
  MBean	
  Server	
  
Edit	
  MBean	
  Server	
  
RunCme	
  MBean	
  Server	
  

RMI	
  Client	
  JVM	
  

JSR	
  160	
  RMI	
  
Connector	
  

DomainRunCme	
  MBean	
  Server	
  
MBean	
  

hIp	
  

Admin	
  

RESTful	
  
Connector	
  
MBean	
  

MBean	
  

Admin	
  

Frank Munz / www.munzandmore.com / Oracle DevCast
MBean Object Name
domainPart:listOfProperties
com.bea used for
WebLogic MBeans

Name=…,Type=…
[,ParentType1=Parent1Name]
[,ParentType2=Parent2Name] [,…]
[,Location=serverName]

Example: com.bea:Name=AdminServer,Type=Server
Frank Munz / www.munzandmore.com / Oracle DevCast
Admin console, JConsole, WLST, RESTful Management Services, Jolokia.

JMX TOOLS / CLIENTS
WebLogic Admin Console
WebLogic Scripting Tool
WebLogic 12c RESTful Management Services
JConsole
Open Source JMX Shell, RESTful API, Monitoring
Plugins
WebLogic 12c Admin Console
•  Comfortable and feature-rich graphical JMX
client
•  All changes from console are done via JMX
•  Sometimes scripting is preferred
-> WLST scripts can be recorded

Frank Munz / www.munzandmore.com / Oracle DevCast

Slide #18
DEMO
Admin Console
WebLogic Scripting Tool (WLST)
•  Efficient and versatile. It can replace:
-  Configuration wizard
-  Template builder
-  Command line deployment:
weblogic.Deployer
-  Admin console
•  Online / offline mode
Frank Munz / www.munzandmore.com / Oracle DevCast

Slide #20
WLST
MW_HOME/wlserver_12.1/common/bin
contains start script for WLST: wlst.sh
Or run command-line with WL_HOME set and
weblogic.jar in classpath:

java weblogic.WLST [Script.py]
Frank Munz / www.munzandmore.com / Oracle DevCast

Slide #21
DEMO
WLST
WLST Quick Reference
ls()
cd()

ls('a')	
  shows	
  aIributes	
  ,	
  'c'	
  child	
  MBeans,	
  'o'	
  operaCons	
  
navigaCon	
  

domainConfig()
serverConfig()
domainRuntime()
serverRuntime()

change	
  to	
  domain	
  configuraCon	
  tree
change	
  to	
  server	
  config	
  MBeans
change	
  to	
  domain	
  runCme	
  tree
change	
  to	
  server	
  runCme	
  MBeans	
  	
  
	
  change	
  to	
  custom	
  tree	
  
change	
  to	
  JNDI	
  tree	
  

custom()	
  
jndi()

	
  

edit()
startEdit()
save()
activate() / undo()

change	
  to	
  writable	
  edit	
  tree
start	
  an	
  edit	
  session,	
  then	
  use	
  	
  set('aIribute','value')	
  
persist	
  changes
acCvate	
  /	
  undo	
  changes

configToScript()
find() 	
  
	
  
easeSyntax()

export	
  domain	
  configuraCon	
  to	
  WLST	
  script	
  
	
  find	
  aIributes
switch	
  off	
  python	
  syntax	
  (do	
  not	
  use	
  for	
  scripCng!)	
  
WebLogic 12c
RESTful Management Service
•  Enable from admin console
•  Retrieves cluster, server, deployment and
JDBC

http://host:port/management/tenantmonitoring/servers?format=full
•  Built-in AJAX client for testing:
http://host:port/management/ajaxtest.html
Frank Munz / www.munzandmore.com / Oracle DevCast

Slide #24
DEMO
RESTful
Management
Service
Jolokia
•  HTTP/JSON bridge for remote JMX access
•  -> Avoids JVM overhead on client side
•  Uses j4p.war or JVM agent on WebLogic
•  Supports many JEE servers
•  j4psh JMX shell with tab-completion and
syntax highlighting
•  Understanding of MBean names required
Frank Munz / www.munzandmore.com / Oracle DevCast
DEMO
Jolokia
Spring / Standard Java EE JMX Development

JMX PROGRAMMING
DEMO
Spring
DEMO
JConsole
DEMO
JMX + Java EE
Conclusion and Links

WRAP-UP
WebLogic 12c Advanced
Recipes
http://www.amazon.com/dp/
0980798019/

Available NOW
Frank Munz / www.munzandmore.com / Oracle DevCast

Slide #33
Links
DevOps
http://radar.oreilly.com/2012/06/what-is-devops.html
Oracle WebLogic 12c JMX Documentation
http://docs.oracle.com/cd/E24329_01/web.1211/e24416/toc.htm
RESTful Management Services
http://www.oracle.com/technetwork/articles/soa/oliveira-wlsrest-javafx-1723982.html
Frank Munz / www.munzandmore.com / Oracle DevCast

Slide #34
Links
Spring Reference, Chapter 22, JMX
http://static.springsource.org/spring/docs/3.0.0.RELEASE/
reference/html/jmx.html#jmx-exporting
Oracle JMX Tutorial
http://docs.oracle.com/javase/tutorial/jmx/mbeans/
standard.html
Oracle MXBeans explained:
http://docs.oracle.com/javase/6/docs/api/javax/management/
MXBean.html
Frank Munz / www.munzandmore.com / Oracle DevCast

Slide #35
Links
Jolokia Web Site:
http://jolokia.org
munz & more
http://www.munzandmore.com/blog
http://www.munzandmore.com/newsletter

Frank Munz / www.munzandmore.com / Oracle DevCast

Slide #36
Let’s connect

Frank Munz / www.munzandmore.com / Oracle DevCast
Join the WebLogic Community
Twitter
twitter.com/oracleweblogic
Facebook
facebook.com/oracleweblogic
Oracle’s WebLogic blog
blogs.oracle.com/weblogicserver
Youtube
Youtube.com/oracleweblogic
Oracle.com/technetwork/weblogic
	
  
WebLogic JMX for DevOps
WebLogic JMX for DevOps
1 of 40

More Related Content

Similar to WebLogic JMX for DevOps(20)

Recently uploaded(20)

Tunable Laser (1).pptxTunable Laser (1).pptx
Tunable Laser (1).pptx
Hajira Mahmood21 views
METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ...METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ...
METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ...
Prity Khastgir IPR Strategic India Patent Attorney Amplify Innovation24 views

WebLogic JMX for DevOps

  • 2. Oracle WebLogic Devcast Series: JMX for DevOps Dr. Frank Munz Oracle Technologist of the Year, Cloud ORACLE PRODUCT LOGO
  • 3. The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle s products remains at the sole discretion of Oracle.
  • 4. Who is this guy? •  Frank Munz •  Founded munz & more in 2007 •  12+ years WebLogic Server and Oracle Fusion Middleware •  Consulting and High-End Training •  NEW book: “WebLogic 12c: Advanced Recipes”
  • 5. WebLogic 12c: JMX For DevOps •  Download NetBeans projects and additional links at the end •  “JMX for DevOps” ? Frank Munz / www.munzandmore.com / Oracle DevCast Slide #5
  • 6. Agenda 1. Basics 2. Tools / Clients 3. Programming 4. Wrap-up Frank Munz / www.munzandmore.com / Oracle DevCast Slide #6
  • 8. JMX •  Java Management Extensions (JSR-003) + JMX Remote API (JSR-160) •  Supported from Java 5 •  JMX 1.2 supported since WLS 9.x •  WebLogic 12c: RESTful access Frank Munz / www.munzandmore.com / Oracle DevCast Slide #8
  • 9. MBeans MBeans have attributes, operations, use notifications WebLogic MBeans encapsulate –  Configuration Data –  Runtime Values Frank Munz / www.munzandmore.com / Oracle DevCast Slide #9
  • 10. MBean Servers Oracle  WebLogic  JVM   JMX   JVM  Pla<orm  MBean  Server   Edit  MBean  Server   RunCme  MBean  Server   RMI  Client  JVM   JSR  160  RMI   Connector   DomainRunCme  MBean  Server   MBean   hIp   Admin   RESTful   Connector   MBean   MBean   Admin   Frank Munz / www.munzandmore.com / Oracle DevCast
  • 11. MBean Object Name domainPart:listOfProperties com.bea used for WebLogic MBeans Name=…,Type=… [,ParentType1=Parent1Name] [,ParentType2=Parent2Name] [,…] [,Location=serverName] Example: com.bea:Name=AdminServer,Type=Server Frank Munz / www.munzandmore.com / Oracle DevCast
  • 12. Admin console, JConsole, WLST, RESTful Management Services, Jolokia. JMX TOOLS / CLIENTS
  • 15. WebLogic 12c RESTful Management Services
  • 17. Open Source JMX Shell, RESTful API, Monitoring Plugins
  • 18. WebLogic 12c Admin Console •  Comfortable and feature-rich graphical JMX client •  All changes from console are done via JMX •  Sometimes scripting is preferred -> WLST scripts can be recorded Frank Munz / www.munzandmore.com / Oracle DevCast Slide #18
  • 20. WebLogic Scripting Tool (WLST) •  Efficient and versatile. It can replace: -  Configuration wizard -  Template builder -  Command line deployment: weblogic.Deployer -  Admin console •  Online / offline mode Frank Munz / www.munzandmore.com / Oracle DevCast Slide #20
  • 21. WLST MW_HOME/wlserver_12.1/common/bin contains start script for WLST: wlst.sh Or run command-line with WL_HOME set and weblogic.jar in classpath: java weblogic.WLST [Script.py] Frank Munz / www.munzandmore.com / Oracle DevCast Slide #21
  • 23. WLST Quick Reference ls() cd() ls('a')  shows  aIributes  ,  'c'  child  MBeans,  'o'  operaCons   navigaCon   domainConfig() serverConfig() domainRuntime() serverRuntime() change  to  domain  configuraCon  tree change  to  server  config  MBeans change  to  domain  runCme  tree change  to  server  runCme  MBeans      change  to  custom  tree   change  to  JNDI  tree   custom()   jndi()   edit() startEdit() save() activate() / undo() change  to  writable  edit  tree start  an  edit  session,  then  use    set('aIribute','value')   persist  changes acCvate  /  undo  changes configToScript() find()     easeSyntax() export  domain  configuraCon  to  WLST  script    find  aIributes switch  off  python  syntax  (do  not  use  for  scripCng!)  
  • 24. WebLogic 12c RESTful Management Service •  Enable from admin console •  Retrieves cluster, server, deployment and JDBC http://host:port/management/tenantmonitoring/servers?format=full •  Built-in AJAX client for testing: http://host:port/management/ajaxtest.html Frank Munz / www.munzandmore.com / Oracle DevCast Slide #24
  • 26. Jolokia •  HTTP/JSON bridge for remote JMX access •  -> Avoids JVM overhead on client side •  Uses j4p.war or JVM agent on WebLogic •  Supports many JEE servers •  j4psh JMX shell with tab-completion and syntax highlighting •  Understanding of MBean names required Frank Munz / www.munzandmore.com / Oracle DevCast
  • 28. Spring / Standard Java EE JMX Development JMX PROGRAMMING
  • 33. WebLogic 12c Advanced Recipes http://www.amazon.com/dp/ 0980798019/ Available NOW Frank Munz / www.munzandmore.com / Oracle DevCast Slide #33
  • 34. Links DevOps http://radar.oreilly.com/2012/06/what-is-devops.html Oracle WebLogic 12c JMX Documentation http://docs.oracle.com/cd/E24329_01/web.1211/e24416/toc.htm RESTful Management Services http://www.oracle.com/technetwork/articles/soa/oliveira-wlsrest-javafx-1723982.html Frank Munz / www.munzandmore.com / Oracle DevCast Slide #34
  • 35. Links Spring Reference, Chapter 22, JMX http://static.springsource.org/spring/docs/3.0.0.RELEASE/ reference/html/jmx.html#jmx-exporting Oracle JMX Tutorial http://docs.oracle.com/javase/tutorial/jmx/mbeans/ standard.html Oracle MXBeans explained: http://docs.oracle.com/javase/6/docs/api/javax/management/ MXBean.html Frank Munz / www.munzandmore.com / Oracle DevCast Slide #35
  • 36. Links Jolokia Web Site: http://jolokia.org munz & more http://www.munzandmore.com/blog http://www.munzandmore.com/newsletter Frank Munz / www.munzandmore.com / Oracle DevCast Slide #36
  • 37. Let’s connect Frank Munz / www.munzandmore.com / Oracle DevCast
  • 38. Join the WebLogic Community Twitter twitter.com/oracleweblogic Facebook facebook.com/oracleweblogic Oracle’s WebLogic blog blogs.oracle.com/weblogicserver Youtube Youtube.com/oracleweblogic Oracle.com/technetwork/weblogic