WebLogic JMX for DevOps

2,426 views

Published on

Published in: Technology, Business

WebLogic JMX for DevOps

  1. 1. Oracle WebLogic Devcast Series: JMX for DevOps Dr. Frank Munz Oracle Technologist of the Year, Cloud ORACLE PRODUCT LOGO
  2. 2. 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.
  3. 3. 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”
  4. 4. 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
  5. 5. Agenda 1. Basics 2. Tools / Clients 3. Programming 4. Wrap-up Frank Munz / www.munzandmore.com / Oracle DevCast Slide #6
  6. 6. JMX BASICS
  7. 7. 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
  8. 8. MBeans MBeans have attributes, operations, use notifications WebLogic MBeans encapsulate –  Configuration Data –  Runtime Values Frank Munz / www.munzandmore.com / Oracle DevCast Slide #9
  9. 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
  10. 10. 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
  11. 11. Admin console, JConsole, WLST, RESTful Management Services, Jolokia. JMX TOOLS / CLIENTS
  12. 12. WebLogic Admin Console
  13. 13. WebLogic Scripting Tool
  14. 14. WebLogic 12c RESTful Management Services
  15. 15. JConsole
  16. 16. Open Source JMX Shell, RESTful API, Monitoring Plugins
  17. 17. 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
  18. 18. DEMO Admin Console
  19. 19. 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
  20. 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
  21. 21. DEMO WLST
  22. 22. 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!)  
  23. 23. 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
  24. 24. DEMO RESTful Management Service
  25. 25. 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
  26. 26. DEMO Jolokia
  27. 27. Spring / Standard Java EE JMX Development JMX PROGRAMMING
  28. 28. DEMO Spring
  29. 29. DEMO JConsole
  30. 30. DEMO JMX + Java EE
  31. 31. Conclusion and Links WRAP-UP
  32. 32. WebLogic 12c Advanced Recipes http://www.amazon.com/dp/ 0980798019/ Available NOW Frank Munz / www.munzandmore.com / Oracle DevCast Slide #33
  33. 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
  34. 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
  35. 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
  36. 36. Let’s connect Frank Munz / www.munzandmore.com / Oracle DevCast
  37. 37. 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  

×