Announcement Announcement Module
Collapse
No announcement yet.
how to enabled quartz for jmx ? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to enabled quartz for jmx ?

    hi,

    I using quartz with spring's org.springframework.scheduling.quartz.SchedulerFac toryBean.

    how can i make the scheduler create by this factory JMX enabled, so i can view this scheduler in jconsole (with my web app) ?

    any idea ?

    kiwi
    ----
    happy hacking!

  • #2
    you could export the scheduler to jmx through an interface

    Comment


    • #3
      hi, do you got any configure sample ?

      I had try it but seem it spring use factory bean to create scheduler, how do we export the scheduler instead ?

      kiwi

      Comment


      • #4
        hi, do you got any configure sample ?

        I had try it but seem it spring use factory bean to create scheduler, how do we export the scheduler instead ?

        kiwi

        Comment


        • #5
          Code:
          <bean id="jmx.exporter" class="org.springframework.jmx.export.MBeanExporter"
          		p:server-ref="jmx.server">
          		<property name="beans">
          		<map>
          			<entry key="app.job:service=scheduler" value-ref="schedulerFactory"/>
          		</map>
          		</property>
          		<property name="registrationBehaviorName" value="REGISTRATION_REPLACE_EXISTING"/>
          		<!--  <property name="assembler" ref="assembler"/>-->
          	</bean>
          	
          	<bean id="schedulerFactory" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"
          		>
          		<property name="triggers">
          			<list>
          				
          			</list>
          		</property>
          	</bean>

          Comment


          • #6
            hi, thx for reply.

            now the scheduler is in mbeanserver, but the thing is it don't have any attribute and operation for this factory bean.

            in quartz.jar, that is a mbeans-descriptors.xml in org.quartz.core package. (so it is a model mbean).

            I wondering is that anyway to enabled it? seem all the attirbute and operation is define inside mbeans-descriptors.xml. It use common modeler for building MBean.

            I still not successful to register to mbean. (i wrote a code that use scheduler, but it it disabled in jconsole).

            any idea ?

            kiwi
            ----
            happy hacking !

            Comment


            • #7
              solution :

              Code:
              	<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
              		<property name="triggers">
              			<list>
              				<ref bean="conJob" />
              			</list>
              		</property>
              		<property name="configLocation" value="classpath:quartz.properties" />
              	</bean>
              add a quartz.properties to classpath.

              Code:
              org.quartz.scheduler.jmx.export = true
              add a common-modeler.jar to lib as well.

              kiwi

              Comment

              Working...
              X