PDA

View Full Version : Testing JMX with Spring 1.2/Weblogic 8.1/MC4J 1.2



sbhatti
Dec 13th, 2005, 01:38 PM
I am using Spring 1.2.1 with Weblogic 8.1.5 and Java 1.4.2 to export a few MBeans from spring configuration file as:
<bean id="myMBean" class="com...." singleton="true">
</bean>


<bean id="exporter" class="org.springframework.jmx.export.MBeanExporter">
<property name="beans">
<map>
<entry key="bean:name=myNameMBean" value-ref="myMBean"/>
</map>
</property>

<property name="server">
<bean class="org.springframework.jmx.support.WebLogicMBeanServe rFactoryBean">
<property name="username"><value>weblogic</value></property>
<property name="password"><value>weblogic</value></property>
<property name="serverName"><value>localhost</value></property>
<property name="serverUrl"><value>t3://localhost:9001/</value></property>
</bean>
</property>
</bean>

However, when I point MC4J1.2 beta9 to t3://localhost:9001, I don't see
them. All I see under MBean category are following categories:
JMImplementation:
Security:
WeblogicManagement:
odp (name of our J2EE/EJB app):
weblogic:

I checked mbeans in each of above category but didn't see mine mbeans. Also, can I specify my own category so that it's easy to find my mbeans.

Thanks in advance.

Costin Leau
Dec 14th, 2005, 07:13 AM
Inject the server you declare to the exporter - otherwise the exporter will try to detect the server by itself and if not it will create one. Most likely you don't see your beans because they are registered with a different mbean server.

sbhatti
Dec 14th, 2005, 10:04 AM
But server property is already injected in exporter. Am I missing anything?

Costin Leau
Dec 14th, 2005, 12:00 PM
I misread your email - I thought the server was defined separately. Try to do the following though:
1. disable lazy-loading on beans
2. if 1. doesn't work enable logging on the jmx package and if you can on weblogic to see what happens, if the server is actually started and where is it registered.