Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 911196 Details for
Bug 1112032
"ChannelBusyException: Too many open outbound writes" when using concurrent JMX connections
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
reproducer
JmxSpammer.java (text/x-java), 1.71 KB, created by
James Livingston
on 2014-06-22 22:40:40 UTC
(
hide
)
Description:
reproducer
Filename:
MIME Type:
Creator:
James Livingston
Created:
2014-06-22 22:40:40 UTC
Size:
1.71 KB
patch
obsolete
>package jmxspammer; > >import java.util.HashMap; > >import javax.management.MBeanServerConnection; >import javax.management.ObjectName; >import javax.management.remote.JMXConnector; >import javax.management.remote.JMXConnectorFactory; >import javax.management.remote.JMXServiceURL; > >public class JmxSpammer { > static final int COUNT = 100; > static final int ITERATIONS = 1000; > > public static void main(String[] args) throws Exception { > JMXServiceURL url = new JMXServiceURL("service:jmx:remoting-jmx://localhost:9999"); > JMXConnector jmxc = JMXConnectorFactory.connect(url, new HashMap()); > final MBeanServerConnection mbeanServerConn = jmxc.getMBeanServerConnection(); > > final ObjectName on = new ObjectName("java.lang:type=Runtime"); > > Thread[] threads = new Thread[COUNT]; > for (int i = 0; i < COUNT; i++) { > threads[i] = new Thread(new Spammer(i, mbeanServerConn, on)); > threads[i].start(); > } > > for (int i = 0; i < COUNT; i++) { > threads[i].join(); > } > } > > static class Spammer implements Runnable { > final int thread; > final MBeanServerConnection conn; > final ObjectName name; > > public Spammer(int thread, MBeanServerConnection conn, ObjectName name) { > this.thread = thread; > this.conn = conn; > this.name = name; > } > > public void run() { > try { > for (int i = 0; i < ITERATIONS; i++) { > //System.out.println(thread + "/" + i); > conn.getAttribute(name, "SpecVersion"); > } > } catch (Exception e) { > throw new RuntimeException(e); > } > } > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1112032
: 911196