Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

13
LINES

< > BotCompany Repo | #1024217 // openJ9_diagnosticsBean

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (1624L/11K).

1  
import javax.management.MBeanServer;
2  
import java.lang.management.ManagementFactory;
3  
import javax.management.ObjectName;
4  
import javax.management.JMX;
5  
6  
static virtual OpenJ9DiagnosticsMXBean openJ9_diagnosticsBean() ctex {
7  
  Class beanClass = classForNameOpt("openj9.lang.management.OpenJ9DiagnosticsMXBean");
8  
  if (beanClass == null) null; // Not on OpenJ9
9  
  ObjectName mxbeanName = new("openj9.lang.management:type=OpenJ9Diagnostics");
10  
  MBeanServer mbeanServer = ManagementFactory.getPlatformMBeanServer();
11  
  if (!mbeanServer.isRegistered(mxbeanName)) null;
12  
  ret JMX.newMXBeanProxy(mbeanServer, mxbeanName, beanClass);
13  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1024217
Snippet name: openJ9_diagnosticsBean
Eternal ID of this version: #1024217/4
Text MD5: 70696b4097c336b60fa29918a3166f79
Transpilation MD5: c06be18e6d23fa5011fa30fc4a75aded
Author: stefan
Category: javax / management
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-07-26 15:57:56
Source code size: 634 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 214 / 310
Version history: 3 change(s)
Referenced in: [show references]