So you have a database table that contains a kind of queue with requests that have to be processed.
More suited for this kind of problem than a database is message queueing software (for example IBM Websphere MQ or Oracle Advanced Queues). To handle the messages, you would write a message-driven
EJB that you deploy in a
Java EE application server. The app server will call your EJB whenever a message arrives on the queue. The Java API for working with message queues is called JMS (Java Messaging Service).
Ofcourse you'll need to know Java EE and you'll need a Java EE application server for this solution - but it's most likely more robust, efficient and scalable than a simple Java program that you write yourself from the ground up.