ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » JMX Example (for use with Jconsole)

Post new topic  Reply to topic Goto page Previous  1, 2
 JMX Example (for use with Jconsole) « View previous topic :: View next topic » 
Author Message
lancelotlinc
PostPosted: Thu Jun 07, 2012 5:00 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

All WMB language nodes have the ability to call out to a Java resource. Here are articles that explain how this is done:

http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.etools.mft.doc/ak04960_.htm

http://publib.boulder.ibm.com/infocenter/ieduasst/v1r1m0/index.jsp?topic=/com.ibm.iea.wmb_v6/wmb/6.0/ApplicationDevelopment/ESQL_Capabilities/Ext_Functions_Java/player.html

http://www.ibm.com/developerworks/websphere/library/techarticles/0803_shen/0803_shen.html


Use the source code at the top of this thread to create your JMX interface. Then follow the JMX tutorial:

http://docs.oracle.com/javase/tutorial/jmx/index.html
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Thu Jun 07, 2012 5:46 am    Post subject: Reply with quote

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
View user's profile Send private message
lancelotlinc
PostPosted: Thu Jun 07, 2012 5:55 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
chicagozer
PostPosted: Fri Jun 08, 2012 7:48 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
nanotech
PostPosted: Mon Nov 05, 2012 11:28 am    Post subject: Reply with quote

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
View user's profile Send private message
lancelotlinc
PostPosted: Tue Sep 24, 2013 8:52 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
lancelotlinc
PostPosted: Tue Sep 24, 2013 8:53 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » JMX Example (for use with Jconsole)
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.