|
From: Scott B. <sco...@ru...> - 2005-02-22 20:06:43
|
Is there a sample of the JMX stuff in CVS anywhere? I tried following the Wiki document but it seems out of date. Thanks -Scott |
|
From: Rob H. <ro...@ca...> - 2005-02-22 20:15:53
|
Scott, Once the 1.1.5 release is done, I'll be putting the JMX docs into CVS. I have some stuff in Word and Costin Leau is finishing it up and will probably translate it into DocBook. Rob Scott Battaglia wrote: > Is there a sample of the JMX stuff in CVS anywhere? I tried following > the Wiki document but it seems out of date. > > Thanks > -Scott > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > |
|
From: Scott B. <sco...@ru...> - 2005-02-22 20:26:43
|
Rob, Okay, I'll look for them after the 1.1.5 release then! In the mean time are any of the test cases a good kind of guide to follow? I'm not too familar with JMX so I'm learning JMX and trying to figure out the Spring support at the same time (probably not a good combination). Thanks -Scott Rob Harrop wrote: > Scott, > > Once the 1.1.5 release is done, I'll be putting the JMX docs into CVS. > I have some stuff in Word and Costin Leau is finishing it up and will > probably translate it into DocBook. > > Rob > > Scott Battaglia wrote: > >> Is there a sample of the JMX stuff in CVS anywhere? I tried >> following the Wiki document but it seems out of date. >> >> Thanks >> -Scott >> >> >> ------------------------------------------------------- >> SF email is sponsored by - The IT Product Guide >> Read honest & candid reviews on hundreds of IT Products from real users. >> Discover which products truly live up to the hype. Start reading now. >> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >> _______________________________________________ >> Springframework-developer mailing list >> Spr...@li... >> https://lists.sourceforge.net/lists/listinfo/springframework-developer >> >> > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: <tho...@tr...> - 2005-02-22 21:04:16
|
Craig Walls JMX blog entry might get you started - http://www.jroller.com/page/habuma/20040812 Thomas Quoting Scott Battaglia <sco...@ru...>: > Rob, > > Okay, I'll look for them after the 1.1.5 release then! In the mean time > are any of the test cases a good kind of guide to follow? I'm not too > familar with JMX so I'm learning JMX and trying to figure out the Spring > support at the same time (probably not a good combination). > > Thanks > -Scott > > Rob Harrop wrote: > > > Scott, > > > > Once the 1.1.5 release is done, I'll be putting the JMX docs into CVS. > > I have some stuff in Word and Costin Leau is finishing it up and will > > probably translate it into DocBook. > > > > Rob > > > > Scott Battaglia wrote: > > > >> Is there a sample of the JMX stuff in CVS anywhere? I tried > >> following the Wiki document but it seems out of date. > >> > >> Thanks > >> -Scott > >> > >> > >> ------------------------------------------------------- > >> SF email is sponsored by - The IT Product Guide > >> Read honest & candid reviews on hundreds of IT Products from real users. > >> Discover which products truly live up to the hype. Start reading now. > >> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > >> _______________________________________________ > >> Springframework-developer mailing list > >> Spr...@li... > >> https://lists.sourceforge.net/lists/listinfo/springframework-developer > >> > >> > > > > > > ------------------------------------------------------- > > SF email is sponsored by - The IT Product Guide > > Read honest & candid reviews on hundreds of IT Products from real users. > > Discover which products truly live up to the hype. Start reading now. > > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > > _______________________________________________ > > Springframework-developer mailing list > > Spr...@li... > > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > |
|
From: Michael S. <mi...@sc...> - 2005-02-22 21:48:03
|
On Tuesday 22 February 2005 21:26, Scott Battaglia wrote:
> Okay, I'll look for them after the 1.1.5 release then! In the mean
> time are any of the test cases a good kind of guide to follow? I'm
> not too familar with JMX so I'm learning JMX and trying to figure out
> the Spring support at the same time (probably not a good
> combination).
If all you want to do is expose a Spring bean as an MBean it's actually=20
pretty easy and doesn't require any code.
Create an MBeanServer registered as a bean
=A0 <bean id=3D"mbeanserver"
=A0 =A0class=3D"org.springframework.jmx.factory.MBeanServerFactoryBean">
=A0 =A0 <property name=3D"defaultDomain"><value>MyDomain</value></propert=
y>
=A0 </bean>
Wrap an MBean adapter around my repositorymanager bean (not shown),=20
which is a completely ordinary java object. In this case, public=20
methods are exposed as attributes/operations. Alternatively, metadata =A0
can be used.
=A0 <bean id=3D"mbeanadapter"
=A0 =A0class=3D"org.springframework.jmx.JmxMBeanAdapter">
=A0 =A0 <property name=3D"server"><ref local=3D"mbeanserver"/></property>
=A0 =A0 <property name=3D"beans">
=A0 =A0 =A0 <map>
=A0 =A0 =A0 =A0 <entry key=3D"MyDomain:id=3DRepository">
=A0 =A0 =A0 =A0 =A0 <ref bean=3D"repositorymanager"/>
=A0 =A0 =A0 =A0 </entry>
=A0 =A0 =A0 </map>
=A0 =A0 </property>
=A0 </bean>
Create a connector listening, by default, on=20
service:jmx:jmxmp://localhost:9876 (this requires=20
jmxremote_optional.jar)
<bean id=3D"jmxconnector"
class=3D"org.springframework.jmx.support.ConnectorServerFactoryBean">
<property name=3D"server">
<ref local=3D"mbeanserver" />
</property>
<!-- This is the default URL anyway -->
<property name=3D"serviceUrl">
<value>service:jmx:jmxmp://localhost:9876</value>
</property>
<property name=3D"threaded">
<value>true</value>
</property>
<!-- Ensure the connector thread doesn't keep the
servlet container running -->
<property name=3D"daemon">
<value>true</value>
</property>
</bean>
HTH,
Michael
--=20
Michael Schuerig Face reality and stare it down
mailto:mi...@sc... --Jethro Tull, Silver River Turning
http://www.schuerig.de/michael/
|
|
From: Scott B. <sco...@ru...> - 2005-02-23 05:05:37
|
Just in case any one else is looking at the example Michael provided,
not only is JmxMBeanAdapter renamed to MBeanExporter, the
MBeanServerFactoryBean is located under support not factory (found that
out the hard way ;-))
Michael, Thomas or Rob. Have you guys seen this error in relation to
the JMX support?:
Feb 23, 2005 12:01:07 AM GenericConnectorServer ClientCreation.run
WARNING: Failed to open connection: java.io.StreamCorruptedException:
invalid st
ream header
java.io.StreamCorruptedException: invalid stream header
at
java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:737
)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:253)
at
com.sun.jmx.remote.socket.SocketConnection$ObjectInputStreamWithLoade
r.<init>(SocketConnection.java:354)
at
com.sun.jmx.remote.socket.SocketConnection.readMessage(SocketConnecti
on.java:204)
at
com.sun.jmx.remote.opt.security.AdminServer.connectionOpen(AdminServe
r.java:76)
at
com.sun.jmx.remote.generic.ServerSynchroMessageConnectionImpl.connect
(ServerSynchroMessageConnectionImpl.java:51)
at
javax.management.remote.generic.GenericConnectorServer$ClientCreation
.run(GenericConnectorServer.java:383)
at
com.sun.jmx.remote.opt.util.ThreadService$ThreadServiceJob.run(Thread
Service.java:208)
at com.sun.jmx.remote.opt.util.JobExecutor.run(JobExecutor.java:59)
I got this on Tomcat 5.0.27 and 5.0.30-beta. I tried to connect using
jconsole in JDK 5 and connecting to a remote server of localhost:9876 (I
also tried on port 10,000)
Thanks
Scott Battaglia
Application Developer, Architecture and Engineering Team
Enterprise Systems and Services, Rutgers University
v: 732.445.0097 | f: 732.445.5493 | sco...@ru...
Michael Schuerig wrote:
>On Tuesday 22 February 2005 21:26, Scott Battaglia wrote:
>
>
>
>>Okay, I'll look for them after the 1.1.5 release then! In the mean
>>time are any of the test cases a good kind of guide to follow? I'm
>>not too familar with JMX so I'm learning JMX and trying to figure out
>>the Spring support at the same time (probably not a good
>>combination).
>>
>>
>
>If all you want to do is expose a Spring bean as an MBean it's actually
>pretty easy and doesn't require any code.
>
>Create an MBeanServer registered as a bean
>
> <bean id="mbeanserver"
> class="org.springframework.jmx.factory.MBeanServerFactoryBean">
> <property name="defaultDomain"><value>MyDomain</value></property>
> </bean>
>
>Wrap an MBean adapter around my repositorymanager bean (not shown),
>which is a completely ordinary java object. In this case, public
>methods are exposed as attributes/operations. Alternatively, metadata
>can be used.
>
> <bean id="mbeanadapter"
> class="org.springframework.jmx.JmxMBeanAdapter">
> <property name="server"><ref local="mbeanserver"/></property>
> <property name="beans">
> <map>
> <entry key="MyDomain:id=Repository">
> <ref bean="repositorymanager"/>
> </entry>
> </map>
> </property>
> </bean>
>
>Create a connector listening, by default, on
>service:jmx:jmxmp://localhost:9876 (this requires
>jmxremote_optional.jar)
>
> <bean id="jmxconnector"
> class="org.springframework.jmx.support.ConnectorServerFactoryBean">
> <property name="server">
> <ref local="mbeanserver" />
> </property>
> <!-- This is the default URL anyway -->
> <property name="serviceUrl">
> <value>service:jmx:jmxmp://localhost:9876</value>
> </property>
> <property name="threaded">
> <value>true</value>
> </property>
> <!-- Ensure the connector thread doesn't keep the
> servlet container running -->
> <property name="daemon">
> <value>true</value>
> </property>
> </bean>
>
>
>HTH,
>Michael
>
>
>
|
|
From: Rob H. <ro...@ca...> - 2005-02-23 09:47:39
|
Scott, A lot of the class names and package names changed. I have uploaded a PDF of the work in progress docs to the Wiki. Be aware that it is still quite rough, but it should give you a good idea of what is going on. With your error, what protocol are you using to connect to the MBeanServer? Rob Scott Battaglia wrote: > Just in case any one else is looking at the example Michael provided, > not only is JmxMBeanAdapter renamed to MBeanExporter, the > MBeanServerFactoryBean is located under support not factory (found > that out the hard way ;-)) > > Michael, Thomas or Rob. Have you guys seen this error in relation to > the JMX support?: > Feb 23, 2005 12:01:07 AM GenericConnectorServer ClientCreation.run > WARNING: Failed to open connection: java.io.StreamCorruptedException: > invalid st > ream header > java.io.StreamCorruptedException: invalid stream header > at > java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:737 > ) > at java.io.ObjectInputStream.<init>(ObjectInputStream.java:253) > at > com.sun.jmx.remote.socket.SocketConnection$ObjectInputStreamWithLoade > r.<init>(SocketConnection.java:354) > at > com.sun.jmx.remote.socket.SocketConnection.readMessage(SocketConnecti > on.java:204) > at > com.sun.jmx.remote.opt.security.AdminServer.connectionOpen(AdminServe > r.java:76) > at > com.sun.jmx.remote.generic.ServerSynchroMessageConnectionImpl.connect > (ServerSynchroMessageConnectionImpl.java:51) > at > javax.management.remote.generic.GenericConnectorServer$ClientCreation > .run(GenericConnectorServer.java:383) > at > com.sun.jmx.remote.opt.util.ThreadService$ThreadServiceJob.run(Thread > Service.java:208) > at > com.sun.jmx.remote.opt.util.JobExecutor.run(JobExecutor.java:59) > > I got this on Tomcat 5.0.27 and 5.0.30-beta. I tried to connect using > jconsole in JDK 5 and connecting to a remote server of localhost:9876 > (I also tried on port 10,000) > > Thanks > > Scott Battaglia > Application Developer, Architecture and Engineering Team > Enterprise Systems and Services, Rutgers University > v: 732.445.0097 | f: 732.445.5493 | sco...@ru... > > > > Michael Schuerig wrote: > >> On Tuesday 22 February 2005 21:26, Scott Battaglia wrote: >> >> >> >>> Okay, I'll look for them after the 1.1.5 release then! In the mean >>> time are any of the test cases a good kind of guide to follow? I'm >>> not too familar with JMX so I'm learning JMX and trying to figure out >>> the Spring support at the same time (probably not a good >>> combination). >>> >> >> >> If all you want to do is expose a Spring bean as an MBean it's >> actually pretty easy and doesn't require any code. >> >> Create an MBeanServer registered as a bean >> >> <bean id="mbeanserver" >> class="org.springframework.jmx.factory.MBeanServerFactoryBean"> >> <property name="defaultDomain"><value>MyDomain</value></property> >> </bean> >> >> Wrap an MBean adapter around my repositorymanager bean (not shown), >> which is a completely ordinary java object. In this case, public >> methods are exposed as attributes/operations. Alternatively, >> metadata can be used. >> >> <bean id="mbeanadapter" >> class="org.springframework.jmx.JmxMBeanAdapter"> >> <property name="server"><ref local="mbeanserver"/></property> >> <property name="beans"> >> <map> >> <entry key="MyDomain:id=Repository"> >> <ref bean="repositorymanager"/> >> </entry> >> </map> >> </property> >> </bean> >> >> Create a connector listening, by default, on >> service:jmx:jmxmp://localhost:9876 (this requires >> jmxremote_optional.jar) >> >> <bean id="jmxconnector" >> class="org.springframework.jmx.support.ConnectorServerFactoryBean"> >> <property name="server"> >> <ref local="mbeanserver" /> >> </property> >> <!-- This is the default URL anyway --> >> <property name="serviceUrl"> >> <value>service:jmx:jmxmp://localhost:9876</value> >> </property> >> <property name="threaded"> >> <value>true</value> >> </property> >> <!-- Ensure the connector thread doesn't keep the >> servlet container running --> >> <property name="daemon"> >> <value>true</value> >> </property> >> </bean> >> >> >> HTH, >> Michael >> >> >> > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > |
|
From: Scott B. <sco...@ru...> - 2005-02-28 04:23:09
|
Rob, Thanks for the PDF. :-) I got the error to go away by connecting with MC4J (I was trying to use jconsole to connect localhost:9876 but that didn't work). I found an interesting thing (that in hindsight is pretty obvious): you can't expose with Commons Attributes any bean you've proxied. It obviously (again in hindsight) can't find the attributes. Thanks -Scott Rob Harrop wrote: > Scott, > > A lot of the class names and package names changed. I have uploaded a > PDF of the work in progress docs to the Wiki. Be aware that it is > still quite rough, but it should give you a good idea of what is going > on. > > With your error, what protocol are you using to connect to the > MBeanServer? > > Rob > > Scott Battaglia wrote: > >> Just in case any one else is looking at the example Michael provided, >> not only is JmxMBeanAdapter renamed to MBeanExporter, the >> MBeanServerFactoryBean is located under support not factory (found >> that out the hard way ;-)) >> >> Michael, Thomas or Rob. Have you guys seen this error in relation to >> the JMX support?: >> Feb 23, 2005 12:01:07 AM GenericConnectorServer ClientCreation.run >> WARNING: Failed to open connection: java.io.StreamCorruptedException: >> invalid st >> ream header >> java.io.StreamCorruptedException: invalid stream header >> at >> java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:737 >> ) >> at java.io.ObjectInputStream.<init>(ObjectInputStream.java:253) >> at >> com.sun.jmx.remote.socket.SocketConnection$ObjectInputStreamWithLoade >> r.<init>(SocketConnection.java:354) >> at >> com.sun.jmx.remote.socket.SocketConnection.readMessage(SocketConnecti >> on.java:204) >> at >> com.sun.jmx.remote.opt.security.AdminServer.connectionOpen(AdminServe >> r.java:76) >> at >> com.sun.jmx.remote.generic.ServerSynchroMessageConnectionImpl.connect >> (ServerSynchroMessageConnectionImpl.java:51) >> at >> javax.management.remote.generic.GenericConnectorServer$ClientCreation >> .run(GenericConnectorServer.java:383) >> at >> com.sun.jmx.remote.opt.util.ThreadService$ThreadServiceJob.run(Thread >> Service.java:208) >> at >> com.sun.jmx.remote.opt.util.JobExecutor.run(JobExecutor.java:59) >> >> I got this on Tomcat 5.0.27 and 5.0.30-beta. I tried to connect >> using jconsole in JDK 5 and connecting to a remote server of >> localhost:9876 (I also tried on port 10,000) >> >> Thanks >> >> Scott Battaglia >> Application Developer, Architecture and Engineering Team >> Enterprise Systems and Services, Rutgers University >> v: 732.445.0097 | f: 732.445.5493 | sco...@ru... >> >> >> >> Michael Schuerig wrote: >> >>> On Tuesday 22 February 2005 21:26, Scott Battaglia wrote: >>> >>> >>> >>>> Okay, I'll look for them after the 1.1.5 release then! In the mean >>>> time are any of the test cases a good kind of guide to follow? I'm >>>> not too familar with JMX so I'm learning JMX and trying to figure out >>>> the Spring support at the same time (probably not a good >>>> combination). >>>> >>> >>> >>> >>> If all you want to do is expose a Spring bean as an MBean it's >>> actually pretty easy and doesn't require any code. >>> >>> Create an MBeanServer registered as a bean >>> >>> <bean id="mbeanserver" >>> class="org.springframework.jmx.factory.MBeanServerFactoryBean"> >>> <property name="defaultDomain"><value>MyDomain</value></property> >>> </bean> >>> >>> Wrap an MBean adapter around my repositorymanager bean (not shown), >>> which is a completely ordinary java object. In this case, public >>> methods are exposed as attributes/operations. Alternatively, >>> metadata can be used. >>> >>> <bean id="mbeanadapter" >>> class="org.springframework.jmx.JmxMBeanAdapter"> >>> <property name="server"><ref local="mbeanserver"/></property> >>> <property name="beans"> >>> <map> >>> <entry key="MyDomain:id=Repository"> >>> <ref bean="repositorymanager"/> >>> </entry> >>> </map> >>> </property> >>> </bean> >>> >>> Create a connector listening, by default, on >>> service:jmx:jmxmp://localhost:9876 (this requires >>> jmxremote_optional.jar) >>> >>> <bean id="jmxconnector" >>> class="org.springframework.jmx.support.ConnectorServerFactoryBean"> >>> <property name="server"> >>> <ref local="mbeanserver" /> >>> </property> >>> <!-- This is the default URL anyway --> >>> <property name="serviceUrl"> >>> <value>service:jmx:jmxmp://localhost:9876</value> >>> </property> >>> <property name="threaded"> >>> <value>true</value> >>> </property> >>> <!-- Ensure the connector thread doesn't keep the >>> servlet container running --> >>> <property name="daemon"> >>> <value>true</value> >>> </property> >>> </bean> >>> >>> >>> HTH, >>> Michael >>> >>> >>> >> >> >> ------------------------------------------------------- >> SF email is sponsored by - The IT Product Guide >> Read honest & candid reviews on hundreds of IT Products from real users. >> Discover which products truly live up to the hype. Start reading now. >> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >> _______________________________________________ >> Springframework-developer mailing list >> Spr...@li... >> https://lists.sourceforge.net/lists/listinfo/springframework-developer >> >> > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Rob H. <ro...@ca...> - 2005-02-28 09:28:56
|
Scott, The reason you can't connect with jconsole, I think, is to do with the default protocol used - jmxmp, which is not supported. I'm going to change this today. I will add logic to detect a proxy and look for attributes on the superclass so that you can use Commons Attributes with a proxy. Rob Scott Battaglia wrote: > Rob, > > Thanks for the PDF. :-) I got the error to go away by connecting with > MC4J (I was trying to use jconsole to connect localhost:9876 but that > didn't work). > > I found an interesting thing (that in hindsight is pretty obvious): > you can't expose with Commons Attributes any bean you've proxied. It > obviously (again in hindsight) can't find the attributes. > > Thanks > > -Scott > > > > Rob Harrop wrote: > >> Scott, >> >> A lot of the class names and package names changed. I have uploaded a >> PDF of the work in progress docs to the Wiki. Be aware that it is >> still quite rough, but it should give you a good idea of what is >> going on. >> >> With your error, what protocol are you using to connect to the >> MBeanServer? >> >> Rob >> >> Scott Battaglia wrote: >> >>> Just in case any one else is looking at the example Michael >>> provided, not only is JmxMBeanAdapter renamed to MBeanExporter, the >>> MBeanServerFactoryBean is located under support not factory (found >>> that out the hard way ;-)) >>> >>> Michael, Thomas or Rob. Have you guys seen this error in relation >>> to the JMX support?: >>> Feb 23, 2005 12:01:07 AM GenericConnectorServer ClientCreation.run >>> WARNING: Failed to open connection: >>> java.io.StreamCorruptedException: invalid st >>> ream header >>> java.io.StreamCorruptedException: invalid stream header >>> at >>> java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:737 >>> ) >>> at java.io.ObjectInputStream.<init>(ObjectInputStream.java:253) >>> at >>> com.sun.jmx.remote.socket.SocketConnection$ObjectInputStreamWithLoade >>> r.<init>(SocketConnection.java:354) >>> at >>> com.sun.jmx.remote.socket.SocketConnection.readMessage(SocketConnecti >>> on.java:204) >>> at >>> com.sun.jmx.remote.opt.security.AdminServer.connectionOpen(AdminServe >>> r.java:76) >>> at >>> com.sun.jmx.remote.generic.ServerSynchroMessageConnectionImpl.connect >>> (ServerSynchroMessageConnectionImpl.java:51) >>> at >>> javax.management.remote.generic.GenericConnectorServer$ClientCreation >>> .run(GenericConnectorServer.java:383) >>> at >>> com.sun.jmx.remote.opt.util.ThreadService$ThreadServiceJob.run(Thread >>> Service.java:208) >>> at >>> com.sun.jmx.remote.opt.util.JobExecutor.run(JobExecutor.java:59) >>> >>> I got this on Tomcat 5.0.27 and 5.0.30-beta. I tried to connect >>> using jconsole in JDK 5 and connecting to a remote server of >>> localhost:9876 (I also tried on port 10,000) >>> >>> Thanks >>> >>> Scott Battaglia >>> Application Developer, Architecture and Engineering Team >>> Enterprise Systems and Services, Rutgers University >>> v: 732.445.0097 | f: 732.445.5493 | sco...@ru... >>> >>> >>> >>> Michael Schuerig wrote: >>> >>>> On Tuesday 22 February 2005 21:26, Scott Battaglia wrote: >>>> >>>> >>>> >>>>> Okay, I'll look for them after the 1.1.5 release then! In the mean >>>>> time are any of the test cases a good kind of guide to follow? I'm >>>>> not too familar with JMX so I'm learning JMX and trying to figure out >>>>> the Spring support at the same time (probably not a good >>>>> combination). >>>>> >>>> >>>> >>>> >>>> >>>> If all you want to do is expose a Spring bean as an MBean it's >>>> actually pretty easy and doesn't require any code. >>>> >>>> Create an MBeanServer registered as a bean >>>> >>>> <bean id="mbeanserver" >>>> class="org.springframework.jmx.factory.MBeanServerFactoryBean"> >>>> <property name="defaultDomain"><value>MyDomain</value></property> >>>> </bean> >>>> >>>> Wrap an MBean adapter around my repositorymanager bean (not shown), >>>> which is a completely ordinary java object. In this case, public >>>> methods are exposed as attributes/operations. Alternatively, >>>> metadata can be used. >>>> >>>> <bean id="mbeanadapter" >>>> class="org.springframework.jmx.JmxMBeanAdapter"> >>>> <property name="server"><ref local="mbeanserver"/></property> >>>> <property name="beans"> >>>> <map> >>>> <entry key="MyDomain:id=Repository"> >>>> <ref bean="repositorymanager"/> >>>> </entry> >>>> </map> >>>> </property> >>>> </bean> >>>> >>>> Create a connector listening, by default, on >>>> service:jmx:jmxmp://localhost:9876 (this requires >>>> jmxremote_optional.jar) >>>> >>>> <bean id="jmxconnector" >>>> class="org.springframework.jmx.support.ConnectorServerFactoryBean"> >>>> <property name="server"> >>>> <ref local="mbeanserver" /> >>>> </property> >>>> <!-- This is the default URL anyway --> >>>> <property name="serviceUrl"> >>>> <value>service:jmx:jmxmp://localhost:9876</value> >>>> </property> >>>> <property name="threaded"> >>>> <value>true</value> >>>> </property> >>>> <!-- Ensure the connector thread doesn't keep the >>>> servlet container running --> >>>> <property name="daemon"> >>>> <value>true</value> >>>> </property> >>>> </bean> >>>> >>>> >>>> HTH, >>>> Michael >>>> >>>> >>>> >>> >>> >>> ------------------------------------------------------- >>> SF email is sponsored by - The IT Product Guide >>> Read honest & candid reviews on hundreds of IT Products from real >>> users. >>> Discover which products truly live up to the hype. Start reading now. >>> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >>> _______________________________________________ >>> Springframework-developer mailing list >>> Spr...@li... >>> https://lists.sourceforge.net/lists/listinfo/springframework-developer >>> >>> >> >> >> ------------------------------------------------------- >> SF email is sponsored by - The IT Product Guide >> Read honest & candid reviews on hundreds of IT Products from real users. >> Discover which products truly live up to the hype. Start reading now. >> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >> _______________________________________________ >> Springframework-developer mailing list >> Spr...@li... >> https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > |
|
From: Rob H. <ro...@ca...> - 2005-02-28 11:59:43
|
After looking to changing the default protocol I realised it might be a problem for testing since we need to have a JNDI server or similar lookup service available to be able to do so. I'll stick with the JMXMP protocol as the default but you might want to change it in your application. Rob Rob Harrop wrote: > Scott, > > The reason you can't connect with jconsole, I think, is to do with the > default protocol used - jmxmp, which is not supported. I'm going to > change this today. > > I will add logic to detect a proxy and look for attributes on the > superclass so that you can use Commons Attributes with a proxy. > > Rob > > Scott Battaglia wrote: > >> Rob, >> >> Thanks for the PDF. :-) I got the error to go away by connecting >> with MC4J (I was trying to use jconsole to connect localhost:9876 but >> that didn't work). >> >> I found an interesting thing (that in hindsight is pretty obvious): >> you can't expose with Commons Attributes any bean you've proxied. It >> obviously (again in hindsight) can't find the attributes. >> >> Thanks >> >> -Scott >> >> >> >> Rob Harrop wrote: >> >>> Scott, >>> >>> A lot of the class names and package names changed. I have uploaded >>> a PDF of the work in progress docs to the Wiki. Be aware that it is >>> still quite rough, but it should give you a good idea of what is >>> going on. >>> >>> With your error, what protocol are you using to connect to the >>> MBeanServer? >>> >>> Rob >>> >>> Scott Battaglia wrote: >>> >>>> Just in case any one else is looking at the example Michael >>>> provided, not only is JmxMBeanAdapter renamed to MBeanExporter, the >>>> MBeanServerFactoryBean is located under support not factory (found >>>> that out the hard way ;-)) >>>> >>>> Michael, Thomas or Rob. Have you guys seen this error in relation >>>> to the JMX support?: >>>> Feb 23, 2005 12:01:07 AM GenericConnectorServer ClientCreation.run >>>> WARNING: Failed to open connection: >>>> java.io.StreamCorruptedException: invalid st >>>> ream header >>>> java.io.StreamCorruptedException: invalid stream header >>>> at >>>> java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:737 >>>> ) >>>> at java.io.ObjectInputStream.<init>(ObjectInputStream.java:253) >>>> at >>>> com.sun.jmx.remote.socket.SocketConnection$ObjectInputStreamWithLoade >>>> r.<init>(SocketConnection.java:354) >>>> at >>>> com.sun.jmx.remote.socket.SocketConnection.readMessage(SocketConnecti >>>> on.java:204) >>>> at >>>> com.sun.jmx.remote.opt.security.AdminServer.connectionOpen(AdminServe >>>> r.java:76) >>>> at >>>> com.sun.jmx.remote.generic.ServerSynchroMessageConnectionImpl.connect >>>> (ServerSynchroMessageConnectionImpl.java:51) >>>> at >>>> javax.management.remote.generic.GenericConnectorServer$ClientCreation >>>> .run(GenericConnectorServer.java:383) >>>> at >>>> com.sun.jmx.remote.opt.util.ThreadService$ThreadServiceJob.run(Thread >>>> Service.java:208) >>>> at >>>> com.sun.jmx.remote.opt.util.JobExecutor.run(JobExecutor.java:59) >>>> >>>> I got this on Tomcat 5.0.27 and 5.0.30-beta. I tried to connect >>>> using jconsole in JDK 5 and connecting to a remote server of >>>> localhost:9876 (I also tried on port 10,000) >>>> >>>> Thanks >>>> >>>> Scott Battaglia >>>> Application Developer, Architecture and Engineering Team >>>> Enterprise Systems and Services, Rutgers University >>>> v: 732.445.0097 | f: 732.445.5493 | sco...@ru... >>>> >>>> >>>> >>>> Michael Schuerig wrote: >>>> >>>>> On Tuesday 22 February 2005 21:26, Scott Battaglia wrote: >>>>> >>>>> >>>>> >>>>>> Okay, I'll look for them after the 1.1.5 release then! In the mean >>>>>> time are any of the test cases a good kind of guide to follow? I'm >>>>>> not too familar with JMX so I'm learning JMX and trying to figure >>>>>> out >>>>>> the Spring support at the same time (probably not a good >>>>>> combination). >>>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> If all you want to do is expose a Spring bean as an MBean it's >>>>> actually pretty easy and doesn't require any code. >>>>> >>>>> Create an MBeanServer registered as a bean >>>>> >>>>> <bean id="mbeanserver" >>>>> class="org.springframework.jmx.factory.MBeanServerFactoryBean"> >>>>> <property name="defaultDomain"><value>MyDomain</value></property> >>>>> </bean> >>>>> >>>>> Wrap an MBean adapter around my repositorymanager bean (not >>>>> shown), which is a completely ordinary java object. In this case, >>>>> public methods are exposed as attributes/operations. >>>>> Alternatively, metadata can be used. >>>>> >>>>> <bean id="mbeanadapter" >>>>> class="org.springframework.jmx.JmxMBeanAdapter"> >>>>> <property name="server"><ref local="mbeanserver"/></property> >>>>> <property name="beans"> >>>>> <map> >>>>> <entry key="MyDomain:id=Repository"> >>>>> <ref bean="repositorymanager"/> >>>>> </entry> >>>>> </map> >>>>> </property> >>>>> </bean> >>>>> >>>>> Create a connector listening, by default, on >>>>> service:jmx:jmxmp://localhost:9876 (this requires >>>>> jmxremote_optional.jar) >>>>> >>>>> <bean id="jmxconnector" >>>>> >>>>> class="org.springframework.jmx.support.ConnectorServerFactoryBean"> >>>>> <property name="server"> >>>>> <ref local="mbeanserver" /> >>>>> </property> >>>>> <!-- This is the default URL anyway --> >>>>> <property name="serviceUrl"> >>>>> <value>service:jmx:jmxmp://localhost:9876</value> >>>>> </property> >>>>> <property name="threaded"> >>>>> <value>true</value> >>>>> </property> >>>>> <!-- Ensure the connector thread doesn't keep the >>>>> servlet container running --> >>>>> <property name="daemon"> >>>>> <value>true</value> >>>>> </property> >>>>> </bean> >>>>> >>>>> >>>>> HTH, >>>>> Michael >>>>> >>>>> >>>>> >>>> >>>> >>>> ------------------------------------------------------- >>>> SF email is sponsored by - The IT Product Guide >>>> Read honest & candid reviews on hundreds of IT Products from real >>>> users. >>>> Discover which products truly live up to the hype. Start reading now. >>>> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >>>> _______________________________________________ >>>> Springframework-developer mailing list >>>> Spr...@li... >>>> https://lists.sourceforge.net/lists/listinfo/springframework-developer >>>> >>>> >>> >>> >>> ------------------------------------------------------- >>> SF email is sponsored by - The IT Product Guide >>> Read honest & candid reviews on hundreds of IT Products from real >>> users. >>> Discover which products truly live up to the hype. Start reading now. >>> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >>> _______________________________________________ >>> Springframework-developer mailing list >>> Spr...@li... >>> https://lists.sourceforge.net/lists/listinfo/springframework-developer >> >> >> >> >> >> ------------------------------------------------------- >> SF email is sponsored by - The IT Product Guide >> Read honest & candid reviews on hundreds of IT Products from real users. >> Discover which products truly live up to the hype. Start reading now. >> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >> _______________________________________________ >> Springframework-developer mailing list >> Spr...@li... >> https://lists.sourceforge.net/lists/listinfo/springframework-developer >> >> > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > |
|
From: Scott B. <sco...@ru...> - 2005-02-22 21:59:16
|
Mike, Thomas, Those are perfect resources. Thanks! Maybe the Wiki can be updated with this information for anyone else looking for it? I'm assuming the MBeanAdapter is the MBeanExporter? Thanks -Scott Michael Schuerig wrote: >On Tuesday 22 February 2005 21:26, Scott Battaglia wrote: > > > >>Okay, I'll look for them after the 1.1.5 release then! In the mean >>time are any of the test cases a good kind of guide to follow? I'm >>not too familar with JMX so I'm learning JMX and trying to figure out >>the Spring support at the same time (probably not a good >>combination). >> >> > >If all you want to do is expose a Spring bean as an MBean it's actually >pretty easy and doesn't require any code. > >Create an MBeanServer registered as a bean > > <bean id="mbeanserver" > class="org.springframework.jmx.factory.MBeanServerFactoryBean"> > <property name="defaultDomain"><value>MyDomain</value></property> > </bean> > >Wrap an MBean adapter around my repositorymanager bean (not shown), >which is a completely ordinary java object. In this case, public >methods are exposed as attributes/operations. Alternatively, metadata >can be used. > > <bean id="mbeanadapter" > class="org.springframework.jmx.JmxMBeanAdapter"> > <property name="server"><ref local="mbeanserver"/></property> > <property name="beans"> > <map> > <entry key="MyDomain:id=Repository"> > <ref bean="repositorymanager"/> > </entry> > </map> > </property> > </bean> > >Create a connector listening, by default, on >service:jmx:jmxmp://localhost:9876 (this requires >jmxremote_optional.jar) > > <bean id="jmxconnector" > class="org.springframework.jmx.support.ConnectorServerFactoryBean"> > <property name="server"> > <ref local="mbeanserver" /> > </property> > <!-- This is the default URL anyway --> > <property name="serviceUrl"> > <value>service:jmx:jmxmp://localhost:9876</value> > </property> > <property name="threaded"> > <value>true</value> > </property> > <!-- Ensure the connector thread doesn't keep the > servlet container running --> > <property name="daemon"> > <value>true</value> > </property> > </bean> > > >HTH, >Michael > > > |
|
From: Dmitriy K. <dko...@ru...> - 2005-02-22 22:09:12
|
> > > I'm assuming the MBeanAdapter is the MBeanExporter? > I believe so. I think Juergen refactored it 'MBeanAdapter -> MBeanExporter' Dmitriy. |
|
From: Scott B. <sco...@ru...> - 2005-02-28 13:06:36
|
I'll just still with MC4J to connect. It seems to work pretty well anyway. Thanks Scott Rob Harrop wrote: > After looking to changing the default protocol I realised it might be > a problem for testing since we need to have a JNDI server or similar > lookup service available to be able to do so. I'll stick with the > JMXMP protocol as the default but you might want to change it in your > application. > > Rob > > Rob Harrop wrote: > >> Scott, >> >> The reason you can't connect with jconsole, I think, is to do with >> the default protocol used - jmxmp, which is not supported. I'm going >> to change this today. >> >> I will add logic to detect a proxy and look for attributes on the >> superclass so that you can use Commons Attributes with a proxy. >> >> Rob >> >> Scott Battaglia wrote: >> >>> Rob, >>> >>> Thanks for the PDF. :-) I got the error to go away by connecting >>> with MC4J (I was trying to use jconsole to connect localhost:9876 >>> but that didn't work). >>> >>> I found an interesting thing (that in hindsight is pretty obvious): >>> you can't expose with Commons Attributes any bean you've proxied. >>> It obviously (again in hindsight) can't find the attributes. >>> >>> Thanks >>> >>> -Scott >>> >>> >>> >>> Rob Harrop wrote: >>> >>>> Scott, >>>> >>>> A lot of the class names and package names changed. I have uploaded >>>> a PDF of the work in progress docs to the Wiki. Be aware that it is >>>> still quite rough, but it should give you a good idea of what is >>>> going on. >>>> >>>> With your error, what protocol are you using to connect to the >>>> MBeanServer? >>>> >>>> Rob >>>> >>>> Scott Battaglia wrote: >>>> >>>>> Just in case any one else is looking at the example Michael >>>>> provided, not only is JmxMBeanAdapter renamed to MBeanExporter, >>>>> the MBeanServerFactoryBean is located under support not factory >>>>> (found that out the hard way ;-)) >>>>> >>>>> Michael, Thomas or Rob. Have you guys seen this error in relation >>>>> to the JMX support?: >>>>> Feb 23, 2005 12:01:07 AM GenericConnectorServer ClientCreation.run >>>>> WARNING: Failed to open connection: >>>>> java.io.StreamCorruptedException: invalid st >>>>> ream header >>>>> java.io.StreamCorruptedException: invalid stream header >>>>> at >>>>> java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:737 >>>>> ) >>>>> at >>>>> java.io.ObjectInputStream.<init>(ObjectInputStream.java:253) >>>>> at >>>>> com.sun.jmx.remote.socket.SocketConnection$ObjectInputStreamWithLoade >>>>> r.<init>(SocketConnection.java:354) >>>>> at >>>>> com.sun.jmx.remote.socket.SocketConnection.readMessage(SocketConnecti >>>>> on.java:204) >>>>> at >>>>> com.sun.jmx.remote.opt.security.AdminServer.connectionOpen(AdminServe >>>>> r.java:76) >>>>> at >>>>> com.sun.jmx.remote.generic.ServerSynchroMessageConnectionImpl.connect >>>>> (ServerSynchroMessageConnectionImpl.java:51) >>>>> at >>>>> javax.management.remote.generic.GenericConnectorServer$ClientCreation >>>>> .run(GenericConnectorServer.java:383) >>>>> at >>>>> com.sun.jmx.remote.opt.util.ThreadService$ThreadServiceJob.run(Thread >>>>> Service.java:208) >>>>> at >>>>> com.sun.jmx.remote.opt.util.JobExecutor.run(JobExecutor.java:59) >>>>> >>>>> I got this on Tomcat 5.0.27 and 5.0.30-beta. I tried to connect >>>>> using jconsole in JDK 5 and connecting to a remote server of >>>>> localhost:9876 (I also tried on port 10,000) >>>>> >>>>> Thanks >>>>> >>>>> Scott Battaglia >>>>> Application Developer, Architecture and Engineering Team >>>>> Enterprise Systems and Services, Rutgers University >>>>> v: 732.445.0097 | f: 732.445.5493 | sco...@ru... >>>>> >>>>> >>>>> >>>>> Michael Schuerig wrote: >>>>> >>>>>> On Tuesday 22 February 2005 21:26, Scott Battaglia wrote: >>>>>> >>>>>> >>>>>> >>>>>>> Okay, I'll look for them after the 1.1.5 release then! In the mean >>>>>>> time are any of the test cases a good kind of guide to follow? I'm >>>>>>> not too familar with JMX so I'm learning JMX and trying to >>>>>>> figure out >>>>>>> the Spring support at the same time (probably not a good >>>>>>> combination). >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> If all you want to do is expose a Spring bean as an MBean it's >>>>>> actually pretty easy and doesn't require any code. >>>>>> >>>>>> Create an MBeanServer registered as a bean >>>>>> >>>>>> <bean id="mbeanserver" >>>>>> class="org.springframework.jmx.factory.MBeanServerFactoryBean"> >>>>>> <property name="defaultDomain"><value>MyDomain</value></property> >>>>>> </bean> >>>>>> >>>>>> Wrap an MBean adapter around my repositorymanager bean (not >>>>>> shown), which is a completely ordinary java object. In this case, >>>>>> public methods are exposed as attributes/operations. >>>>>> Alternatively, metadata can be used. >>>>>> >>>>>> <bean id="mbeanadapter" >>>>>> class="org.springframework.jmx.JmxMBeanAdapter"> >>>>>> <property name="server"><ref local="mbeanserver"/></property> >>>>>> <property name="beans"> >>>>>> <map> >>>>>> <entry key="MyDomain:id=Repository"> >>>>>> <ref bean="repositorymanager"/> >>>>>> </entry> >>>>>> </map> >>>>>> </property> >>>>>> </bean> >>>>>> >>>>>> Create a connector listening, by default, on >>>>>> service:jmx:jmxmp://localhost:9876 (this requires >>>>>> jmxremote_optional.jar) >>>>>> >>>>>> <bean id="jmxconnector" >>>>>> >>>>>> class="org.springframework.jmx.support.ConnectorServerFactoryBean"> >>>>>> <property name="server"> >>>>>> <ref local="mbeanserver" /> >>>>>> </property> >>>>>> <!-- This is the default URL anyway --> >>>>>> <property name="serviceUrl"> >>>>>> <value>service:jmx:jmxmp://localhost:9876</value> >>>>>> </property> >>>>>> <property name="threaded"> >>>>>> <value>true</value> >>>>>> </property> >>>>>> <!-- Ensure the connector thread doesn't keep the >>>>>> servlet container running --> >>>>>> <property name="daemon"> >>>>>> <value>true</value> >>>>>> </property> >>>>>> </bean> >>>>>> >>>>>> >>>>>> HTH, >>>>>> Michael >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> ------------------------------------------------------- >>>>> SF email is sponsored by - The IT Product Guide >>>>> Read honest & candid reviews on hundreds of IT Products from real >>>>> users. >>>>> Discover which products truly live up to the hype. Start reading now. >>>>> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >>>>> _______________________________________________ >>>>> Springframework-developer mailing list >>>>> Spr...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/springframework-developer >>>>> >>>>> >>>>> >>>> >>>> >>>> ------------------------------------------------------- >>>> SF email is sponsored by - The IT Product Guide >>>> Read honest & candid reviews on hundreds of IT Products from real >>>> users. >>>> Discover which products truly live up to the hype. Start reading now. >>>> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >>>> _______________________________________________ >>>> Springframework-developer mailing list >>>> Spr...@li... >>>> https://lists.sourceforge.net/lists/listinfo/springframework-developer >>> >>> >>> >>> >>> >>> >>> ------------------------------------------------------- >>> SF email is sponsored by - The IT Product Guide >>> Read honest & candid reviews on hundreds of IT Products from real >>> users. >>> Discover which products truly live up to the hype. Start reading now. >>> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >>> _______________________________________________ >>> Springframework-developer mailing list >>> Spr...@li... >>> https://lists.sourceforge.net/lists/listinfo/springframework-developer >>> >>> >> >> >> ------------------------------------------------------- >> SF email is sponsored by - The IT Product Guide >> Read honest & candid reviews on hundreds of IT Products from real users. >> Discover which products truly live up to the hype. Start reading now. >> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >> _______________________________________________ >> Springframework-developer mailing list >> Spr...@li... >> https://lists.sourceforge.net/lists/listinfo/springframework-developer >> >> > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Scott B. <sco...@ru...> - 2005-02-28 13:08:03
|
Rob Harrop wrote: > I will add logic to detect a proxy and look for attributes on the > superclass so that you can use Commons Attributes with a proxy. Thanks Rob! -Scott |