I’ve events table in Oracle database. I want to send email notification whenever a record is inserted into Oracle table. I’m using Tomcat & I don’t have JMS or any other support.
I need to finish this in next 2.5 weeks.
Can I use Oracle Advanced Queuing in which Oracle will enqueue the data from events table? But I’m not sure if I can dequeu it with standalone Java Program?
Can any one recommend me some ways to achieve this with a sample example?
Note: I’ve to use JAVA only as its a requirement for us.
Thanks
I have never done it, but you can use Oracle AQ from Java directly. Worst case, you could write some PLSQL to dequeue the next message and call that standard stored procedure from Java. Try googling for oracle AQ java.
For your problem, I would either use a trigger to place a message on the queue everytime a row is inserted into the table, or change the API used to insert into the table to also enqueue a message onto the queue.
Then you could have a separate process that reads each message from the queue and sends the email.