Results 1 to 7 of 7

Thread: how to enabled quartz for jmx ?

  1. #1

    Default 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. #2
    Join Date
    Aug 2006
    Posts
    129

    Default

    you could export the scheduler to jmx through an interface

  3. #3

    Default

    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

  4. #4

    Default

    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

  5. #5
    Join Date
    Aug 2006
    Posts
    129

    Default

    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>

  6. #6

    Default

    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 !

  7. #7

    Default

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •