This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

integrate a class with Tomcat

 
saiprasad raut
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi There,
I want to run my java class with the tomcat instance (It means whenever the Tomcat is started, my java class should be instantiated ) The reason for doing this is that i have 'schedule reports' functionality to be implemented in my project.

For this i have written a java class (with the java.util.TimerTask)This class should continuosly run with tomcat and according to the schedule it will call the releated java class.

Can anybody tell me how to integrate my 'scheduler' class with Tomcat so that whenever tomcat is running my class should also run with it???


Thanks in advance..

Saiprasad
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have some solution to solve this problem.

But in below code have some problem.



In above code, success in TimerTask but not complete on call Start Tomcat.
 
saiprasad raut
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much for your post..

From the above code what i understood is that it is calling the startup.bat.

Actually i am trying to do the reverse thing.
i want we can do some settings in tomcat configuration so that it will call my scheduler.class and it will parallelly run with tomcat...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic