I have a Web App (WAR1) that writes the database. I have another (WAR2) that reads the database and
distributes the data. The only contact the two currently have is the db. Both use Hibernate.
What are my options for WAR2 being notified of changes written by WAR1, or ideally, by any mechanism?
Sorry, but I don't have the DB background, I've jumped in with Hibernate. I understand that events
that originate in Hibernate would not notify another DB user. Is there a notification mechanism all the
way from the DB?
I've read about
- Interceptors -- These would have to live in WAR1 and be attached to the writer's sessions, yes?
- Event Listeners -- I think these originate in Hibernate and would have to be in WAR1, too.
- Triggers -- These sound like DB level concepts, but I haven't seen any examples of how to
create them or use them to notify db watchers. I don't want to write code that "runs in the db",
so unless notification has been encapsulated by hibernate...
Have I missed anything?
Should I just use Interceptors or Event Listeners in WAR1 and figure out the comms myself?
THANKS!
dbnb