<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: 5 Minute Guide to Spring and JMX</title>
	<atom:link href="http://www.mularien.com/blog/2007/11/09/5-minute-guide-to-spring-and-jmx/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mularien.com/blog/2007/11/09/5-minute-guide-to-spring-and-jmx/</link>
	<description>Notes by Peter Mularien on Hibernate, Spring, CSS, Java, etc.</description>
	<lastBuildDate>Tue, 27 Jul 2010 22:22:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Richard</title>
		<link>http://www.mularien.com/blog/2007/11/09/5-minute-guide-to-spring-and-jmx/comment-page-1/#comment-23587</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Thu, 11 Feb 2010 11:43:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.mularien.com/blog/2007/11/09/5-minute-guide-to-spring-and-jmx/#comment-23587</guid>
		<description>Thanks for this example. I found I needed to do a couple of other things before I could get Tomcat, Eclipse, Spring and JMX to all work together. Anyone having problems getting set up may find this link useful, plus the following page on the same site:

http://www.bigsoft.co.uk/blog/index.php/2009/01/19/allow-remote-jmx-management-for-tomcat</description>
		<content:encoded><![CDATA[<p>Thanks for this example. I found I needed to do a couple of other things before I could get Tomcat, Eclipse, Spring and JMX to all work together. Anyone having problems getting set up may find this link useful, plus the following page on the same site:</p>
<p><a href="http://www.bigsoft.co.uk/blog/index.php/2009/01/19/allow-remote-jmx-management-for-tomcat" rel="nofollow">http://www.bigsoft.co.uk/blog/index.php/2009/01/19/allow-remote-jmx-management-for-tomcat</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Spring</title>
		<link>http://www.mularien.com/blog/2007/11/09/5-minute-guide-to-spring-and-jmx/comment-page-1/#comment-20885</link>
		<dc:creator>Spring</dc:creator>
		<pubDate>Thu, 26 Nov 2009 09:42:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.mularien.com/blog/2007/11/09/5-minute-guide-to-spring-and-jmx/#comment-20885</guid>
		<description>many thanks for this tutorial, I have follow this tutorial step by step but I can not see my bean in JConsole even when I lauch tomcat with option -Dcom.sun.management.jmxremote, on my logs I see that the bean was registered but I can not see it on JConsole, I am using JDk6, Tomcat 6:

 here is the log:
10:20:09.250  INFO   org.springframework.jmx.export.MBeanExporter  - Registering beans for JMX exposure on startup
10:20:09.250  DEBUG  org.springframework.jmx.export.MBeanExporter  - Autodetecting user-defined JMX MBeans
10:20:09.265  DEBUG  ngframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1  - Finished creating instance of bean &#039;exporter&#039;
10:20:09.265  DEBUG  org.springframework.beans.factory.support.AbstractBeanFactory  - Returning cached instance of singleton bean &#039;attributeSource&#039;
10:20:09.265  DEBUG  org.springframework.beans.factory.support.AbstractBeanFactory  - Returning cached instance of singleton bean &#039;assembler&#039;
10:20:09.265  DEBUG  org.springframework.beans.factory.support.AbstractBeanFactory  - Returning cached instance of singleton bean &#039;namingStrategy&#039;


Any one has an idea on the problem

thank you in advance</description>
		<content:encoded><![CDATA[<p>many thanks for this tutorial, I have follow this tutorial step by step but I can not see my bean in JConsole even when I lauch tomcat with option -Dcom.sun.management.jmxremote, on my logs I see that the bean was registered but I can not see it on JConsole, I am using JDk6, Tomcat 6:</p>
<p> here is the log:<br />
10:20:09.250  INFO   org.springframework.jmx.export.MBeanExporter  &#8211; Registering beans for JMX exposure on startup<br />
10:20:09.250  DEBUG  org.springframework.jmx.export.MBeanExporter  &#8211; Autodetecting user-defined JMX MBeans<br />
10:20:09.265  DEBUG  ngframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1  &#8211; Finished creating instance of bean &#8216;exporter&#8217;<br />
10:20:09.265  DEBUG  org.springframework.beans.factory.support.AbstractBeanFactory  &#8211; Returning cached instance of singleton bean &#8216;attributeSource&#8217;<br />
10:20:09.265  DEBUG  org.springframework.beans.factory.support.AbstractBeanFactory  &#8211; Returning cached instance of singleton bean &#8216;assembler&#8217;<br />
10:20:09.265  DEBUG  org.springframework.beans.factory.support.AbstractBeanFactory  &#8211; Returning cached instance of singleton bean &#8216;namingStrategy&#8217;</p>
<p>Any one has an idea on the problem</p>
<p>thank you in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DGN</title>
		<link>http://www.mularien.com/blog/2007/11/09/5-minute-guide-to-spring-and-jmx/comment-page-1/#comment-18897</link>
		<dc:creator>DGN</dc:creator>
		<pubDate>Fri, 11 Sep 2009 16:05:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.mularien.com/blog/2007/11/09/5-minute-guide-to-spring-and-jmx/#comment-18897</guid>
		<description>Excellent tutorial. Got it working on Tomcat6 with a project that already had Spring integrated. Just created a simple bean class, added annotations, and was able to access it with JConsole. However, a couple of things not mentioned above that may be of help:

1) Per Tomcat documentation on JMX added the following to CATALINA_OPTS environment setting:

set CATALINA_OPTS=&quot;-Dcom.sun.management.jmxremote \
    -Dcom.sun.management.jmxremote.port=%my.jmx.port% \
    -Dcom.sun.management.jmxremote.ssl=false \
    -Dcom.sun.management.jmxremote.authenticate=false&quot;

For %my.jmx.port% I set an arbitrary value of 22222. (Pick your own favorite number.)
see: http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html

2) When starting JConsole I used the Remote Process (not local) and used the URL:
service:jmx:rmi:///jndi/rmi://localhost:22222/jmxrmi</description>
		<content:encoded><![CDATA[<p>Excellent tutorial. Got it working on Tomcat6 with a project that already had Spring integrated. Just created a simple bean class, added annotations, and was able to access it with JConsole. However, a couple of things not mentioned above that may be of help:</p>
<p>1) Per Tomcat documentation on JMX added the following to CATALINA_OPTS environment setting:</p>
<p>set CATALINA_OPTS=&#8221;-Dcom.sun.management.jmxremote \<br />
    -Dcom.sun.management.jmxremote.port=%my.jmx.port% \<br />
    -Dcom.sun.management.jmxremote.ssl=false \<br />
    -Dcom.sun.management.jmxremote.authenticate=false&#8221;</p>
<p>For %my.jmx.port% I set an arbitrary value of 22222. (Pick your own favorite number.)<br />
see: <a href="http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html" rel="nofollow">http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html</a></p>
<p>2) When starting JConsole I used the Remote Process (not local) and used the URL:<br />
service:jmx:rmi:///jndi/rmi://localhost:22222/jmxrmi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AWied</title>
		<link>http://www.mularien.com/blog/2007/11/09/5-minute-guide-to-spring-and-jmx/comment-page-1/#comment-18809</link>
		<dc:creator>AWied</dc:creator>
		<pubDate>Tue, 08 Sep 2009 15:34:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.mularien.com/blog/2007/11/09/5-minute-guide-to-spring-and-jmx/#comment-18809</guid>
		<description>W00t! That was the easiest JMX integration ever. Thanks Peter!

FYI - This is working with Spring 2.5.6 and JBossAS 5.0</description>
		<content:encoded><![CDATA[<p>W00t! That was the easiest JMX integration ever. Thanks Peter!</p>
<p>FYI &#8211; This is working with Spring 2.5.6 and JBossAS 5.0</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rodrigo</title>
		<link>http://www.mularien.com/blog/2007/11/09/5-minute-guide-to-spring-and-jmx/comment-page-1/#comment-18664</link>
		<dc:creator>Rodrigo</dc:creator>
		<pubDate>Wed, 02 Sep 2009 17:09:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.mularien.com/blog/2007/11/09/5-minute-guide-to-spring-and-jmx/#comment-18664</guid>
		<description>Hi.

Unfortunately, I could not get this example to work with JBOSS. I did everything in this guide, but the mbean did not appear in jmx-console.

Regards,

Rodrigo.</description>
		<content:encoded><![CDATA[<p>Hi.</p>
<p>Unfortunately, I could not get this example to work with JBOSS. I did everything in this guide, but the mbean did not appear in jmx-console.</p>
<p>Regards,</p>
<p>Rodrigo.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tore</title>
		<link>http://www.mularien.com/blog/2007/11/09/5-minute-guide-to-spring-and-jmx/comment-page-1/#comment-14336</link>
		<dc:creator>tore</dc:creator>
		<pubDate>Tue, 09 Jun 2009 10:55:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.mularien.com/blog/2007/11/09/5-minute-guide-to-spring-and-jmx/#comment-14336</guid>
		<description>If you add @Component to your class SimpleBean, all you need in your Spring XML config file is this:
&lt;code&gt;
  	&lt;context:component-scan base-package=&quot;com.whatever.jmx&quot; /&gt;
        &lt;context:mbean-export/&gt;
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>If you add @Component to your class SimpleBean, all you need in your Spring XML config file is this:<br />
<pre><code>&lt;context:component-scan base-package="com.whatever.jmx" /&gt;
        &lt;context:mbean-export/&gt;</code></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: yujia</title>
		<link>http://www.mularien.com/blog/2007/11/09/5-minute-guide-to-spring-and-jmx/comment-page-1/#comment-8353</link>
		<dc:creator>yujia</dc:creator>
		<pubDate>Wed, 25 Feb 2009 22:00:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.mularien.com/blog/2007/11/09/5-minute-guide-to-spring-and-jmx/#comment-8353</guid>
		<description>Just to add that it is important to use -Dcom.sun.management.jmxremote when you start tomcat, even if you are using Java 6. Otherwise you may not see your mbeans in jconsole. It seems that if -Dcom.sun.management.jmxremote is not specified, Tomcat will use its own mbean server rather then the platform mbean server.</description>
		<content:encoded><![CDATA[<p>Just to add that it is important to use -Dcom.sun.management.jmxremote when you start tomcat, even if you are using Java 6. Otherwise you may not see your mbeans in jconsole. It seems that if -Dcom.sun.management.jmxremote is not specified, Tomcat will use its own mbean server rather then the platform mbean server.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Goman</title>
		<link>http://www.mularien.com/blog/2007/11/09/5-minute-guide-to-spring-and-jmx/comment-page-1/#comment-7857</link>
		<dc:creator>Goman</dc:creator>
		<pubDate>Fri, 06 Feb 2009 09:08:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.mularien.com/blog/2007/11/09/5-minute-guide-to-spring-and-jmx/#comment-7857</guid>
		<description>Thank your very much. Nice work. 

i want to add additional information for those of you running JVM with non US settings(mine is tr(turkey)).
Starting spring application without -Duser.language=en -Duser.region=US parameters you will get the following error messages in jconsole and will not connect the JVM. so i suggest adding these parameters.

java.lang.reflect.UndeclaredThrowableException
	at $Proxy1.getVmName(Unknown Source)
	at sun.tools.jconsole.SummaryTab.formatSummary(SummaryTab.java:133)
	at sun.tools.jconsole.SummaryTab$1.doInBackground(SummaryTab.java:74)
	at sun.tools.jconsole.SummaryTab$1.doInBackground(SummaryTab.java:72)
	at javax.swing.SwingWorker$1.call(SwingWorker.java:278)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at javax.swing.SwingWorker.run(SwingWorker.java:317)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
	at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.IOException: The client has been closed.
	at com.sun.jmx.remote.internal.ClientCommunicatorAdmin.restart(ClientCommunicatorAdmin.java:74)
	at com.sun.jmx.remote.internal.ClientCommunicatorAdmin.gotIOException(ClientCommunicatorAdmin.java:34)
	at javax.management.remote.rmi.RMIConnector$RMIClientCommunicatorAdmin.gotIOException(RMIConnector.java:1422)
	at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.getAttributes(RMIConnector.java:893)
	at sun.tools.jconsole.ProxyClient$SnapshotInvocationHandler.getCachedAttributes(ProxyClient.java:1038)
	at sun.tools.jconsole.ProxyClient$SnapshotInvocationHandler.getAttribute(ProxyClient.java:997)
	at sun.tools.jconsole.ProxyClient$SnapshotInvocationHandler.invoke(ProxyClient.java:979)
	at $Proxy0.getAttribute(Unknown Source)
	at com.sun.jmx.mbeanserver.MXBeanProxy$GetHandler.invoke(MXBeanProxy.java:106)
	at com.sun.jmx.mbeanserver.MXBeanProxy.invoke(MXBeanProxy.java:148)
	at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:248)
	... 11 more</description>
		<content:encoded><![CDATA[<p>Thank your very much. Nice work. </p>
<p>i want to add additional information for those of you running JVM with non US settings(mine is tr(turkey)).<br />
Starting spring application without -Duser.language=en -Duser.region=US parameters you will get the following error messages in jconsole and will not connect the JVM. so i suggest adding these parameters.</p>
<p>java.lang.reflect.UndeclaredThrowableException<br />
	at $Proxy1.getVmName(Unknown Source)<br />
	at sun.tools.jconsole.SummaryTab.formatSummary(SummaryTab.java:133)<br />
	at sun.tools.jconsole.SummaryTab$1.doInBackground(SummaryTab.java:74)<br />
	at sun.tools.jconsole.SummaryTab$1.doInBackground(SummaryTab.java:72)<br />
	at javax.swing.SwingWorker$1.call(SwingWorker.java:278)<br />
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)<br />
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)<br />
	at javax.swing.SwingWorker.run(SwingWorker.java:317)<br />
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)<br />
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)<br />
	at java.lang.Thread.run(Thread.java:619)<br />
Caused by: java.io.IOException: The client has been closed.<br />
	at com.sun.jmx.remote.internal.ClientCommunicatorAdmin.restart(ClientCommunicatorAdmin.java:74)<br />
	at com.sun.jmx.remote.internal.ClientCommunicatorAdmin.gotIOException(ClientCommunicatorAdmin.java:34)<br />
	at javax.management.remote.rmi.RMIConnector$RMIClientCommunicatorAdmin.gotIOException(RMIConnector.java:1422)<br />
	at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.getAttributes(RMIConnector.java:893)<br />
	at sun.tools.jconsole.ProxyClient$SnapshotInvocationHandler.getCachedAttributes(ProxyClient.java:1038)<br />
	at sun.tools.jconsole.ProxyClient$SnapshotInvocationHandler.getAttribute(ProxyClient.java:997)<br />
	at sun.tools.jconsole.ProxyClient$SnapshotInvocationHandler.invoke(ProxyClient.java:979)<br />
	at $Proxy0.getAttribute(Unknown Source)<br />
	at com.sun.jmx.mbeanserver.MXBeanProxy$GetHandler.invoke(MXBeanProxy.java:106)<br />
	at com.sun.jmx.mbeanserver.MXBeanProxy.invoke(MXBeanProxy.java:148)<br />
	at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:248)<br />
	&#8230; 11 more</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pmularien</title>
		<link>http://www.mularien.com/blog/2007/11/09/5-minute-guide-to-spring-and-jmx/comment-page-1/#comment-5976</link>
		<dc:creator>pmularien</dc:creator>
		<pubDate>Fri, 05 Dec 2008 19:37:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.mularien.com/blog/2007/11/09/5-minute-guide-to-spring-and-jmx/#comment-5976</guid>
		<description>@Mark

What in particular are you looking for?

Peter</description>
		<content:encoded><![CDATA[<p>@Mark</p>
<p>What in particular are you looking for?</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://www.mularien.com/blog/2007/11/09/5-minute-guide-to-spring-and-jmx/comment-page-1/#comment-5975</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Fri, 05 Dec 2008 19:31:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.mularien.com/blog/2007/11/09/5-minute-guide-to-spring-and-jmx/#comment-5975</guid>
		<description>This example is incomplete. Doesn&#039;t help much. You should include a complete example.</description>
		<content:encoded><![CDATA[<p>This example is incomplete. Doesn&#8217;t help much. You should include a complete example.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
