database notification
I would like to know is it possible that when each time a record is inserted or update in database table, then it will notify a java program to some tast like send email out? (not using trigger)Is there are API or framework out there that provide this feature?
A possible way would be to use AOP (Aspect Oriented Programming) to intercept the (java) method calls that do the database legwork. not ideal in a distributed - or mixed-language - environment, though. AspectJ is the pick of the AOP bunch, but is essentially a new extension to the language. Spring's AOP is nice and useable, or depending on exactly what your code looks like, you could roll your own solution
Another way would be to use Java Messaging (JMS) and teach the db to notify the application through the message system that it did something, but none of this is exactly the easiest thing to put together. It works, I've done it but it isn't a trivial effort.PS.