Could not get hibernate jmx bean to show in mc4j in weblogic
I followed example in petclinic but I could not get jmx bean to show up in mc4j console using weblogic 8.1. In my configuration there are 3 instances and the instance in which I am running the spring app is the port referenced below (not admin. Should it be admin). In addition I could find no way to see mbean from weblogic console.
I'd appreciate any ideas on what to try next.
Code:
<!-- Hibernate 3.0's JMX statistics service -->
<!-- Implements the StatisticsServiceMBean management interface -->
<bean name="XXX:name=hibernateStatistics" class="org.hibernate.jmx.StatisticsService">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<!-- ========================= JMX EXPORTER DEFINITION ========================= -->
<!--
- Exporter that exposes Hibernate 3.0's statistics service via JMX.
- Autodetects the statistics service, which is a standard MBean,
- using its bean name as JMX object name.
-
- By default, the standard MBeanServerFactory.findMBeanServer method will be used
- to determine the MBeanServer. Unfortunately, this does not work on WebLogic <= 8.1:
- you need to comment in the WebLogicMBeanServerFactoryBean definition on WebLogic,
- specifying appropriate configuration values there.
-->
<bean id="jmxExporter" class="org.springframework.jmx.export.MBeanExporter">
<property name="autodetect" value="true"/>
<!-- Comment the following in on WebLogic <= 8.1, which doesn't support -->
<!-- the standard MBeanServerFactory.findMBeanServer lookup mechanism. -->
<property name="server">
<bean class="org.springframework.jmx.support.WebLogicMBeanServerFactoryBean">
<property name="username" value="weblogic"/>
<property name="password" value="xxx"/>
<property name="serverUrl" value="t3://xxx:60501"/>
<property name="serverName" value="XXXXX"/>
</bean>
</property>
</bean>