• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to start some funcionality of web app after deploying on Tomcat

 
Petr Hnilica
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I want to start "emailer" after deploying on tomcat. Emailer should check in database terms of task and sends email if deadline is coming (it is school semestral app). But i dont know how to start up timer (emailer class) after deploying. I have read many of tomcat documentation and googled it.

I know how to do it seperetly. Emailer can be start up like a standard java app. And maybe it is smarter solution. But i want to know if it is possible.

Im using j shedluer like a timer

Thanks

PS: just link or typing "stupid idea" is welcomed
 
Misha Ver
Ranch Hand
Posts: 470
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about http://www.quartz-scheduler.org/ ?
 
Maneesh Godbole
Saloon Keeper
Posts: 10976
11
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

Check out ServletContextListener
contextInitialized is invoked by the container, when your app is deployed. You can trigger off your scheduling tasks in that method.
 
Petr Hnilica
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for answering. I thought that is easy. But sometimes i think something can be done easily, but that is not it.
 
Petr Hnilica
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So this article help me make it.

listener
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic