SlideShare uma empresa Scribd logo
1 de 32
Baixar para ler offline
Through the JMX Window
Matt Brasier
Head of Consulting
C2B2 Consulting
© C2B2 Consulting Limited 2013
All Rights Reserved
Who am I?
• Head of consulting at C2B2
• Application server consultant
– WebLogic 5.1->Present
– JBoss 3.x -> Present
– Tomcat, etc

• Performance tuning and critical situation
support
• Author
© C2B2 Consulting Limited 2013
All Rights Reserved
Agenda
•
•
•
•
•

What is JMX?
JMX tools
What information does it expose?
What operations can JMX expose?
Exposing your own information and
operations

© C2B2 Consulting Limited 2013
All Rights Reserved
WHAT IS JMX?

© C2B2 Consulting Limited 2013
All Rights Reserved
What is JMX
• Java Management
eXtensions
• Currently at version 1.4
• http://docs.oracle.com/
javase/7/docs/technote
s/guides/jmx/JMX_1_4_
specification.pdf

“The Java Management
extensions (also called
the JMX specification)
define an architecture,
the design patterns, the
APIs, and the services
for application and
network management
and monitoring in the
Java programming
language.”
© C2B2 Consulting Limited 2013
All Rights Reserved
JMX History
• 1998 – JMX starts as JSR • JMAPI – Java Management
API, failed Sun project
3. EG composed of most
J2EE vendors, based on • JDMK – Java Dynamic
Management Kit, another
JDMK
failed Sun project
• 2003 – J2EE 1.4
• JMX
incorporates JMX in the
J2EE Spec
• 2004 – With Java 5
release, JMX becomes
part of the JDK/Java SE
© C2B2 Consulting Limited 2013
All Rights Reserved
What is management?
• Management Information
– Any information that is useful for the runtime
management of the application.

• Management Operations
– Any operations that can assist in the runtime
management of the application.

© C2B2 Consulting Limited 2013
All Rights Reserved
Why JMX?
• Application Management is important!
– If often forgotten.

• Standardise the APIs and patterns for exposing
management operations and tooling.
– Tools can be sure information is in an expected
format.
– Applications can take advantage of existing
tooling.
© C2B2 Consulting Limited 2013
All Rights Reserved
Core Concepts
• MBean
– Management Bean
• Operations
• Attributes

• MBean Server
– Registry for MBeans

• API
– Remote and local access to MBean Server and
MBeans
© C2B2 Consulting Limited 2013
All Rights Reserved
Core Concepts
• Applications/Frameworks/Containers expose
MBeans
• The JVM contains an MBeanServer which
registers all MBeans
• Clients use the JMX API to connect to the
MBeanServer and find relevant MBeans
• Clients read/change values of attributes and
invoke operations to manage the service
© C2B2 Consulting Limited 2013
All Rights Reserved
JMX TOOLS

© C2B2 Consulting Limited 2013
All Rights Reserved
JMX Tools
• JConsole
• JVisualVM
• Monitoring tools
– Hyperic HQ
– Nagios
– Etc

© C2B2 Consulting Limited 2013
All Rights Reserved
Demo

© C2B2 Consulting Limited 2013
All Rights Reserved
WHAT INFORMATION DOES IT
EXPOSE?
© C2B2 Consulting Limited 2013
All Rights Reserved
Default JMX info
• Heap Use
–
–
–
–

java.lang:type=Memory
java.lang:type=MemoryPool,name=Eden Space
java.lang:type=MemoryPool,name=Tenured Gen
java.lang:type=MemoryPool,name=Perm Gen

• Garbage collection
– java.lang:type=GarbageCollector,name=MarkSweepCompact
– java.lang:type=GarbageCollector,name=Copy

• Operating system info
– java.lang:type=OperatingSystem
© C2B2 Consulting Limited 2013
All Rights Reserved
Default JMX info
• Runtime JVM parameters
– java.lang:type=Runtime

• NIO Buffers
– java.nio:type=BufferPool,name=direct

• JDK Logger
– java.util.logging:type=Logging

• Classloading
– java.lang:type=ClassLoading

• And more!
© C2B2 Consulting Limited 2013
All Rights Reserved
In an application server
• Connection pool info
– Sizes
– Free connections

• Servlet/JSP info
– Number of requests
– Number of errors

• Thread pools
– Sizes

• JMS
– Queue sizes
– Pending messages

• EJBs
– Pool sizes
– Cache hit rates

• Connectors
– In coming request
volumes
© C2B2 Consulting Limited 2013
All Rights Reserved
WHAT OPERATIONS DOES IT
EXPOSE?
© C2B2 Consulting Limited 2013
All Rights Reserved
Default operations
• com.sun.management:type=HotSpotDiagnostic
– dumpHeap
– setVMOption
– getVMOption

• java.lang:type=Memory
– Gc

• java.lang:type=Threading
– dumpAllThreads
– findDeadLockedThreads
© C2B2 Consulting Limited 2013
All Rights Reserved
In an application server
• Datasources
– Reset all datasources

• JMS
– Delete all messages

• Server
– Restart or stop a server

• Deployment
– Deploy or redeploy applications
© C2B2 Consulting Limited 2013
All Rights Reserved
In an application server
• Any operation you
could normally perform
to manage an
application server!
• It is like an X-ray of your
application

© C2B2 Consulting Limited 2013
All Rights Reserved
EXPOSING YOUR OWN
MANAGEMENT INFORMATION AND
OPERATIONS
© C2B2 Consulting Limited 2013
All Rights Reserved
Two step process
• Create MBeans
• Register with MBean
server
• Profit

© C2B2 Consulting Limited 2013
All Rights Reserved
Create MBeans
• Identify where in your application you have
relevant management information
• Create an MBean interface
• Implement the MBean interface

© C2B2 Consulting Limited 2013
All Rights Reserved
MBean Interface
public Interface LocationMonitorMBean
{
public void getNumberOfFiles();
public void setScanPeriod();
public void getScanPeriod();
public void resetFileCounter();
public void disable();
public void enable();
public void getEnabled();
}

Getters and Setters represent
Attributes

Other methods represent
operations

© C2B2 Consulting Limited 2013
All Rights Reserved
Implementation class
• Implement the MBean interface
– You can do this with an existing class

• Try and avoid doing intensive work in the
MBean implementation
– Pre-compute values
– Periodically check and cache values

© C2B2 Consulting Limited 2013
All Rights Reserved
Implementation class
public class LocationMonitor implements LocationMonitorMBean
{
private boolean enabled;
Attributes are accessed via getters/setters
private long scanInterval;
private long numFiles;
public void getNumberOfFiles(
{
return numFiles;

...

© C2B2 Consulting Limited 2013
All Rights Reserved
Register with MBeanServer
• Create (or get hold of) an instance of your
MBean implementation
• Get hold of an MBean Server
– PlatformMBeanServer

• Create an ObjectName for your MBean
• Register the MBean

© C2B2 Consulting Limited 2013
All Rights Reserved
Register with MBeanServer
public static void main(String[] args) throws Exception
Get the MBean Server
{
MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
ObjectName name = new
Create the ObjectName
ObjectName(“uk.co.c2b2.management:type=LocationMonitor");
Create the MBean instance
LocationMonitor mbean = new LocationMonitor();
mbs.registerMBean(mbean, name);
Register it
}

© C2B2 Consulting Limited 2013
All Rights Reserved
What to monitor
• Resources that your application uses
– Including data (flow rates etc)

• Expose management operations
– Restarting components
– Re-loading configuration files

© C2B2 Consulting Limited 2013
All Rights Reserved
What is through the JMX window?
• A future with more
Information
• A future with more
control

© C2B2 Consulting Limited 2013
All Rights Reserved
QUESTIONS?

© C2B2 Consulting Limited 2013
All Rights Reserved

Mais conteúdo relacionado

Mais procurados

WebLogic Scripting Tool Overview
WebLogic Scripting Tool OverviewWebLogic Scripting Tool Overview
WebLogic Scripting Tool OverviewJames Bayer
 
Keynote Oracle Fusion Middleware Summit_2020
Keynote Oracle Fusion Middleware Summit_2020Keynote Oracle Fusion Middleware Summit_2020
Keynote Oracle Fusion Middleware Summit_2020Michel Schildmeijer
 
Oracle Fuson Middleware Diagnostics, Performance and Troubleshoot
Oracle Fuson Middleware Diagnostics, Performance and TroubleshootOracle Fuson Middleware Diagnostics, Performance and Troubleshoot
Oracle Fuson Middleware Diagnostics, Performance and TroubleshootMichel Schildmeijer
 
WebLogic JMX for DevOps
WebLogic JMX for DevOpsWebLogic JMX for DevOps
WebLogic JMX for DevOpsFrank Munz
 
WSO2 Message Broker - Product Overview
WSO2 Message Broker - Product OverviewWSO2 Message Broker - Product Overview
WSO2 Message Broker - Product OverviewWSO2
 
JavaEE Microservices platforms
JavaEE Microservices platformsJavaEE Microservices platforms
JavaEE Microservices platformsPayara
 
High performance java ee with j cache and cdi
High performance java ee with j cache and cdiHigh performance java ee with j cache and cdi
High performance java ee with j cache and cdiPayara
 
Narayana 5: The premier open source transaction manager
Narayana 5: The premier open source transaction manager Narayana 5: The premier open source transaction manager
Narayana 5: The premier open source transaction manager Virtual JBoss User Group
 
Taking Your Enterprise to the Next Level with WSO2 Message Broker and WSO2 En...
Taking Your Enterprise to the Next Level with WSO2 Message Broker and WSO2 En...Taking Your Enterprise to the Next Level with WSO2 Message Broker and WSO2 En...
Taking Your Enterprise to the Next Level with WSO2 Message Broker and WSO2 En...WSO2
 
Oracle WebLogic 12c New Multitenancy features
Oracle WebLogic 12c New Multitenancy featuresOracle WebLogic 12c New Multitenancy features
Oracle WebLogic 12c New Multitenancy featuresMichel Schildmeijer
 
2020 pre fosdem mysql clone
2020 pre fosdem   mysql clone2020 pre fosdem   mysql clone
2020 pre fosdem mysql cloneGeorgi Kodinov
 
Weblogic configuration & administration
Weblogic   configuration & administrationWeblogic   configuration & administration
Weblogic configuration & administrationMuhammad Mansoor
 
Linkedin NUS QCon 2009 slides
Linkedin NUS QCon 2009 slidesLinkedin NUS QCon 2009 slides
Linkedin NUS QCon 2009 slidesruslansv
 
Stay productive while slicing up the monolith
Stay productive while slicing up the monolith Stay productive while slicing up the monolith
Stay productive while slicing up the monolith Markus Eisele
 
Cloud OS development
Cloud OS developmentCloud OS development
Cloud OS developmentSean Chang
 
[WSO2Con EU 2017] Writing Microservices Using MSF4J
[WSO2Con EU 2017] Writing Microservices Using MSF4J[WSO2Con EU 2017] Writing Microservices Using MSF4J
[WSO2Con EU 2017] Writing Microservices Using MSF4JWSO2
 

Mais procurados (20)

WebLogic Scripting Tool Overview
WebLogic Scripting Tool OverviewWebLogic Scripting Tool Overview
WebLogic Scripting Tool Overview
 
Keynote Oracle Fusion Middleware Summit_2020
Keynote Oracle Fusion Middleware Summit_2020Keynote Oracle Fusion Middleware Summit_2020
Keynote Oracle Fusion Middleware Summit_2020
 
Oracle Fuson Middleware Diagnostics, Performance and Troubleshoot
Oracle Fuson Middleware Diagnostics, Performance and TroubleshootOracle Fuson Middleware Diagnostics, Performance and Troubleshoot
Oracle Fuson Middleware Diagnostics, Performance and Troubleshoot
 
Weblogic - clustering failover, and load balancing
Weblogic - clustering failover, and load balancingWeblogic - clustering failover, and load balancing
Weblogic - clustering failover, and load balancing
 
WebLogic JMX for DevOps
WebLogic JMX for DevOpsWebLogic JMX for DevOps
WebLogic JMX for DevOps
 
What's New in WildFly 9?
What's New in WildFly 9?What's New in WildFly 9?
What's New in WildFly 9?
 
WSO2 Message Broker - Product Overview
WSO2 Message Broker - Product OverviewWSO2 Message Broker - Product Overview
WSO2 Message Broker - Product Overview
 
JavaEE Microservices platforms
JavaEE Microservices platformsJavaEE Microservices platforms
JavaEE Microservices platforms
 
High performance java ee with j cache and cdi
High performance java ee with j cache and cdiHigh performance java ee with j cache and cdi
High performance java ee with j cache and cdi
 
Narayana 5: The premier open source transaction manager
Narayana 5: The premier open source transaction manager Narayana 5: The premier open source transaction manager
Narayana 5: The premier open source transaction manager
 
Taking Your Enterprise to the Next Level with WSO2 Message Broker and WSO2 En...
Taking Your Enterprise to the Next Level with WSO2 Message Broker and WSO2 En...Taking Your Enterprise to the Next Level with WSO2 Message Broker and WSO2 En...
Taking Your Enterprise to the Next Level with WSO2 Message Broker and WSO2 En...
 
Oracle WebLogic 12c New Multitenancy features
Oracle WebLogic 12c New Multitenancy featuresOracle WebLogic 12c New Multitenancy features
Oracle WebLogic 12c New Multitenancy features
 
2020 pre fosdem mysql clone
2020 pre fosdem   mysql clone2020 pre fosdem   mysql clone
2020 pre fosdem mysql clone
 
Pub/Sub Messaging
Pub/Sub MessagingPub/Sub Messaging
Pub/Sub Messaging
 
Weblogic configuration & administration
Weblogic   configuration & administrationWeblogic   configuration & administration
Weblogic configuration & administration
 
WSO2 Gateway
WSO2 GatewayWSO2 Gateway
WSO2 Gateway
 
Linkedin NUS QCon 2009 slides
Linkedin NUS QCon 2009 slidesLinkedin NUS QCon 2009 slides
Linkedin NUS QCon 2009 slides
 
Stay productive while slicing up the monolith
Stay productive while slicing up the monolith Stay productive while slicing up the monolith
Stay productive while slicing up the monolith
 
Cloud OS development
Cloud OS developmentCloud OS development
Cloud OS development
 
[WSO2Con EU 2017] Writing Microservices Using MSF4J
[WSO2Con EU 2017] Writing Microservices Using MSF4J[WSO2Con EU 2017] Writing Microservices Using MSF4J
[WSO2Con EU 2017] Writing Microservices Using MSF4J
 

Semelhante a Through the JMX Window

UtrechtJUG_Exploring statefulmicroservices in a cloud-native world.pptx
UtrechtJUG_Exploring statefulmicroservices in a cloud-native world.pptxUtrechtJUG_Exploring statefulmicroservices in a cloud-native world.pptx
UtrechtJUG_Exploring statefulmicroservices in a cloud-native world.pptxGrace Jansen
 
DevoxxBelgium_StatefulCloud.pptx
DevoxxBelgium_StatefulCloud.pptxDevoxxBelgium_StatefulCloud.pptx
DevoxxBelgium_StatefulCloud.pptxGrace Jansen
 
Transforming to Microservices
Transforming to MicroservicesTransforming to Microservices
Transforming to MicroservicesKyle Brown
 
Migrating to Microservices Patterns and Technologies (edition 2023)
 Migrating to Microservices Patterns and Technologies (edition 2023) Migrating to Microservices Patterns and Technologies (edition 2023)
Migrating to Microservices Patterns and Technologies (edition 2023)Ahmed Misbah
 
Chapter 10:Understanding Java Related Platforms and Integration Technologies
Chapter 10:Understanding Java Related Platforms and Integration TechnologiesChapter 10:Understanding Java Related Platforms and Integration Technologies
Chapter 10:Understanding Java Related Platforms and Integration TechnologiesIt Academy
 
MICROSERVICES ARCHITECTURE unit -2.pptx
MICROSERVICES ARCHITECTURE unit -2.pptxMICROSERVICES ARCHITECTURE unit -2.pptx
MICROSERVICES ARCHITECTURE unit -2.pptxMohammedShahid562503
 
MAS202 - Customizing IBM Connections
MAS202 - Customizing IBM ConnectionsMAS202 - Customizing IBM Connections
MAS202 - Customizing IBM Connectionspaulbastide
 
MAS202 - Customizing IBM Connections - Downloadable
MAS202 - Customizing IBM Connections - DownloadableMAS202 - Customizing IBM Connections - Downloadable
MAS202 - Customizing IBM Connections - Downloadablepaulbastide
 
Introduction to the IBM Java Tools
Introduction to the IBM Java ToolsIntroduction to the IBM Java Tools
Introduction to the IBM Java ToolsChris Bailey
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservicesAnil Allewar
 
Migrating a Monolithic App to Microservices on Cloud Foundry
Migrating a Monolithic App to Microservices on Cloud FoundryMigrating a Monolithic App to Microservices on Cloud Foundry
Migrating a Monolithic App to Microservices on Cloud FoundryTony Erwin
 
Oracle Weblogic for EBS and obiee (R12.2)
Oracle Weblogic for EBS and obiee (R12.2)Oracle Weblogic for EBS and obiee (R12.2)
Oracle Weblogic for EBS and obiee (R12.2)Berry Clemens
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to MicroservicesMahmoudZidan41
 
Java Development on Bluemix
Java Development on BluemixJava Development on Bluemix
Java Development on BluemixRam Vennam
 
Micro Front Ends for Micro Services using Oracle JET
Micro Front Ends for Micro Services using Oracle JETMicro Front Ends for Micro Services using Oracle JET
Micro Front Ends for Micro Services using Oracle JETVijay Nair
 
Istio as an enabler for migrating to microservices (edition 2022)
Istio as an enabler for migrating to microservices (edition 2022)Istio as an enabler for migrating to microservices (edition 2022)
Istio as an enabler for migrating to microservices (edition 2022)Ahmed Misbah
 
Ahmedabad MuleSoft Meetup #4
Ahmedabad MuleSoft Meetup #4Ahmedabad MuleSoft Meetup #4
Ahmedabad MuleSoft Meetup #4Tejas Purohit
 
2 mobile development frameworks and tools dark temp
2   mobile development frameworks and tools dark temp2   mobile development frameworks and tools dark temp
2 mobile development frameworks and tools dark tempShahid Riaz
 
Marketing Automation at Scale: How Marketo Solved Key Data Management Challen...
Marketing Automation at Scale: How Marketo Solved Key Data Management Challen...Marketing Automation at Scale: How Marketo Solved Key Data Management Challen...
Marketing Automation at Scale: How Marketo Solved Key Data Management Challen...Continuent
 

Semelhante a Through the JMX Window (20)

UtrechtJUG_Exploring statefulmicroservices in a cloud-native world.pptx
UtrechtJUG_Exploring statefulmicroservices in a cloud-native world.pptxUtrechtJUG_Exploring statefulmicroservices in a cloud-native world.pptx
UtrechtJUG_Exploring statefulmicroservices in a cloud-native world.pptx
 
DevoxxBelgium_StatefulCloud.pptx
DevoxxBelgium_StatefulCloud.pptxDevoxxBelgium_StatefulCloud.pptx
DevoxxBelgium_StatefulCloud.pptx
 
Transforming to Microservices
Transforming to MicroservicesTransforming to Microservices
Transforming to Microservices
 
Migrating to Microservices Patterns and Technologies (edition 2023)
 Migrating to Microservices Patterns and Technologies (edition 2023) Migrating to Microservices Patterns and Technologies (edition 2023)
Migrating to Microservices Patterns and Technologies (edition 2023)
 
Chapter 10:Understanding Java Related Platforms and Integration Technologies
Chapter 10:Understanding Java Related Platforms and Integration TechnologiesChapter 10:Understanding Java Related Platforms and Integration Technologies
Chapter 10:Understanding Java Related Platforms and Integration Technologies
 
MICROSERVICES ARCHITECTURE unit -2.pptx
MICROSERVICES ARCHITECTURE unit -2.pptxMICROSERVICES ARCHITECTURE unit -2.pptx
MICROSERVICES ARCHITECTURE unit -2.pptx
 
MAS202 - Customizing IBM Connections
MAS202 - Customizing IBM ConnectionsMAS202 - Customizing IBM Connections
MAS202 - Customizing IBM Connections
 
MAS202 - Customizing IBM Connections - Downloadable
MAS202 - Customizing IBM Connections - DownloadableMAS202 - Customizing IBM Connections - Downloadable
MAS202 - Customizing IBM Connections - Downloadable
 
Webinar : Microservices and Containerization
Webinar : Microservices and ContainerizationWebinar : Microservices and Containerization
Webinar : Microservices and Containerization
 
Introduction to the IBM Java Tools
Introduction to the IBM Java ToolsIntroduction to the IBM Java Tools
Introduction to the IBM Java Tools
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
 
Migrating a Monolithic App to Microservices on Cloud Foundry
Migrating a Monolithic App to Microservices on Cloud FoundryMigrating a Monolithic App to Microservices on Cloud Foundry
Migrating a Monolithic App to Microservices on Cloud Foundry
 
Oracle Weblogic for EBS and obiee (R12.2)
Oracle Weblogic for EBS and obiee (R12.2)Oracle Weblogic for EBS and obiee (R12.2)
Oracle Weblogic for EBS and obiee (R12.2)
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Java Development on Bluemix
Java Development on BluemixJava Development on Bluemix
Java Development on Bluemix
 
Micro Front Ends for Micro Services using Oracle JET
Micro Front Ends for Micro Services using Oracle JETMicro Front Ends for Micro Services using Oracle JET
Micro Front Ends for Micro Services using Oracle JET
 
Istio as an enabler for migrating to microservices (edition 2022)
Istio as an enabler for migrating to microservices (edition 2022)Istio as an enabler for migrating to microservices (edition 2022)
Istio as an enabler for migrating to microservices (edition 2022)
 
Ahmedabad MuleSoft Meetup #4
Ahmedabad MuleSoft Meetup #4Ahmedabad MuleSoft Meetup #4
Ahmedabad MuleSoft Meetup #4
 
2 mobile development frameworks and tools dark temp
2   mobile development frameworks and tools dark temp2   mobile development frameworks and tools dark temp
2 mobile development frameworks and tools dark temp
 
Marketing Automation at Scale: How Marketo Solved Key Data Management Challen...
Marketing Automation at Scale: How Marketo Solved Key Data Management Challen...Marketing Automation at Scale: How Marketo Solved Key Data Management Challen...
Marketing Automation at Scale: How Marketo Solved Key Data Management Challen...
 

Mais de C2B2 Consulting

Hands-on Performance Tuning Lab - Devoxx Poland
Hands-on Performance Tuning Lab - Devoxx PolandHands-on Performance Tuning Lab - Devoxx Poland
Hands-on Performance Tuning Lab - Devoxx PolandC2B2 Consulting
 
Advanced queries on the Infinispan Data Grid
Advanced queries on the Infinispan Data Grid Advanced queries on the Infinispan Data Grid
Advanced queries on the Infinispan Data Grid C2B2 Consulting
 
Hands-on Performance Workshop - The science of performance
Hands-on Performance Workshop - The science of performanceHands-on Performance Workshop - The science of performance
Hands-on Performance Workshop - The science of performanceC2B2 Consulting
 
Jsr107 come, code, cache, compute!
Jsr107 come, code, cache, compute!Jsr107 come, code, cache, compute!
Jsr107 come, code, cache, compute!C2B2 Consulting
 
JBoss Clustering on OpenShift
JBoss Clustering on OpenShiftJBoss Clustering on OpenShift
JBoss Clustering on OpenShiftC2B2 Consulting
 
Dr. Low Latency or: How I Learned to Stop Worrying about Pauses and Love the ...
Dr. Low Latency or: How I Learned to Stop Worrying about Pauses and Love the ...Dr. Low Latency or: How I Learned to Stop Worrying about Pauses and Love the ...
Dr. Low Latency or: How I Learned to Stop Worrying about Pauses and Love the ...C2B2 Consulting
 
'Deploying with GlassFish & Docker'
'Deploying with GlassFish & Docker' 'Deploying with GlassFish & Docker'
'Deploying with GlassFish & Docker' C2B2 Consulting
 
'JMS @ Data Grid? Hacking the Glassfish messaging for fun & profit'
'JMS @ Data Grid? Hacking the Glassfish messaging for fun & profit' 'JMS @ Data Grid? Hacking the Glassfish messaging for fun & profit'
'JMS @ Data Grid? Hacking the Glassfish messaging for fun & profit' C2B2 Consulting
 
'New JMS features in GlassFish 4.0' by Nigel Deakin
'New JMS features in GlassFish 4.0' by Nigel Deakin'New JMS features in GlassFish 4.0' by Nigel Deakin
'New JMS features in GlassFish 4.0' by Nigel DeakinC2B2 Consulting
 
Coherence sig-nfr-web-tier-scaling-using-coherence-web
Coherence sig-nfr-web-tier-scaling-using-coherence-webCoherence sig-nfr-web-tier-scaling-using-coherence-web
Coherence sig-nfr-web-tier-scaling-using-coherence-webC2B2 Consulting
 
JUDCon 2013- JBoss Data Grid and WebSockets: Delivering Real Time Push at Scale
JUDCon 2013- JBoss Data Grid and WebSockets: Delivering Real Time Push at ScaleJUDCon 2013- JBoss Data Grid and WebSockets: Delivering Real Time Push at Scale
JUDCon 2013- JBoss Data Grid and WebSockets: Delivering Real Time Push at ScaleC2B2 Consulting
 
GeeCon- 'www.NoSQL.com' by Mark Addy
GeeCon- 'www.NoSQL.com' by Mark Addy GeeCon- 'www.NoSQL.com' by Mark Addy
GeeCon- 'www.NoSQL.com' by Mark Addy C2B2 Consulting
 
Monitoring VMware vFabric with Hyperic and Spring Insight
Monitoring VMware vFabric with Hyperic and Spring InsightMonitoring VMware vFabric with Hyperic and Spring Insight
Monitoring VMware vFabric with Hyperic and Spring InsightC2B2 Consulting
 
Middleware Expert Support Presentation
Middleware Expert Support PresentationMiddleware Expert Support Presentation
Middleware Expert Support PresentationC2B2 Consulting
 
Monitoring Production JBoss with JBoss ON
Monitoring Production JBoss with JBoss ONMonitoring Production JBoss with JBoss ON
Monitoring Production JBoss with JBoss ONC2B2 Consulting
 
Pushing Oracle Coherence Events to Web Browsers Using HTML5, Web Sockets and ...
Pushing Oracle Coherence Events to Web Browsers Using HTML5, Web Sockets and ...Pushing Oracle Coherence Events to Web Browsers Using HTML5, Web Sockets and ...
Pushing Oracle Coherence Events to Web Browsers Using HTML5, Web Sockets and ...C2B2 Consulting
 
G1 Garbage Collector - Big Heaps and Low Pauses?
G1 Garbage Collector - Big Heaps and Low Pauses?G1 Garbage Collector - Big Heaps and Low Pauses?
G1 Garbage Collector - Big Heaps and Low Pauses?C2B2 Consulting
 
Davoxx 2012 - 'JMS 2.0 Update'
Davoxx 2012 - 'JMS 2.0 Update'Davoxx 2012 - 'JMS 2.0 Update'
Davoxx 2012 - 'JMS 2.0 Update'C2B2 Consulting
 
Infinispan from POC to Production
Infinispan from POC to ProductionInfinispan from POC to Production
Infinispan from POC to ProductionC2B2 Consulting
 

Mais de C2B2 Consulting (20)

Hands-on Performance Tuning Lab - Devoxx Poland
Hands-on Performance Tuning Lab - Devoxx PolandHands-on Performance Tuning Lab - Devoxx Poland
Hands-on Performance Tuning Lab - Devoxx Poland
 
Advanced queries on the Infinispan Data Grid
Advanced queries on the Infinispan Data Grid Advanced queries on the Infinispan Data Grid
Advanced queries on the Infinispan Data Grid
 
Hands-on Performance Workshop - The science of performance
Hands-on Performance Workshop - The science of performanceHands-on Performance Workshop - The science of performance
Hands-on Performance Workshop - The science of performance
 
Jsr107 come, code, cache, compute!
Jsr107 come, code, cache, compute!Jsr107 come, code, cache, compute!
Jsr107 come, code, cache, compute!
 
JBoss Clustering on OpenShift
JBoss Clustering on OpenShiftJBoss Clustering on OpenShift
JBoss Clustering on OpenShift
 
Dr. Low Latency or: How I Learned to Stop Worrying about Pauses and Love the ...
Dr. Low Latency or: How I Learned to Stop Worrying about Pauses and Love the ...Dr. Low Latency or: How I Learned to Stop Worrying about Pauses and Love the ...
Dr. Low Latency or: How I Learned to Stop Worrying about Pauses and Love the ...
 
Jax London 2013
Jax London 2013Jax London 2013
Jax London 2013
 
'Deploying with GlassFish & Docker'
'Deploying with GlassFish & Docker' 'Deploying with GlassFish & Docker'
'Deploying with GlassFish & Docker'
 
'JMS @ Data Grid? Hacking the Glassfish messaging for fun & profit'
'JMS @ Data Grid? Hacking the Glassfish messaging for fun & profit' 'JMS @ Data Grid? Hacking the Glassfish messaging for fun & profit'
'JMS @ Data Grid? Hacking the Glassfish messaging for fun & profit'
 
'New JMS features in GlassFish 4.0' by Nigel Deakin
'New JMS features in GlassFish 4.0' by Nigel Deakin'New JMS features in GlassFish 4.0' by Nigel Deakin
'New JMS features in GlassFish 4.0' by Nigel Deakin
 
Coherence sig-nfr-web-tier-scaling-using-coherence-web
Coherence sig-nfr-web-tier-scaling-using-coherence-webCoherence sig-nfr-web-tier-scaling-using-coherence-web
Coherence sig-nfr-web-tier-scaling-using-coherence-web
 
JUDCon 2013- JBoss Data Grid and WebSockets: Delivering Real Time Push at Scale
JUDCon 2013- JBoss Data Grid and WebSockets: Delivering Real Time Push at ScaleJUDCon 2013- JBoss Data Grid and WebSockets: Delivering Real Time Push at Scale
JUDCon 2013- JBoss Data Grid and WebSockets: Delivering Real Time Push at Scale
 
GeeCon- 'www.NoSQL.com' by Mark Addy
GeeCon- 'www.NoSQL.com' by Mark Addy GeeCon- 'www.NoSQL.com' by Mark Addy
GeeCon- 'www.NoSQL.com' by Mark Addy
 
Monitoring VMware vFabric with Hyperic and Spring Insight
Monitoring VMware vFabric with Hyperic and Spring InsightMonitoring VMware vFabric with Hyperic and Spring Insight
Monitoring VMware vFabric with Hyperic and Spring Insight
 
Middleware Expert Support Presentation
Middleware Expert Support PresentationMiddleware Expert Support Presentation
Middleware Expert Support Presentation
 
Monitoring Production JBoss with JBoss ON
Monitoring Production JBoss with JBoss ONMonitoring Production JBoss with JBoss ON
Monitoring Production JBoss with JBoss ON
 
Pushing Oracle Coherence Events to Web Browsers Using HTML5, Web Sockets and ...
Pushing Oracle Coherence Events to Web Browsers Using HTML5, Web Sockets and ...Pushing Oracle Coherence Events to Web Browsers Using HTML5, Web Sockets and ...
Pushing Oracle Coherence Events to Web Browsers Using HTML5, Web Sockets and ...
 
G1 Garbage Collector - Big Heaps and Low Pauses?
G1 Garbage Collector - Big Heaps and Low Pauses?G1 Garbage Collector - Big Heaps and Low Pauses?
G1 Garbage Collector - Big Heaps and Low Pauses?
 
Davoxx 2012 - 'JMS 2.0 Update'
Davoxx 2012 - 'JMS 2.0 Update'Davoxx 2012 - 'JMS 2.0 Update'
Davoxx 2012 - 'JMS 2.0 Update'
 
Infinispan from POC to Production
Infinispan from POC to ProductionInfinispan from POC to Production
Infinispan from POC to Production
 

Último

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 

Último (20)

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 

Through the JMX Window

  • 1. Through the JMX Window Matt Brasier Head of Consulting C2B2 Consulting © C2B2 Consulting Limited 2013 All Rights Reserved
  • 2. Who am I? • Head of consulting at C2B2 • Application server consultant – WebLogic 5.1->Present – JBoss 3.x -> Present – Tomcat, etc • Performance tuning and critical situation support • Author © C2B2 Consulting Limited 2013 All Rights Reserved
  • 3. Agenda • • • • • What is JMX? JMX tools What information does it expose? What operations can JMX expose? Exposing your own information and operations © C2B2 Consulting Limited 2013 All Rights Reserved
  • 4. WHAT IS JMX? © C2B2 Consulting Limited 2013 All Rights Reserved
  • 5. What is JMX • Java Management eXtensions • Currently at version 1.4 • http://docs.oracle.com/ javase/7/docs/technote s/guides/jmx/JMX_1_4_ specification.pdf “The Java Management extensions (also called the JMX specification) define an architecture, the design patterns, the APIs, and the services for application and network management and monitoring in the Java programming language.” © C2B2 Consulting Limited 2013 All Rights Reserved
  • 6. JMX History • 1998 – JMX starts as JSR • JMAPI – Java Management API, failed Sun project 3. EG composed of most J2EE vendors, based on • JDMK – Java Dynamic Management Kit, another JDMK failed Sun project • 2003 – J2EE 1.4 • JMX incorporates JMX in the J2EE Spec • 2004 – With Java 5 release, JMX becomes part of the JDK/Java SE © C2B2 Consulting Limited 2013 All Rights Reserved
  • 7. What is management? • Management Information – Any information that is useful for the runtime management of the application. • Management Operations – Any operations that can assist in the runtime management of the application. © C2B2 Consulting Limited 2013 All Rights Reserved
  • 8. Why JMX? • Application Management is important! – If often forgotten. • Standardise the APIs and patterns for exposing management operations and tooling. – Tools can be sure information is in an expected format. – Applications can take advantage of existing tooling. © C2B2 Consulting Limited 2013 All Rights Reserved
  • 9. Core Concepts • MBean – Management Bean • Operations • Attributes • MBean Server – Registry for MBeans • API – Remote and local access to MBean Server and MBeans © C2B2 Consulting Limited 2013 All Rights Reserved
  • 10. Core Concepts • Applications/Frameworks/Containers expose MBeans • The JVM contains an MBeanServer which registers all MBeans • Clients use the JMX API to connect to the MBeanServer and find relevant MBeans • Clients read/change values of attributes and invoke operations to manage the service © C2B2 Consulting Limited 2013 All Rights Reserved
  • 11. JMX TOOLS © C2B2 Consulting Limited 2013 All Rights Reserved
  • 12. JMX Tools • JConsole • JVisualVM • Monitoring tools – Hyperic HQ – Nagios – Etc © C2B2 Consulting Limited 2013 All Rights Reserved
  • 13. Demo © C2B2 Consulting Limited 2013 All Rights Reserved
  • 14. WHAT INFORMATION DOES IT EXPOSE? © C2B2 Consulting Limited 2013 All Rights Reserved
  • 15. Default JMX info • Heap Use – – – – java.lang:type=Memory java.lang:type=MemoryPool,name=Eden Space java.lang:type=MemoryPool,name=Tenured Gen java.lang:type=MemoryPool,name=Perm Gen • Garbage collection – java.lang:type=GarbageCollector,name=MarkSweepCompact – java.lang:type=GarbageCollector,name=Copy • Operating system info – java.lang:type=OperatingSystem © C2B2 Consulting Limited 2013 All Rights Reserved
  • 16. Default JMX info • Runtime JVM parameters – java.lang:type=Runtime • NIO Buffers – java.nio:type=BufferPool,name=direct • JDK Logger – java.util.logging:type=Logging • Classloading – java.lang:type=ClassLoading • And more! © C2B2 Consulting Limited 2013 All Rights Reserved
  • 17. In an application server • Connection pool info – Sizes – Free connections • Servlet/JSP info – Number of requests – Number of errors • Thread pools – Sizes • JMS – Queue sizes – Pending messages • EJBs – Pool sizes – Cache hit rates • Connectors – In coming request volumes © C2B2 Consulting Limited 2013 All Rights Reserved
  • 18. WHAT OPERATIONS DOES IT EXPOSE? © C2B2 Consulting Limited 2013 All Rights Reserved
  • 19. Default operations • com.sun.management:type=HotSpotDiagnostic – dumpHeap – setVMOption – getVMOption • java.lang:type=Memory – Gc • java.lang:type=Threading – dumpAllThreads – findDeadLockedThreads © C2B2 Consulting Limited 2013 All Rights Reserved
  • 20. In an application server • Datasources – Reset all datasources • JMS – Delete all messages • Server – Restart or stop a server • Deployment – Deploy or redeploy applications © C2B2 Consulting Limited 2013 All Rights Reserved
  • 21. In an application server • Any operation you could normally perform to manage an application server! • It is like an X-ray of your application © C2B2 Consulting Limited 2013 All Rights Reserved
  • 22. EXPOSING YOUR OWN MANAGEMENT INFORMATION AND OPERATIONS © C2B2 Consulting Limited 2013 All Rights Reserved
  • 23. Two step process • Create MBeans • Register with MBean server • Profit © C2B2 Consulting Limited 2013 All Rights Reserved
  • 24. Create MBeans • Identify where in your application you have relevant management information • Create an MBean interface • Implement the MBean interface © C2B2 Consulting Limited 2013 All Rights Reserved
  • 25. MBean Interface public Interface LocationMonitorMBean { public void getNumberOfFiles(); public void setScanPeriod(); public void getScanPeriod(); public void resetFileCounter(); public void disable(); public void enable(); public void getEnabled(); } Getters and Setters represent Attributes Other methods represent operations © C2B2 Consulting Limited 2013 All Rights Reserved
  • 26. Implementation class • Implement the MBean interface – You can do this with an existing class • Try and avoid doing intensive work in the MBean implementation – Pre-compute values – Periodically check and cache values © C2B2 Consulting Limited 2013 All Rights Reserved
  • 27. Implementation class public class LocationMonitor implements LocationMonitorMBean { private boolean enabled; Attributes are accessed via getters/setters private long scanInterval; private long numFiles; public void getNumberOfFiles( { return numFiles; ... © C2B2 Consulting Limited 2013 All Rights Reserved
  • 28. Register with MBeanServer • Create (or get hold of) an instance of your MBean implementation • Get hold of an MBean Server – PlatformMBeanServer • Create an ObjectName for your MBean • Register the MBean © C2B2 Consulting Limited 2013 All Rights Reserved
  • 29. Register with MBeanServer public static void main(String[] args) throws Exception Get the MBean Server { MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); ObjectName name = new Create the ObjectName ObjectName(“uk.co.c2b2.management:type=LocationMonitor"); Create the MBean instance LocationMonitor mbean = new LocationMonitor(); mbs.registerMBean(mbean, name); Register it } © C2B2 Consulting Limited 2013 All Rights Reserved
  • 30. What to monitor • Resources that your application uses – Including data (flow rates etc) • Expose management operations – Restarting components – Re-loading configuration files © C2B2 Consulting Limited 2013 All Rights Reserved
  • 31. What is through the JMX window? • A future with more Information • A future with more control © C2B2 Consulting Limited 2013 All Rights Reserved
  • 32. QUESTIONS? © C2B2 Consulting Limited 2013 All Rights Reserved