0

I need to develop a small app in Java (Windows Platform) which should remain in memory all the time and access a mysql database. If a row is inserted to a particular table with a particular status, I should be able to generate an email and forward it to a particular person.

I know the how to access a mysql database, check for the row status and generating email etc. But how to write a background process to listen for the interesting row and what tools can be used to accomplish this job is what I would like to know. Please shed some light.

Thank you.

Sudheer

Sudheer
  • 33
  • 5
  • 1
    If I understand correctly, the question is not about "a background app to send email", but rather "how to monitor a msql database for changes". – sudocode Jun 15 '12 at 15:00

2 Answers2

0

This should get you started:

  1. Background app:
    A loop with a sleep inside it.
    After each sleep, check the database table.

  2. Sending email:
    Google JavaMail

Bill the Lizard
  • 369,957
  • 201
  • 546
  • 842
davidfrancis
  • 3,393
  • 2
  • 20
  • 19
0

The Windows term for an application that automatically runs in the background is a "service". There are several ways to make a Java application into a service, see this question: How to create a windows service from java app

Community
  • 1
  • 1
Chase
  • 2,933
  • 1
  • 26
  • 33