|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
JMX Example (for use with Jconsole) |
« View previous topic :: View next topic » |
Author |
Message
|
lancelotlinc |
Posted: Thu Jun 07, 2012 5:00 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
mqjeff |
Posted: Thu Jun 07, 2012 5:46 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
lancelotlinc wrote: |
All WMB language nodes |
That doesn't help with a FileOutput node...
Or necessarily a .NETCompute node - yes, sure, one could use J++... but if all you have in house is VB.NET programmers, even
lancelotlinc wrote: |
Use the source code at the top of this thread to create your JMX interface. Then follow the JMX tutorial: |
is probably too much to ask.
JMX is great. Unless you're not using JMX for anything anywhere else. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Thu Jun 07, 2012 5:55 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
mqjeff, you have some valid points.
Business requirements should at all times drive source code implementation. Developers should not implement something just because its cool.
Singleton/JMX is one way to implement an inter-process (ie. inter-DataflowEngine; inter-ExecutionGroup) cache mechanism. The advantage here is the technology has been around for a long time, runs flawlessly out-of-the-box, and requires no license. There is added value in seeing the statistics of the WMB JVM in real time. An alternate way to do this would be using solidDb.
In my last 2,200 work hours, about ten were used to implement the JMX cache. Its simple, easy to use, and light-weight: doesn't get in the way of the real mission, which is to collect money from customers. YMMV. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
chicagozer |
Posted: Fri Jun 08, 2012 7:48 am Post subject: |
|
|
 Newbie
Joined: 08 Jun 2012 Posts: 2 Location: Foster City, CA
|
Interesting topic.
Our use for JMX centers around dynamically changing the log levels. java.util.logging has a JMX Bean out of the box, so it's just a matter of enabling JMX via the VM arguments. No need for anything fancy (so far).
Lance, have you looked at using an agent class (-javaagent) for instantiating your JMX server? I think this might be a little cleaner.
Jim |
|
Back to top |
|
 |
nanotech |
Posted: Mon Nov 05, 2012 11:28 am Post subject: |
|
|
Novice
Joined: 29 May 2009 Posts: 15
|
Hi Lance,
I am trying out JMX inside a JCN in Message Broker( 7.0.0.4 ). I did some reading on this topic and also looked the sample code you provided. I started jconsole to see if I can attach jconsole to my EG's pid, but when jconsole starts up it does not show my EG's pid . I am running jconsole and MessageBroker on the same box.
To Get my EG's pid I did
ps -elf | grep DataFlowEngine.
Any thoughts on this ?
I read online ( http://www.javalobby.org/java/forums/t49130.html ) that
Code: |
To make an application visible to JConsole, simply add this JVM argument to the startup:
-Dcom.sun.management.jmxremote |
My question is :
1. Why is JConsole not able to see EG ?
2. Do I need the above statement ? If yes, where do I put that statement when I start Broker / EG , or should I set it in IBM_JAVA_OPTIONS ? |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Sep 24, 2013 8:52 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
nanotech wrote: |
Hi Lance,
I am trying out JMX inside a JCN in Message Broker( 7.0.0.4 ). I did some reading on this topic and also looked the sample code you provided. I started jconsole to see if I can attach jconsole to my EG's pid, but when jconsole starts up it does not show my EG's pid . I am running jconsole and MessageBroker on the same box.
To Get my EG's pid I did
ps -elf | grep DataFlowEngine.
Any thoughts on this ?
I read online ( http://www.javalobby.org/java/forums/t49130.html ) that
Code: |
To make an application visible to JConsole, simply add this JVM argument to the startup:
-Dcom.sun.management.jmxremote |
My question is :
1. Why is JConsole not able to see EG ?
2. Do I need the above statement ? If yes, where do I put that statement when I start Broker / EG , or should I set it in IBM_JAVA_OPTIONS ? |
I'm not sure why you are unable to connect to your JMX instance. I've had no difficulty using Jconsole or other JMX-enabled consoles. One thing to check is the firewall. If you are on Linux, especially Fedora or Red Hat, you need to open the ports being used, which includes the JMX port and the catalog port. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Sep 24, 2013 8:53 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
chicagozer wrote: |
Interesting topic.
Our use for JMX centers around dynamically changing the log levels. java.util.logging has a JMX Bean out of the box, so it's just a matter of enabling JMX via the VM arguments. No need for anything fancy (so far).
Lance, have you looked at using an agent class (-javaagent) for instantiating your JMX server? I think this might be a little cleaner.
Jim |
Thanks ! I'll look at the agent option. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|