JavaMelody - Quartz - Tomcat - Webapp

221 views
Skip to first unread message

attil...@lhsystems.com

unread,
Apr 26, 2012, 8:12:17 AM4/26/12
to javam...@googlegroups.com

Dear Emeric,

 

A colleague of mine reffered to you as someone who can help me with my JavaMelody - Quartz - TomcatWebapp problem.

Would you please be so kind to help me with my issue?  I am goind to explain the situtaion as detailed as I can.

 

First of all, we have a JEE Web application, that uses Spring MVC, Maven, Tomcat and JavaMelody for monitoring. The JEE Service is run automatically as scheduled by Quartz. So far so good. I have used the following documentations:

 

http://www.quartz-scheduler.org/documentation

http://code.google.com/p/javamelody/wiki/UserGuide

http://code.google.com/p/javamelody/wiki/UserGuideAdvanced

 

After delpoying the Webapp and starting up Tomcat, I see the http://localhost:8080/fis/monitoring and see that my JEE Appl Service has the Job scheduled and its up and running.

On http://localhost:8080/fis/monitoring I see buttons for Pause/ Pause All runnig Jobs.

The issue is: upon pressing the Pause / Pause all buttons, JavaMelody displyas that it has stopped the executing Job. But the Service is still running in Eclipse (dev environment) and keeps logging. JVM was not stopped I guess.

 

When I start Tomcat the ServletContextListener contextInitialized() method is executed.

My Service: public class FisImporter extends QuartzJobBean implements StatefulJob, InterruptableJob {} starts up and the executeInternal() method is invoked. But When I press Pause/PauseAll on JavaMelody the interrupt() method is this class is never invoked.

Neither the ServletContextListener contextDestroyed() method.

 

My Goal is to be able to stop currently executing Jobs (Quartz jobs) via JavaMelody page Pause button.

 

Could you help me with this issue?

 

A coulpe of more details:

javaMelody version is: javaMelody-core 1.36.0

JDK/JRE version:1.5

Tomcat Appl. Server version:

 

Kind Regards / Mit freundlichen Grüßen / Üdvözlettel

 

Attila Both

Lufthansa Systems Hungary Ltd.

Web Check-in

 

1117 Budapest, Neumann János u. 1/E

2.floor, 4th room

Office: +36 1 882 4603

Mobile: +36 30 633 22 20
attil...@lhsystems.com
http://www.lhsystems.hu

 

 

Sitz der Gesellschaft / Corporate Headquarters: Lufthansa Systems Hungaria Kft, Budapest, Fövarosi Birosag 01-09-463417
Geschaeftsfuehrung / Management Board: Monika Houck


Vernat Emeric

unread,
Apr 28, 2012, 7:02:51 AM4/28/12
to javam...@googlegroups.com
Hi Attila,

In JavaMelody, you can pause and resume Quartz jobs.
And except if there is a translation error, this does not say that the job is stopped, it says that the job is paused.

You can see the javadoc for the pauseJob method in the Quartz scheduler:
http://grepcode.com/file/repo1.maven.org/maven2/org.quartz-scheduler/quartz/2.1.3/org/quartz/Scheduler.java#Scheduler.pauseJob%28org.quartz.JobKey%29
In fact, the pauseJob method does not try to interrupt the current job execution, it only suspend the next executions.

It seems that you want to interrupt the current job execution. For that, it will be needed to call the interrupt method in the Quartz scheduler:
http://grepcode.com/file/repo1.maven.org/maven2/org.quartz-scheduler/quartz/2.1.3/org/quartz/Scheduler.java#Scheduler.interrupt%28org.quartz.JobKey%29
Of course, your job will need to implement InterruptableJob and its interrupt() method.

I have added an item #48 in the TODO list to do that someday (patch can be submitted in the project "issues"):
http://code.google.com/p/javamelody/wiki/TODO

bye,
Emeric


Le 26/04/2012 14:12, attil...@lhsystems.com a �crit�:

Dear Emeric,

ďż˝

A colleague of mine reffered to you as someone who can help me with my JavaMelody - Quartz - TomcatWebapp problem.

Would you please be so kind to help me with my issue?ďż˝ I am goind to explain the situtaion as detailed as I can.

ďż˝

First of all, we have a JEE Web application, that uses Spring MVC, Maven, Tomcat and JavaMelody for monitoring. The JEE Service is run automatically as scheduled by Quartz. So far so good. I have used the following documentations:

ďż˝

ďż˝

After delpoying the Webapp and starting up Tomcat, I see the http://localhost:8080/fis/monitoring and see that my JEE Appl Service has the Job scheduled and its up and running.

On http://localhost:8080/fis/monitoring I see buttons for Pause/ Pause All runnig Jobs.

The issue is: upon pressing the Pause / Pause all buttons, JavaMelody displyas that it has stopped the executing Job. But the Service is still running in Eclipse (dev environment) and keeps logging. JVM was not stopped I guess.

ďż˝

When I start Tomcat the ServletContextListener contextInitialized() method is executed.

My Service: public class FisImporter extends QuartzJobBean implements StatefulJob, InterruptableJob {} starts up and the executeInternal() method is invoked. But When I press Pause/PauseAll on JavaMelody the interrupt() method is this class is never invoked.

Neither the ServletContextListener contextDestroyed() method.

ďż˝

My Goal is to be able to stop currently executing Jobs (Quartz jobs) via JavaMelody page Pause button.

ďż˝

Could you help me with this issue?

ďż˝

A coulpe of more details:

javaMelody version is: javaMelody-core 1.36.0

JDK/JRE version:1.5

Tomcat Appl. Server version:

ďż˝

Kind Regards / Mit freundlichen Gr��en / �dv�zlettel

ďż˝

Attila Both

Lufthansa Systems Hungary Ltd.

Web Check-in

ďż˝

1117 Budapest, Neumann J�nos u. 1/E

2.floor, 4th room

Office: +36 1 882 4603

Mobile:�+36�30�633 22 20
attil...@lhsystems.com
http://www.lhsystems.hu

ďż˝

ďż˝

Sitz der Gesellschaft / Corporate Headquarters: Lufthansa Systems Hungaria Kft, Budapest, F�varosi Birosag 01-09-463417

Reply all
Reply to author
Forward
0 new messages