prasanthrao commented on code in PR #24670:
URL: https://github.com/apache/camel/pull/24670#discussion_r3577080762


##########
components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java:
##########
@@ -328,15 +332,24 @@ protected void doStart() throws Exception {
             throw new IllegalArgumentException("Cannot have both options 
deleteJob and pauseJob enabled");
         }
         if (ObjectHelper.isNotEmpty(customCalendar)) {
-            
getComponent().getScheduler().addCalendar(QuartzConstants.QUARTZ_CAMEL_CUSTOM_CALENDAR,
 customCalendar, true,
-                    false);
+            getComponent().getScheduler().addCalendar(customCalendarName(), 
customCalendar, true, false);
         }
         addJobInScheduler();
     }
 
     @Override
     protected void doStop() throws Exception {
         removeJobInScheduler();
+        if (deleteJob && ObjectHelper.isNotEmpty(customCalendar)) {
+            Scheduler scheduler = getComponent().getScheduler();
+            if (scheduler != null && !scheduler.isShutdown()) {
+                try {
+                    scheduler.deleteCalendar(customCalendarName());
+                } catch (SchedulerException e) {
+                    LOG.debug("Could not delete calendar {}: {}", 
customCalendarName(), e.getMessage());
+                }
+            }

Review Comment:
   This commit should ideally fix the concerns with calender deletion 
https://github.com/apache/camel/commit/9e26f1502c245b4567c02a4e7b2fe9b54ed7c49a



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to