0 Replies Latest reply: Jan 12, 2012 5:35 AM by 800839 RSS

    Weblogic with Spring Hibernate JMX

    800839
      Hi,


      I am trying enable Spring Hibernate Statics JMX in weblogic server.

      In spring applicationContext.xml, i have the following code:-

      <bean id="statisticsBean" class="org.hibernate.jmx.StatisticsService">
      <property name="statisticsEnabled">
      <value>true</value>
      </property>
      <property name="sessionFactory"><ref local="sessionFactory"/></property>
      </bean>

      <bean id="mbeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean">
      <property name="locateExistingServerIfPossible" value="true" />
      </bean>

      <bean id="jmxExporter" class="org.springframework.jmx.export.MBeanExporter"
      lazy-init="false">
      <property name="server" ref="mbeanServer" />
      <property name="registrationBehaviorName" value="REGISTRATION_REPLACE_EXISTING"/>
      <property name="beans">
      <map>
      <entry key="yourkey:name=hibernateStatistics" value-ref="statisticsBean" />
      </map>
      </property>
      </bean>


      In weblogic startWeblogic.cmd , i have the below:-

      set JAVA_OPTIONS=%SAVE_JAVA_OPTIONS%-Dcom.sun.management.jmxremote
      -Dcom.sun.management.jmxremote.port=8006
      -Dcom.sun.management.jmxremote.ssl=false
      -Dcom.sun.management.jmxremote.authenticate=false

      But when i open the jconsole localhost:8006

      I am unable to see the Hibernate Statics details in MBean tab? What I am missing here.
      Since we are using Spring JMX , by default will have the jmx server implementation.
      Hence,I am really confused what I am doing wrong. In weblogic console the

      Compatibility MBean Server is Enabled and Management EJB is also Enabled.

      Please shed some light into this.

      Thanks.