Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
The Java and the Furious (JMX)
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Yeray Darias
November 18, 2016
Programming
2
560
The Java and the Furious (JMX)
Talk given at Codemotion 2016 in Madrid about how to measure (Java) code speed and health with JMX.
Yeray Darias
November 18, 2016
Tweet
Share
More Decks by Yeray Darias
See All by Yeray Darias
Ingeniería vs Product: Una historia de (des)amor
ydarias
0
94
Comunicarse en tiempos de remoto
ydarias
0
340
No Code vs Code
ydarias
0
38
12 Factor Applications
ydarias
2
150
Evolutionary Architectures
ydarias
1
270
Microservices lightningtalk
ydarias
1
360
BetaBeers Salamanca
ydarias
1
210
Runnics at ProductHunt Madrid
ydarias
0
220
Otogami at Tetuan Valley
ydarias
0
82
Other Decks in Programming
See All in Programming
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
260
2026-03-27 #terminalnight 変数展開とコマンド展開でターミナル作業をスマートにする方法
masasuzu
0
180
脱 雰囲気実装!AgentCoreを良い感じにWEBアプリケーションに組み込むために
takuyay0ne
3
400
How to stabilize UI tests using XCTest
akkeylab
0
140
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
1.1k
Fundamentals of Software Engineering In the Age of AI
therealdanvega
2
290
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1.3k
Feature Toggle は捨てやすく使おう
gennei
0
360
Goの型安全性で実現する複数プロダクトの権限管理
ishikawa_pro
2
1.4k
Smarter Angular mit Transformers.js & Prompt API
christianliebel
PRO
1
100
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
1.2k
Mastering Event Sourcing: Your Parents Holidayed in Yugoslavia
super_marek
0
120
Featured
See All Featured
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
220
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
250
Darren the Foodie - Storyboard
khoart
PRO
3
3k
First, design no harm
axbom
PRO
2
1.1k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.5k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
110k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
130
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
440
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
270
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Navigating Team Friction
lara
192
16k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
200
Transcript
The JAVA and the FURIOUS Talk by Yeray Darias at
Codemotion in Madrid on Friday, 18 November 2016
The JAVA and the FURIOUS Cómo medir la velocidad de
tu código Java con JMX
JMX Java Management eXtensions
None
@ydarias Yeray Darias SOFTWARE DEVELOPER
[email protected]
• 35YO • BSc Computer Science • Agile evangelist •
Cook • Science geek • Future space rocket builder • Sketchnoting practitioner Yeray Darias
Let’s start
None
None
What is JMX?
JMX manage Web Browser MBean Server MBean MBean MBean JVM
Agent level Instrumentation level Services level
JMX manage Web Browser MBean Server MBean MBean MBean JVM
Agent level Instrumentation level Services level
What is JMX?
What is JMX for?
Monitoring
Manage
None
JMX manager Web Browser MBean Server MBean MBean MBean JVM
Instrumentation Level
Define the interface public interface SystemStatsMBean { public long getTotalWrites();
public long setTimeout(long timeout); }
Implement the interface public class SystemStats implements SystemStatsMBean { public
long getTotalWrites() { … } public void setTimeout(long timeout) { … } }
Register MBean SystemStats systemStats = new SystemStats(metrics, configuration); MBeanServer
beansServer = ManagementFactory.getPlatformMBeanServer(); ObjectName beanName = new ObjectName(“…”); beansServer.registerMBean( systemStats, beanName);
Launch & connect
Where is the f·$%& demo?
Good practices defining MBeans Good practices
None
No way
Single responsibility principle Don’t mix your “core” with instrumentation code.
It is a lot of work, isn’t it?
None
Demo time
JMX manager Web Browser MBean Server MBean MBean MBean JVM
Services Level
The “official” options
None
None
None
The “unofficial” options
None
None
None
Tons of options
The options “ultra pro”
The options “expensive”
None
None
None
None
The “craftsman” option
Connect to the server JMXServiceURL url = new JMXServiceURL(…); JMXConnector
connector = JMXConnectorFactory.connect(url); MBeanServerConnection serverConnection = connector.getMBeanServerConnection();
Search the MBean ObjectName mbeanName = new ObjectName(…); SystemStatsMBean statsProxy
= MBeanServerInvocationHandler.newProxyInstance( serverConnection, mbeanName, SystemStatsMBean.class, true);
None
Last demo Last demo
This is all?
Interesting links http://bit.ly/codemotion2016-links
Slides Speaker Deck http://bit.ly/codemotion2016-slides
Q & A