Question : Quartz Job Scheduler ShutdownHookPlugin

Hi,

I'm running Quartz Job Scheduler v1.8.0 as a Java standalone in Linux OS (RedHat ES5).

I'm trying to implement ShutdownHookPlugin in my scheduler.

As per ShutdownHook Plugin API here.  It says "This plugin catches the event of the JVM terminating (such as upon a CRTL-C) and tells the scheuler to shutdown."

But when I tried to test this by manually terminating using CTRL-C, I don't see any difference and is not shutting down as expected.

I notice that the quartz log keeps loading even after upon terminating by CTRL-C and also this is still showing as one of the process in 'ps -ef |grep java' command in Linux.

I've added these 2 lines for shutdown hook plugin inside my "quartz.properties" file:
1:
2:
org.quartz.plugin.shutdownhook.class = org.quartz.plugins.management.ShutdownHookPlugin 
org.quartz.plugin.shutdownhook.cleanShutdown = true


I don't know whether the type of JobStore used with matters.  Anyway, I'm using JDBCJobStore and its properties are:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
# JDBCStore
org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX
org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
org.quartz.jobStore.useProperties=false
org.quartz.jobStore.dataSource=myDS
org.quartz.jobStore.tablePrefix=QRTZ_
org.quartz.jobStore.isClustered=false

org.quartz.dataSource.myDS.driver = org.postgresql.Driver
org.quartz.dataSource.myDS.URL = jdbc:postgresql://localhost:5432/quartzscheduler
org.quartz.dataSource.myDS.user = mydbuser
org.quartz.dataSource.myDS.password = mydbpassword
org.quartz.dataSource.myDS.maxConnections = 5
org.quartz.dataSource.myDS.validationQuery=

What is going wrong? Any idea?

Answer : Quartz Job Scheduler ShutdownHookPlugin

use kill command to kill it (run as root)
Random Solutions  
 
programming4us programming4us